March 19th, 2002, 12:49 PM
How can I construct a SELECT query which select only the latest version of my document??
for eg: I have a same document with different versions... 1,2,3 etc.... I need to select the document which has the latest version ..in this case 3
wud appreciate any help..
March 19th, 2002, 01:53 PM
This is a "general database" question anyway.
March 19th, 2002, 02:58 PM
Assuming you've got a variable in the table that contains the date of the doc.... (and if I remember rightly you're using oracle), so try something like this....
select doc from doctable where (doc,date) in (select doc, max(date) from doctable where name='whateveryoucalledit.doc');