No bcos that would julian_day( current_date) would return a 7 digit number....
I need the output to be in the format 105047 ( where 1 is century, 05 is year and 047 is day of the year( jan 31+ feb 16 days)).
Please execute the query on DB2 and then let me know.
I have tried with the following query
SELECT CONCAT(CONCAT ('1',SUBSTR(CHAR(YEAR(CURRENT_DATE)),3,2)),SUBSTR( CHAR(DIGITS(DAYOFYEAR(CURRENT_DATE))),8,3)) FROM SYSIBM.SYSDUMMY1;
This would return 107653 but is not working when I substitue in the
user defined sql query in ODBC stage after where clause
like select * from table xyz where somedb2_date = the above query.
HELP.