View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Dales Ken Dales is offline
external usenet poster
 
Posts: 5
Default How to extract data through ODBC with date criteria?

Let's say you want records from dates after March 2002;
you could try this:

SELECT * FROM MY_TABLE WHERE (YEAR 2002) OR (YEAR=2002
and MONTH3)

Just substitute in the proper parameters to allow
selection of any month and year.

-----Original Message-----
There is a table in the database with separate fields

Month and Year
as integers. How to use SQL to retrieve records after a

specified
date? I have tried a number of date functions e.g.

DateSerial but SQL
doesn't like it. How should I specify that condition?
.