473,382 Members | 1,377 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,382 software developers and data experts.

Converting Oracle Query to DB2 Query

Hi ,
How to convert the below Oracle Query to DB2. The Query is working fine in Oracle but not in DB2. Please Help.

Query:
Expand|Select|Wrap|Line Numbers
  1.     Select f.folder_id, f.identifier
  2.             From FOLDER f, STOREENT se
  3.             Where f.type = 'AttributeFolder'
  4.                 And se.storeent_id = f.storeent_id  
  5.                 And se.identifier = 'Global_CAS'
  6.                 And f.identifier = 10051  
  7.             connect by prior f.folder_id = f.parentfolder_id
  8.             start with f.identifier = 'Categories Descriptors [Global.B2C.Sales]'
Thanks In Advance
Venmathi
May 27 '14 #1
3 2600
Anas Mosaad
185 128KB
Please check Serge's article on converting such queries http://www.ibm.com/developerworks/da...dm-0510rielau/
Jun 21 '14 #2
I guess "connect by" is not supported in DB2, use JOIN.
Jun 22 '14 #3
Anas Mosaad
185 128KB
Connect by is supported in DB2 in the compatibility mode. This mode was added since 9.7. If you have 9.7 or later, you can use it if you enable the compatibility. If you have earlier versions or prefer not to go in the compatibility mode, you can use the details in Serge's article referenced earlier.

9.7 ===> http://www-01.ibm.com/support/knowle...7.html?lang=en

10.1 ===> http://www-01.ibm.com/support/knowle...7.html?lang=en

10.5 ===> http://www-01.ibm.com/support/knowle...7.html?lang=en
Jun 22 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
1
by: Mike Landis | last post by:
Hello, Has anyone a small tool or somekind of document which could help me to convert Oracle SQL scripts to SQL Server? Scripts are not very Oracle specified. Thanks, Below is a Script...
1
by: Ixnay | last post by:
Hello, I am new to sql*server, but have used Oracle for years. Can anyone recommend a good online guide for converting all the Oracle SQL I know to TSQL? tia, Mike
19
by: DW | last post by:
Hi, all... I have a sizeable database running under Oracle 9.2.0.4 under AIX 5.2.0. I am faced with an impending move to a Windows environment, running under SQL 2000. Currently, we are...
2
by: z | last post by:
Is there a tool for converting oracle scripts to db2? In particular I want to convert oracle example script hr_main.sql to db2. I imagine it might not be difficult to do by hand, for this...
1
by: rubinamunir | last post by:
Hi. i need help in insert query . i am working in php and oracle there i need insert datetime.i don't know the format please tell me how can i insert date with time in oracle and wht must...
1
by: Magnus Flisberg | last post by:
Best programmer, My mission is to execute a sql statement in vb.net and retrive the data into a file. I have managed to detect som issues with my code: queryString = "SELECT ...." ...
2
by: iitt2007 | last post by:
I need to convert Oracle SQL SPs and functions to SQL 2005. Table and columns names do match. Is there any tool which will 'convert' Oracle script yntax to to SQL 2005 syntax? I can't install it on...
1
ollyb303
by: ollyb303 | last post by:
Hello, I have been using the following expression in Access as part of a statement to query an Oracle database: (Sum(CASE WHEN STATS_DAILY_SA.LOGIN_TIME > (STATS_DAILY_SA.SCHEDULED_TIME -...
0
by: Harald V | last post by:
Hi, i like to do a query that shows me all added lines to a table at the end of the day (used for storing a repository file list). At 23:59 i like to invoke a cron job script that makes a query....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.