Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 The multi-part identifier could not be bound

Author  Topic 

LuckyJim
Starting Member

9 Posts

Posted - 2010-08-04 : 09:02:18
Hi all,

Have looked at all the posts to do with this but none seem applicable

Get this error msg when I run the code
The multi-part identifier "mf.m9rewh" could not be bound.

If I remove the UPDATE and SET and replace with SELECT it all works fine.

Hoping someone can kick me in the right direction

Here is the code

--------- Start of Code -----------------------
UPDATE mitfac
SET mf.m9rewh = 'TEST'
FROM
mitfac AS mf
INNER JOIN
mitmas as mm
ON
(
mm.mmitno = mf.m9itno
AND
mm.mmitno = 'E6808000001999A'
AND
mf.m9rewh = 'L12'
AND
mm.mmitcl = 'ICB'
)

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-04 : 09:13:38
quote:
Originally posted by LuckyJim

Hi all,

Have looked at all the posts to do with this but none seem applicable

Get this error msg when I run the code
The multi-part identifier "mf.m9rewh" could not be bound.

If I remove the UPDATE and SET and replace with SELECT it all works fine.

Hoping someone can kick me in the right direction

Here is the code

--------- Start of Code -----------------------
UPDATE mf mitfac
SET mf.m9rewh = 'TEST'
FROM
mitfac AS mf
INNER JOIN
mitmas as mm
ON
(
mm.mmitno = mf.m9itno
AND
mm.mmitno = 'E6808000001999A'
AND
mf.m9rewh = 'L12'
AND
mm.mmitcl = 'ICB'
)





No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2010-08-04 : 09:29:10
or

--------- Start of Code -----------------------
UPDATE mitfac
SET mf.m9rewh = 'TEST'
FROM
mitfac AS mf
INNER JOIN
mitmas as mm
ON
(
mm.mmitno = mf.m9itno
AND
mm.mmitno = 'E6808000001999A'
AND
mf.m9rewh = 'L12'
AND
mm.mmitcl = 'ICB'
)


http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -