If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Update table from values in another..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-04, 13:41
BEISKEN BEISKEN is offline
Registered User
 
Join Date: Apr 2003
Posts: 15
Update table from values in another..

Hi ya,

I need to update two columns in one table from information in another table..

Table1

ID, UserID

Table2

ID, NewUserID

How can I write this update statment?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 01-12-04, 14:43
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
Re: Update table from values in another..

Try:
update table1
set id=(select id from table2),userid=(select newuserid from table2)
Reply With Quote
  #3 (permalink)  
Old 01-12-04, 15:15
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Please give us more details of your post.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On