[thelist] ASP & SQL SELECT Query - comparing dates

Bob Davis bobd at members.evolt.org
Tue Apr 10 10:11:21 CDT 2001

Hi Elfur!

On Tuesday, April 10, 2001, at 11:08 AM, Elfur Logadottir wrote:

> strSQL2 ="select * from table where date like " & strSQL & " order by
> time desc"
> but no such luck.
> how do I have to do this?

You could try a sub query.

select * from table
where date is (select TOP 1 date from table)
order by time desc

NB:  I haven't tested this, and it's been a little while since I did any 
sql work, so it might not be 100% correct...


bob davis
bobd at members.evolt.org

More information about the thelist mailing list