Requires Free Membership to View
SELECT * FROM my_table
WHERE date_column BETWEEN SYSDATE and SYSDATE-7;
The problem typically comes in when using something like VB.NET and it's ODBC drivers. Oracle's ODBC drivers should have no problems with the above query. You can install Oracle client software and use Oracle's ODBC drivers. Or, you can create a view in the database as follows:
CREATE VIEW my_table_last_week
AS SELECT * FROM my_table
WHERE date_column BETWEEN SYSDATE and SYSDATE-7;
Now have your VB.NET application just query the view as follows:
SELECT * FROM my_table_last_week;
All ODBC drivers should be able to handle the above query.
This was first published in June 2004

Join the conversationComment
Share
Comments
Results
Contribute to the conversation