Hi
I created a tabel whose one of the column value is UPDATE_TIMESTAP this time stamp will be the value when the record has been laoded into the tabel(for example: today if i load a record at 12PM value(UPDATED_TIMESTAMP) loads into table is 2008-11-27-12.33.27.238657)
So now i want issue a delete query where All the records having (UPDATE_TIMESTAMP + 24 months) > TODAY’s date must be deleted from the tabel. i have a confusion with the value loaded and current timestamp valueloaded is in the format of (2008-11-27-12.33.27.238657) and current timestamp is 20081127123327238657 how can i compare both value for deleting the record from table..
FYI i coded as:
EXEC SQL DELETE FROM PENDTABL WHERE UPDATE_TIMESTAMP > CUREENT_TIMESTAMP - 24months ;
Delete records based on TIMESTAMP from a tabel
-
- Posts: 2
- Joined: Wed Nov 26, 2008 7:08 pm
- Skillset: PL/I,DB2.CICS,VSAM,JCL
- Referer: Google Srch
-
- Similar Topics
- Replies
- Views
- Last post
-
-
SORT the records based on the second word
by seethahexa » Wed Aug 19, 2020 1:30 pm » in DFSORT/ICETOOL/ICEGENER - 1
- 1406
-
by sergeyken
View the latest post
Wed Aug 19, 2020 6:08 pm
-
-
-
Create multiple records based on one record within a file.
by chillmo » Thu Aug 11, 2022 3:54 am » in Syncsort/Synctool - 5
- 7688
-
by sergeyken
View the latest post
Fri Aug 12, 2022 2:23 am
-
-
-
Can anyone tell me how to retrieve the vsam system timestamp
by jdechirico » Tue Jun 18, 2024 9:22 pm » in VSAM/SMS - 1
- 1544
-
by enrico-sorichetti
View the latest post
Tue Jun 18, 2024 10:06 pm
-
-
- 3
- 2699
-
by engh
View the latest post
Mon Jan 09, 2023 2:23 pm
-
- 1
- 2303
-
by Robert Sample
View the latest post
Fri Feb 25, 2022 7:42 pm