Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE, SET appears twice

Status
Not open for further replies.

Tarzan613

Programmer
Jun 10, 2002
10
0
0
US
update org_links
SET ENDUSER_CNT = active_ur, SET ACTIVE_ACCNTS_CNT = active_accounts
FROM #temp, #temp2
WHERE #temp.org_id = org_links.org_id, #temp2.org_id = org_links.org_id

Mistake that I'm getting is Error 156: "Incorrect sintax near a keyword SET"
 
Remove the second 'SET'

update org_links
SET ENDUSER_CNT = active_ur, ACTIVE_ACCNTS_CNT = active_accounts
FROM #temp, #temp2
WHERE #temp.org_id = org_links.org_id, #temp2.org_id = org_links.org_id

Mistake that I'm getting is Error 156: "Incorrect sintax near a keyword SET"

 
Hi,

Also

update org_links
SET ENDUSER_CNT = active_ur, ACTIVE_ACCNTS_CNT = active_accounts
FROM #temp, #temp2
WHERE #temp.org_id = org_links.org_id AND #temp2.org_id = org_links.org_id

Change comma to AND in where clause....


Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top