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 -> sql update statement help required

sql update statement help required

From: mrique <mrique_at_hotmail.com>
Date: 9 Jul 2002 15:18:47 -0700
Message-ID: <a3fccd34.0207091418.cbfa63c@posting.google.com>


hi,

newbie to oracle sql need to do this job :

I have a table "file" (file.key, file.price) that I need to scan every day to detect quality problem (example : no price recorded) and record it with a time stamp, in a table "problem" (problem.file_key, problem.date_stamp)

the statement I'm trying to do will do this job :

Select from table file where the field "file.price" is empty IF file.price is null, THEN
- if file.key has allready been recorded in table "problem" (field
problem.file_key) with an old date, then update the date for this row
- if file.key is not found in table "problem", then insert file.key,
sysdate in problem.file_key, problem.date_stamp END IF
Really don't know how to do that, Hope seniors could give 2 minutes to help and teach !
PS : I'm using ODBC on an MS .asp work
Thanks Received on Tue Jul 09 2002 - 17:18:47 CDT

Original text of this message

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