The multi-part identifier “CM_PayorPlanText.Payor_Plan_Code” could not be bound
I am running this query and getting "The multi-part identifier "CM_PayorPlanText.Payor_Plan_Code" could not be bound."
what am i doing wrong can some one help ?
Thanks,
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From (CM_PayorMaster
Left join CM_PayorPlanMap on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code)
inner join CM_PayorParentText on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code)
sql-server
add a comment |
I am running this query and getting "The multi-part identifier "CM_PayorPlanText.Payor_Plan_Code" could not be bound."
what am i doing wrong can some one help ?
Thanks,
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From (CM_PayorMaster
Left join CM_PayorPlanMap on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code)
inner join CM_PayorParentText on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code)
sql-server
1
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45
add a comment |
I am running this query and getting "The multi-part identifier "CM_PayorPlanText.Payor_Plan_Code" could not be bound."
what am i doing wrong can some one help ?
Thanks,
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From (CM_PayorMaster
Left join CM_PayorPlanMap on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code)
inner join CM_PayorParentText on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code)
sql-server
I am running this query and getting "The multi-part identifier "CM_PayorPlanText.Payor_Plan_Code" could not be bound."
what am i doing wrong can some one help ?
Thanks,
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From (CM_PayorMaster
Left join CM_PayorPlanMap on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code)
inner join CM_PayorParentText on CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code)
sql-server
sql-server
edited Nov 12 '18 at 21:32
vencaslac
1,002217
1,002217
asked Nov 12 '18 at 20:42
Syed Gillani
111
111
1
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45
add a comment |
1
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45
1
1
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45
add a comment |
1 Answer
1
active
oldest
votes
The reason for the error is you are selecting the column CM_PayorPlanText.Payor_Plan_Code
and you aren't joining to the CM_PayorPlanText
table. You are joining to CM_PayorParentText
, which is the Parent
which seems to be the confusion.
Based on the JOIN
clause, I think you likely want to replace CM_PayorParentText
with CM_PayorPlanText
You also have unbalanced parentheses... I removed them since they aren't needed.
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From
CM_PayorMaster
Left join
CM_PayorPlanMap on
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code
inner join
CM_PayorPlanText on --changed the table here
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code
Also, you are using TOP 100
without an ORDER BY
which means you don't care which non-deterministic 100 rows should be returned. If you think you will get the same 100 each time, you should read this answer with emphasis on this post.
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269791%2fthe-multi-part-identifier-cm-payorplantext-payor-plan-code-could-not-be-bound%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The reason for the error is you are selecting the column CM_PayorPlanText.Payor_Plan_Code
and you aren't joining to the CM_PayorPlanText
table. You are joining to CM_PayorParentText
, which is the Parent
which seems to be the confusion.
Based on the JOIN
clause, I think you likely want to replace CM_PayorParentText
with CM_PayorPlanText
You also have unbalanced parentheses... I removed them since they aren't needed.
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From
CM_PayorMaster
Left join
CM_PayorPlanMap on
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code
inner join
CM_PayorPlanText on --changed the table here
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code
Also, you are using TOP 100
without an ORDER BY
which means you don't care which non-deterministic 100 rows should be returned. If you think you will get the same 100 each time, you should read this answer with emphasis on this post.
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
add a comment |
The reason for the error is you are selecting the column CM_PayorPlanText.Payor_Plan_Code
and you aren't joining to the CM_PayorPlanText
table. You are joining to CM_PayorParentText
, which is the Parent
which seems to be the confusion.
Based on the JOIN
clause, I think you likely want to replace CM_PayorParentText
with CM_PayorPlanText
You also have unbalanced parentheses... I removed them since they aren't needed.
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From
CM_PayorMaster
Left join
CM_PayorPlanMap on
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code
inner join
CM_PayorPlanText on --changed the table here
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code
Also, you are using TOP 100
without an ORDER BY
which means you don't care which non-deterministic 100 rows should be returned. If you think you will get the same 100 each time, you should read this answer with emphasis on this post.
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
add a comment |
The reason for the error is you are selecting the column CM_PayorPlanText.Payor_Plan_Code
and you aren't joining to the CM_PayorPlanText
table. You are joining to CM_PayorParentText
, which is the Parent
which seems to be the confusion.
Based on the JOIN
clause, I think you likely want to replace CM_PayorParentText
with CM_PayorPlanText
You also have unbalanced parentheses... I removed them since they aren't needed.
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From
CM_PayorMaster
Left join
CM_PayorPlanMap on
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code
inner join
CM_PayorPlanText on --changed the table here
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code
Also, you are using TOP 100
without an ORDER BY
which means you don't care which non-deterministic 100 rows should be returned. If you think you will get the same 100 each time, you should read this answer with emphasis on this post.
The reason for the error is you are selecting the column CM_PayorPlanText.Payor_Plan_Code
and you aren't joining to the CM_PayorPlanText
table. You are joining to CM_PayorParentText
, which is the Parent
which seems to be the confusion.
Based on the JOIN
clause, I think you likely want to replace CM_PayorParentText
with CM_PayorPlanText
You also have unbalanced parentheses... I removed them since they aren't needed.
select top 100
[CM_PayorMaster].[Payor_Parent_Code],
[CM_PayorPlanMap].[Mnumber],
CM_PayorMaster.Payor_Code,
CM_PayorMaster.Payor_Parent_Code,
CM_PayorPlanText.Payor_Plan_Code
From
CM_PayorMaster
Left join
CM_PayorPlanMap on
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanMap.Payor_Plan_Code
inner join
CM_PayorPlanText on --changed the table here
CM_PayorMaster.Payor_Plan_Code=CM_PayorPlanText.Payor_Plan_Code
Also, you are using TOP 100
without an ORDER BY
which means you don't care which non-deterministic 100 rows should be returned. If you think you will get the same 100 each time, you should read this answer with emphasis on this post.
edited Nov 12 '18 at 21:30
answered Nov 12 '18 at 21:22
scsimon
20.8k41536
20.8k41536
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
add a comment |
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
1
1
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
Awesome .. thanks a lot it worked . i was overlooking the table names .. Thanks a lot .. I only ran top 100 to test the query if it work properly since there are over 500K records and I was trying to save time . Thanks ..
– Syed Gillani
Nov 12 '18 at 21:38
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
No sweat @SyedGillani. Be sure to read this post since you are new.
– scsimon
Nov 12 '18 at 21:46
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269791%2fthe-multi-part-identifier-cm-payorplantext-payor-plan-code-could-not-be-bound%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Your query does not seem to use MySQL. I have changed the tag to SQL Server. Please tag appropriately.
– Madhur Bhaiya
Nov 12 '18 at 20:55
At the very least, you have unbalanced parentheses, but even so, that's not how the FROM clause works... if you want to select FROM a sub-select, the sub-select needs a SELECT statement too... but maybe just remove that first opening paren, and both closing ones, because I'm not sure what they're for.
– pmbAustin
Nov 12 '18 at 21:09
Thanks for your help .. It worked after the edits .
– Syed Gillani
Nov 12 '18 at 21:45