thelearner
Programmer
Hi,
I have an SQL, original condition on the WHERE clause was to get the data only when date1 is greater than date2. Date1 comprises of 4 fields, century, year, month and day. Date2 comprises of 2 fields century and YYMMDD.
WHERE DIGITS(CC) || DIGITS(YY) || DIGITS(MM) || DIGITS(DD)
> DIGITS(CENT) || DIGITS(YYMMDD)
Now I have to change the condition to get the data when date1 > date2 by more than 1 day. ie. if date1 is 4/18 and date2 is 4/17, I should not read this record. But if date2 is 4/16, then I want to read this record. Can anyone help me construct this WHERE clause.
Thanks in advance
I have an SQL, original condition on the WHERE clause was to get the data only when date1 is greater than date2. Date1 comprises of 4 fields, century, year, month and day. Date2 comprises of 2 fields century and YYMMDD.
WHERE DIGITS(CC) || DIGITS(YY) || DIGITS(MM) || DIGITS(DD)
> DIGITS(CENT) || DIGITS(YYMMDD)
Now I have to change the condition to get the data when date1 > date2 by more than 1 day. ie. if date1 is 4/18 and date2 is 4/17, I should not read this record. But if date2 is 4/16, then I want to read this record. Can anyone help me construct this WHERE clause.
Thanks in advance