For example, This is the table name microprice in Microsoft Access.
dat price
8/23/2004 11
8/24/2004 28
8/25/2004 13
8/26/2004 24
8/27/2004 56
8/28/2004 12
8/29/2004 32
8/30/2004 21
I want to show the last five price not include the date of today. Assume today is 8/30/2004
I want to write the sql that show
8/25/2004 13
8/26/2004 24
8/27/2004 56
8/28/2004 12
8/29/2004 32
So how can I write SQl. I try to use
sql="select top 5 * from microprice where dat <> '%"&date()&"%' order by dat desc"
But it doesn't work !!!