|
-
October 24th, 2008, 08:05 AM
#1
[RESOLVED] The multi-part identifier could not be bound.
Hi guys,
I'm trying execute the statement below, but I keep getting the error:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "SALESTABLE.SALESNUMBER" could not be bound.
What am I doing wrong here?
Code:
SELECT SALESTABLE.*, SALESTRANS.*, DEBINVJOUR.*, EXCHANGECODERATE.*
FROM SALESTRANS
INNER JOIN DEBINVJOUR ON SALESTABLE.SALESNUMBER = DEBINVJOUR.SALESNUMBER
INNER JOIN SALESTABLE ON SALESTRANS.SALESNUMBER = SALESTABLE.SALESNUMBER
INNER JOIN EXCHANGECODERATE ON SALESTABLE.EXCHANGECODE = EXCHANGECODERATE.EXCHANGECODE
WHERE SALESTABLE.DEBTORACCOUNT = ' 42914411'
ORDER BY SALESTABLE.CREATEDATE
Thanks in advance!
It's not a bug, it's a feature!
-
October 25th, 2008, 10:33 AM
#2
Re: The multi-part identifier could not be bound.
Seems like a lot of things could cause that.
Not sure what it could be myself, but this was suggested for this error on another forum:
1) Check all qualifiers (all owners and tables and columns are valid)
2) Check that all derived tables has a name
3) All columns in a derived table has a name
in that example, the problem ended up being a case-sensitive issue
he had RescAddon but it should have been RescAddOn
... hope that helps
-
October 25th, 2008, 09:08 PM
#3
Re: The multi-part identifier could not be bound.
try this instead...
Code:
SELECT SALESTABLE.*, SALESTRANS.*, DEBINVJOUR.*, EXCHANGECODERATE.*
FROM SALESTRANS
INNER JOIN DEBINVJOUR ON SALESTRANS.SALESNUMBER = DEBINVJOUR.SALESNUMBER
INNER JOIN SALESTABLE ON SALESTRANS.SALESNUMBER = SALESTABLE.SALESNUMBER
INNER JOIN EXCHANGECODERATE ON SALESTABLE.EXCHANGECODE = EXCHANGECODERATE.EXCHANGECODE
WHERE SALESTABLE.DEBTORACCOUNT = ' 42914411'
ORDER BY SALESTABLE.CREATEDATE
I changed the first inner join
-
October 27th, 2008, 02:14 AM
#4
Re: The multi-part identifier could not be bound.
 Originally Posted by eclipsed4utoo
try this instead...
Code:
SELECT SALESTABLE.*, SALESTRANS.*, DEBINVJOUR.*, EXCHANGECODERATE.*
FROM SALESTRANS
INNER JOIN DEBINVJOUR ON SALESTRANS.SALESNUMBER = DEBINVJOUR.SALESNUMBER
INNER JOIN SALESTABLE ON SALESTRANS.SALESNUMBER = SALESTABLE.SALESNUMBER
INNER JOIN EXCHANGECODERATE ON SALESTABLE.EXCHANGECODE = EXCHANGECODERATE.EXCHANGECODE
WHERE SALESTABLE.DEBTORACCOUNT = ' 42914411'
ORDER BY SALESTABLE.CREATEDATE
I changed the first inner join
That seems to have done it Thanks!
What was the nature of my error? I'm new to join-statements...
It's not a bug, it's a feature!
-
October 27th, 2008, 05:19 AM
#5
Re: The multi-part identifier could not be bound.
You wrote SALESTABLE instead of SALESTRANS in the first INNER JOIN.
Sincerely,
Martin Svendsen
-
October 28th, 2008, 09:28 AM
#6
Re: The multi-part identifier could not be bound.
Thanks,
looking at my first query that seems really obvious now
It's not a bug, it's a feature!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|