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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timestamp field in DB2 Query.

Status
Not open for further replies.

jtrapat1

Programmer
Jan 14, 2001
137
US
I'm running a query - it will eventually be a
DELETE FROM tablename WHERE a timestamp field has a '1994' or less, year in the first four positions.
I need help writing this query:
I don't know which functions, if any, I need to use to pull the year out of the table, and then delete the rows.

Can anyone help?
Thanks in advance.

John
 
If you're talking about a regular date field just say

Where year(datefield) < 1995
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top