lenygold via DBMonster.com wrote:
I find this expression in Oracle query:
cast(convert(char(10)
,dateadd(d,i,start),120) as datetime ) as
taskday. How to convert it in DB2?
Thank's in advance LENY g.
As far as I know, "dateadd" is neither an Oracle nor a DB2 function.
Your query is probably written for MS Access or for Transact-SQL (MS SQL
Server or Sybase).
You will find some info on converting MS SQL Server's "dateadd"-function to
DB2 in this Redbook:
"Microsoft SQL Server to IBM DB2 UDB Conversion Guide" (Chapter 4.3.3)
http://www.redbooks.ibm.com/redbooks/pdfs/sg246672.pdf
You may also want to have a look at Graeme Birchall's "DB2 SQL Cookbook".
It has excellent examples of DB2's SQL 'dialect' and an extensive list of
DB2 Functions.
http://mysite.verizon.net/Graeme_Birchall/id1.html
HTH
Cheers!
--
Jeroen