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 2000 Forums
 Transact-SQL (2000)
 Update ?

Author  Topic 

melcraig
Starting Member

39 Posts

Posted - 2006-04-26 : 11:06:41
Hello,
I cant seem to get my update to work correctly.


SELECT dbo.tmpTran.Name, dbo.tnpAcct.Acct
FROM dbo.tnpAcct INNER JOIN
dbo.tnpEmployee ON dbo.tnpAcct.EmployeeID = dbo.tnpEmployee.EmployeeID INNER JOIN
dbo.tmpTran ON dbo.tnpEmployee.Name = dbo.tmpTran.Name

I want to SET tnpAcct.Acct = 'Y'
if dbo.tnpEmployee.Name = dbo.tmpTran.Name


Thanks for your help!
Mel

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2006-04-26 : 11:20:58
[code]UPDATE dbo.tnpAcct
SET Acct = 'Y'
FROM dbo.tnpAcct INNER JOIN
dbo.tnpEmployee ON dbo.tnpAcct.EmployeeID = dbo.tnpEmployee.EmployeeID INNER JOIN
dbo.tmpTran ON dbo.tnpEmployee.Name = dbo.tmpTran.Name
[/code]

Mark
Go to Top of Page

melcraig
Starting Member

39 Posts

Posted - 2006-04-26 : 11:33:58
Thanks Mark
Mel
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2006-04-27 : 07:01:10
no problem mel

Mark
Go to Top of Page
   

- Advertisement -