Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,987 of 2,288    |
|    George Dainis to All    |
|    Retrieving database record with the lowe    |
|    27 Jan 05 19:50:22    |
      XPost: comp.databases.oracle.misc, microsoft.public.sqlserver.programming,       comp.databases.ibm-db2       From: george.dainis@bluecorner.com              How do I code a SQL SELECT statement so that always only this record is       retrieved       which matches a certain criteria AND has the lowest ID (= value in key field       aaa)?              It must me something like              SELECT * FROM .... WHERE somefield='somevalue' AND aaa=lowestkey(column(aaa))              As a result either zero or at most 1 record should be passed back.              George              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca