473,408 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

conversion from db2 to oracle

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.

--
Message posted via http://www.dbmonster.com

Jul 29 '08 #1
3 4030
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.
DATEADD is not an Oracle function. Oracle dates are dates, not strings.
Also, in Oracle, dates should be stored as the DATE or TIMESTAMP data
types not as a character string.
--
Daniel A. Morgan
University of Washington
da******@x.washington.edu (replace x with u to respond)
Jul 29 '08 #2
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
Jul 29 '08 #3
THANK YOU VERY MUCH FOR YOUR HELP.

The Boss 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!
--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums....m-db2/200807/1

Jul 29 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kamal | last post by:
PHP 4.3.4 on Apache 2.0.48 on Linux Red Hat 8.0 Kernel 2.4.18-14smp with Oracle 9iR2. I have this code: <html> <body> <?php
133
by: jonathan | last post by:
hey all, I realize that this question might pop up from time to time, but I haven't seen it a while and things might of changed, so - Right now (July 2004) how does mysql stand up in...
1
by: Jyrki H | last post by:
We have done a complex software with VB using SQL Server through ADO. Now our customer is planning to switch from SQL Server to Unix/Aix Oracle 8 DB. I'm a newbie both in Oracle and Unix and...
5
by: Shock | last post by:
Hello all, I am doing some research on database conversions. Currently, I am interested in any information that would help me convert a database from one schema to another. This could be...
1
by: Jim Shank | last post by:
I am adding support to my application for Oracle 10g and using Enterprise Library Data Access Application Blocks and trying to determine the best way to convert the GUID's which are stored as...
3
by: mailar | last post by:
HI, Can anyone tell me how is a multi_byte to single byte and vice versa conversion done in DB2. It would be great even if someone can tell me how Oracle does it? Oracle already has functions...
1
by: bala | last post by:
Hi Access Gurus The MS Access DB (MS Access 2002 Database) which is currently serving as the backend Database to MS Access (MS Access 2002/XP) frontend needs to be converted to Oracle 8i Backend...
0
by: alok | last post by:
i having problem in oracle 9i dataBase------ i want to convert my oracle data to sql 2000.....but i cant convert the hindi data from oracle to sql 2000... means...... i having table in...
0
by: Tom Gugger | last post by:
OMNI GROUP tgugger@buckeye-express.com 419-380-8853 ORACLE DBA WITH CONVERSION EXPERIENCE
4
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.