| Author |
Oracle update query question
|
Kevin P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
Probably not the ideal forum to post this, but I know you tend to get quick resulst here so I thought I'd give it a go.
I have a tabel where I need to update a column, but I can only find the ID of that record by search a second table.
Basically the pseudo code query is...
Update table1 status='Effective' where table ID = X, X = table 1 child_id where table 2 master_id = '123456'
This is being executed on an Oracle DB.
Here is my attempt at the query, but I get a
error
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
Keith,
This forum is fine - it's about SQL.
I remember having to do a nested query for the other table in updates in Oracle for it to work. It's been a while, but this looks familiar.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Paul Campbell
Ranch Hand
Joined: Oct 06, 2007
Posts: 338
|
|
or alternatively you can do this
|
 |
 |
|
|
subject: Oracle update query question
|
|
|