Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Date Problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm having problems making a query that will show records younger than the day the query is made. For example: I want to be able get a querry of all records that have an "Inspection Date" overdue. This is what I have so far:

SELECT [ID], [NUM], [EQUIPO], [TIPO], [MARCA], [CAP], [MODELO], [SERIE], [DIVISION], [UBICACION], [SECTOR], [ULT INSP], [P PESO], [PROX INSP], [ST], [LINK], [COMENTARIO]
FROM [HOJA INFORME]
WHERE [PROX INSP] < ;
 
WHERE [PROX INSP] < NOW; This should work, it will look for anything that has been entered before RIGHT NOW, if thats too precise then use DATE. You may have to put () at the end of NOW and DATE.
 
SELECT [ID], [NUM], [EQUIPO], [TIPO], [MARCA], [CAP], [MODELO], [SERIE], [DIVISION], [UBICACION], [SECTOR], [ULT INSP], [P PESO], [PROX INSP], [ST], [LINK], [COMENTARIO]
FROM [HOJA INFORME]
WHERE [PROX INSP] < Date();
J. Jones
jjones@cybrtyme.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top