Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> sql to update where all related records meet criteria

sql to update where all related records meet criteria

From: YoMama <lmcdonald_at_psu.edu>
Date: 28 Oct 2005 06:34:27 -0700
Message-ID: <1130506467.828917.295380@g49g2000cwa.googlegroups.com>


I need help writing a sql statement. The table structures are as follows:
version table = version_pk, stage_fk
section table = section_pk, version_fk, stage_fk

There is a one-to-many relationship from version to section.

The query needs to update version.stage_fk=61 where ALL of a version's related section.stage_fks=61 (if any one section for a given version has a stage_fk other than 61, the version should NOT change.

Any help you can provide is greatly appreciated!! Received on Fri Oct 28 2005 - 08:34:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US