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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Update

Status
Not open for further replies.

Linda224

Programmer
Dec 6, 2006
80
US
Hello
I am trying to update a table like this:

Update tbl1
set tbl1.col1 = tbl2.col1
where tbl1.col2 = tbl2col2

But of course it doesnt work

Please help!!!!
thank you
Linda
 
You need a from clause

Update tbl1
set tbl1.col1 = tbl2.col1
FROM tbl1, tbl2
where tbl1.col2 = tbl2col2

 
Ooops I knew I was forgetting something
Thank you Thank you Thank you

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top