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

Home -> Community -> Usenet -> c.d.o.server -> Re: sql question if I may

Re: sql question if I may

From: Karsten Schmidt <groups_at_karsten-schmidt.com>
Date: 9 Jan 2003 08:23:50 -0800
Message-ID: <c6711ac4.0301090823.6f915b8d@posting.google.com>


Hi,
 i can't come up with the correct syntax out of my head right know,  but the way it is supposed to work is something like that:

  1. rewrite your query as a join.
  2. use that join as an inline view in the update statement

 the ask tom website http://asktom.oracle.com has some good examples on that.

 just search for update and join

Karsten  

"Jerry D" <jdubuke_at_notme.gpdservices.com> wrote in message news:<3e1b3059$0$17893$724ebb72_at_reader2.ash.ops.us.uu.net>...
> Hi all,
> I have a database with 3 tables:
> rq - 200,471 rcds
> ps - 31,021 rcds
> im - 17,525 rcds
> if i do the following query, I get the correct number of records:
>
> select rq_imkey
> from rq
> where rq_imkey in
> (select ps_cpkey from ps, im
> where im_key = ps_cpkey and
> im_planner = 100);
>
> This returns 1844 rows, which is what I expect.
> Now, I need to update a field in RQ - called rq_descr, and the info I need
> is from PS - ps_imkey.
>
> I cannot for the life of me figure out how to incorporate that piece of info
> into my query.
>
> Could one of the SQL gurus out there assist me? Pleeeeaassseee???
>
> Jerry D.
Received on Thu Jan 09 2003 - 10:23:50 CST

Original text of this message

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