rbhargaw
asked on
Multi-part identifier could not be bound
Hello,
I am trying to migrate Sybase stored procedures into SQL server 2008 using SSMA. So I received the following error "Non-ANSI join operator cannot be converted in this statement" inside the code..and hence I am working on to remove this error..Here is what i am trying to do...
@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @
UPDATE t
SET
status = c.statusId,
descr = corr.descrip + ': ' + mdg.descrip
FROM
#t_trandata AS t,
dbo.Correspondence AS c,
-- dbo.CorrMeth AS corr,
dbo.MailDocGrp AS mdg
LEFT JOIN CorrMeth AS corr on corr.corrMethID = dbo.Correspondence.corrMet hId
WHERE
t.holdTypeID = 13 AND
t.holdId = c.holdId AND
--c.corrMethId *= corr.corrMethID AND
c.mailDocGrpId = mdg.mailDocGrpID
-------------------------- ---------- ---------- ---------- ---------- ---------- -----
But I am receiving the following error while running the SP
The multi-part identifier "dbo.Correspondence.corrMe thId" could not be bound.
Let me know what I am doing wrong?
Thanjks
I am trying to migrate Sybase stored procedures into SQL server 2008 using SSMA. So I received the following error "Non-ANSI join operator cannot be converted in this statement" inside the code..and hence I am working on to remove this error..Here is what i am trying to do...
@@@@@@@@@@@@@@@@@@@@@@@@@@
UPDATE t
SET
status = c.statusId,
descr = corr.descrip + ': ' + mdg.descrip
FROM
#t_trandata AS t,
dbo.Correspondence AS c,
-- dbo.CorrMeth AS corr,
dbo.MailDocGrp AS mdg
LEFT JOIN CorrMeth AS corr on corr.corrMethID = dbo.Correspondence.corrMet
WHERE
t.holdTypeID = 13 AND
t.holdId = c.holdId AND
--c.corrMethId *= corr.corrMethID AND
c.mailDocGrpId = mdg.mailDocGrpID
--------------------------
But I am receiving the following error while running the SP
The multi-part identifier "dbo.Correspondence.corrMe
Let me know what I am doing wrong?
Thanjks
Existing Code:
----------------------------
/*
* SSMA error messages:
* S2SS0062: Non-ANSI join operator cannot be converted in this statement.
UPDATE t
SET
status = c.statusId,
descr = corr.descrip + ': ' + mdg.descrip
FROM
#t_trandata AS t,
dbo.Correspondence AS c,
dbo.CorrMeth AS corr,
dbo.MailDocGrp AS mdg
WHERE
t.holdTypeID = 13 AND
t.holdId = c.holdId AND
c.corrMethId *= corr.corrMethID AND
c.mailDocGrpId = mdg.mailDocGrpID
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great!! That was fast..It resolved the issue..thanks a lot!!!
ASKER
Thanks Again!
dbo.Correspondence AS c,