Hello,
I am quite new to SQL and Unix so I am having a problem with what may be thought of as a simple problem.
I have a table (name=tdb.tb_rf_day) which has a date column using the following format,
"2006-01-01-00.00.00.000000"
I would like to query the table to display the output as the day of the week (Example - 2006-01-01-00.00.00.000000 would display as "Sunday")
Here's the hard part, I have an existing query pulling other information out of the table as well and I would like to do everything in 1 query if possible.
Query example -
Code:
db2 -ec "SELECT TDB.TB_RF_DAY.datetime AS DATE, TDB.TB_RF_DAY.BANK_HOLIDAY AS HOLIDAY, TDB.TB_RF_DAY.DATETIME AS DAY_OF_THE_WEEK, TDB.TB_RF_DAY.SEQUENCE_NO AS SEQUENCE_DATE from TDB.TB_RF_DAY WHERE BATCH_ID=2"
The second reference (TDB.TB_RF_DAY.DATETIME AS DAY_OF_THE_WEEK) to the DATETIME field is where I would like to have my conversion done.
Thanks in advance.
