• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Oracle update query question

Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


author & internet detective
Posts: 40035
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

or alternatively you can do this

What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic