[thelist] ASP: Select only the first record
Norman Beresford
n.beresford at anansi.co.uk
Thu Jun 19 11:41:14 CDT 2003
"SELECT TOP 1 * FROM news ORDER BY date DESC"
Got a feeling you might need to specify the rows by name rather then using the *
ie
"SELECT TOP 1 myTable.myField1, myTable.myField2 FROM news ORDER BY date DESC"
Which is better practise anyway
Norman
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
Sent: 19 June 2003 17:06
To: Casey Crookston; thelist at lists.evolt.org
Subject: [thelist] ASP: Select only the first record
How would one select only the very first record from a table. This select
statement, of course, adds all rows to a recordset. What I want is only the
record with the most recent date...
"SELECT * FROM news ORDER BY date DESC"
Thanks,
Casey
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
Evolt.org conference in London, July 25-27 2003. Register today at http://evolt.org.uk
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list