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)
 Need some help on an error!

Author  Topic 

kuka978
Starting Member

2 Posts

Posted - 2011-06-10 : 04:31:37
I want to update a table and I'm getting the following error (Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "a.billing" could not be bound.)

UPDATE watersupply.dbo.accounttable
SET a.billing = b.debi
FROM watersupply.dbo.accounttable AS a
INNER JOIN watersupply.dbo.faturimi_arketimi AS b
ON a.accountno = b.konto

Can someone please assist on this issue?
Kuka

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-06-10 : 05:37:40
Try it as:UPDATE watersupply.dbo.accounttable
SET billing = b.debi
FROM watersupply.dbo.accounttable AS a
INNER JOIN watersupply.dbo.faturimi_arketimi AS b
ON a.accountno = b.konto


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

kuka978
Starting Member

2 Posts

Posted - 2011-06-10 : 06:33:39
Works fine now.
Many thanks Jack,

Kuka
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-06-10 : 08:16:55
Or this:

UPDATE a
SET a.billing = b.debi
FROM watersupply.dbo.accounttable AS a
INNER JOIN watersupply.dbo.faturimi_arketimi AS b
ON a.accountno = b.konto


- Lumbago
My blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/
Go to Top of Page
   

- Advertisement -