Need Assist With Upodate Statement That Returns Multiple Rows
Hi Folks
I am trying to figure out a way to write this update statement so that it only returns one row for each dataid
Any assistance is appreciated
Thanks
Jim
*********************************************
table: dtree (unique dataid) dataid is (1 to many)
dataid
createdate
modifydate
table: dversdata (many docids to 1 dtree dataid - version is unique)
docid,
version
filecdate
filemdate
select:
select
dataid,
createdate,
docid,
version,
filecdate
from
dtree,
dversdata
where
dataid=docid
and
createdate > TO_DATE ('20110826235900','yyyymmddhh24miss')
order by
docid,
version;
sample output:
DATAID CREATEDAT DOCID VERSION FILECDATE
---------- --------- ---------- ---------- ---------
498668 08-NOV-16 498668 1 20-DEC-04
498668 08-NOV-16 498668 2 20-DEC-04
498668 08-NOV-16 498668 3 20-DEC-04
0