Home » SQL & PL/SQL » SQL & PL/SQL » SQL Update - HELP!
SQL Update - HELP! [message #2353] Tue, 09 July 2002 01:10 Go to next message
Tim
Messages: 49
Registered: October 2000
Member
How do I structure an update query so that it only updates records that have the same id as records in another query (which shouldn't be updated and is generated from within the update query). Any help would be greatly appreciated!
Re: SQL Update - HELP! [message #2354 is a reply to message #2353] Tue, 09 July 2002 02:59 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
UPDATE table
   SET fields = values
 WHERE id IN ( SELECT id
                 FROM second_table
                WHERE your requirements
             )


Is this what you're looking for?
Re: SQL Update - HELP! [message #2374 is a reply to message #2353] Wed, 10 July 2002 04:14 Go to previous message
Tim
Messages: 49
Registered: October 2000
Member
thanks!
Previous Topic: How to Read a text file from a Stored proc.
Next Topic: SQL Function which solves my problem
Goto Forum:
  


Current Time: Fri Apr 26 09:34:52 CDT 2024