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 query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-29 : 08:19:08
anjan writes "i have a query in Access as folllows.i want to write same in SQL Server.

UPDATE purchase INNER JOIN temp ON purchase.INVNO = temp.TEMP1 SET purchase.pamt = Val(temp.temp2)
WHERE (((purchase.billtype)<>'Cash Bill'))

plz help me

Regards
Anjan"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-29 : 08:42:14
Try this

Update P set P.pamt= T.temp2 from purchase P INNER JOIN temp T
ON P.INVNO = T.TEMP1 where P.billtype<>'Cash Bill'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -