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

Join in Insert?

Status
Not open for further replies.

jararaca

Programmer
Jun 1, 2005
159
US
Hi,

I have a table with an empty field that needs to be populated with data from a related table. In other words, if I do a join between this table and the related table, the value I need to populate the empty field with would be on the same row as the row that needs to be populated. I'm not sure how to do this, because I'm not sure how to do a join in an Insert statement.

Can anyone please help?

Thank you.
 
Write SELECT with JOIN first.
Test it.
Then add INSERT INTO .... before SELECT.
Voila.

Or maybe you need UPDATE with JOIN? Or both together?

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Thank you!

Yeah, I caught that kinda late. I did mean Update instead of Insert...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top