Home > database >  DB2 days function error
DB2 days function error

Time:09-24

Time is like that, I want to delete all the data in a year ago, such as the 2018-11-26 today, I want to delete all the data before the 2017-11-26

Date field is the VARCHAR type

My statement was written so

select * from A where DAYS (TIMESTAMP (START_TIME)) & lt;=DAYS (CURRENT DATE - 365 DAYS)

Perform error - 180

Table time field START_TIME is varchar type

Time field type, if it is a time of another table is not an error,

Beg you teach a great god!!!!!!

CodePudding user response:

DB2 and people use this tool, the sofa

CodePudding user response:

START_TIME varchar format has a problem
  •  Tags:  
  • DB2
  • Related