Hello,
I am trying to write some DB2 queries to do following activity. Can you help me with you suggestions..
A). I need to INSERT a date in the format YYYY-MM-01 to the date field where YYYY is current year and MM is current month + 1.
Example, for today(07/18/13) it would be 2013-08-01
B). I need to write a UPDATE query with SET date as MM/01/YYYY format where YYYY is current year and MM is current month + 1.
Example, for today(07/18/13) it would be 08/01/2013
C). I need to write SELECT query with WHERE clause as YYYY/MM format where YYYY is current year and MM is current month.
Example, for today(07/18/13) it would be 2013/07
Any suggestions would be appreciated. Thanks
I am trying to write some DB2 queries to do following activity. Can you help me with you suggestions..
A). I need to INSERT a date in the format YYYY-MM-01 to the date field where YYYY is current year and MM is current month + 1.
Example, for today(07/18/13) it would be 2013-08-01
B). I need to write a UPDATE query with SET date as MM/01/YYYY format where YYYY is current year and MM is current month + 1.
Example, for today(07/18/13) it would be 08/01/2013
C). I need to write SELECT query with WHERE clause as YYYY/MM format where YYYY is current year and MM is current month.
Example, for today(07/18/13) it would be 2013/07
Any suggestions would be appreciated. Thanks