Showing posts with label toread. Show all posts
Showing posts with label toread. Show all posts

Wednesday, March 7, 2012

does anyone know how to open access by todays date using sql

Hi
Can anyone point me in the right direction here, I would like to open
a table in access 2003 by date. I have an asp web page which needs to
read data from a table with each days today's date (which ever day
that is) then a new table is created with today's date.
Example:
I have a table called 17-may-2007 my ASP page reads this table for
24hours then tomorrow (12:00 midnight 18th) I will have a new table
called 18-may-2007 and the old table is left behind (As 17-may-2007)
so I need my sql statement to automatically open table by today's
date.
This is what I have so far but it does not work. Any ideas
'--Start of code--
Call BarGraphSQLData( _
"SELECT id, DataReading FROM DAY(CURRENT_TIMESTAMP) ORDER BY id" ,
_
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("db/data.mdb") & ";" , _
'--End of code--
Thanks
Trevor
You might get better responses if you posted this in an Access group.
Andrew J. Kelly SQL MVP
"Trev" <trevor-dustan@.lycos.co.uk> wrote in message
news:1179408317.732724.182460@.q75g2000hsh.googlegr oups.com...
> Hi
> Can anyone point me in the right direction here, I would like to open
> a table in access 2003 by date. I have an asp web page which needs to
> read data from a table with each days today's date (which ever day
> that is) then a new table is created with today's date.
> Example:
> I have a table called 17-may-2007 my ASP page reads this table for
> 24hours then tomorrow (12:00 midnight 18th) I will have a new table
> called 18-may-2007 and the old table is left behind (As 17-may-2007)
> so I need my sql statement to automatically open table by today's
> date.
>
> This is what I have so far but it does not work. Any ideas
> '--Start of code--
> Call BarGraphSQLData( _
> "SELECT id, DataReading FROM DAY(CURRENT_TIMESTAMP) ORDER BY id" ,
> _
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
> Server.MapPath("db/data.mdb") & ";" , _
> '--End of code--
>
> Thanks
>
> Trevor
>