for   
Save 
Save 
   Join IIUG  

Informix News
16 October 08 - VendorRate - Informix Earns Top Customer Satisfaction Score on VendorRate in Q3... Read
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read

Previous news items
 

Home Member Area About IIUG


Resources
IIUG Insider
IIUG Hotspots
IBM-Informix Links
IIUG RSS Feeds
Software Repository
Informix Products
Online Resources
Informix Library
Informix Books
IIUG Banners
Discussion
Technical Special
  Interest Groups

Other Discussion
Community
Events
Webcasts/Chat w Lab
IIUG TV
IIUG Sponsors
Informix Business Directory
IIUG Press Partners
Local User Groups
Rate the Vendor
Job Board
Fun Stuff

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Development Tools Forum

Re: migrate from oracle start with/ connect by

Posted By: Art Kagel
Date: Monday, 18 August 2008, at 9:28 p.m.

In Response To: migrate from oracle start with/ connect by (CHUAN LU)

See the Guide to SQL Tutorial, Guide to SQL Reference, Guide to SQL Syntax,
and DBaccess manuals.

In Informix you connect similarly:

You can run a script containing the commands as:

dbaccess - - < myscript.sql

or use a 'here' script, the commands are the same:

dbaccess - - <<EOF
connect to mydatabase@myserver user 'mylogin';
Password: mypassword

select * from emp;
EOF

Art

On Mon, Aug 18, 2008 at 8:14 PM, CHUAN LU <luchuan@cn.ibm.com> wrote:

> Do anybody know how to migrate from oracle start with /connec by to
> informix
> in SP?
> Oracle's sample like this.
> SQL> conn scott/tiger
> Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
> Connected as scott
>
> SQL> select * from emp;
>
> EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
> ----- ---------- --------- ----- ----------- --------- --------- ------
> 7369 SMITH CLERK 7902 1980-12-17 800.00 20
> 7499 ALLEN SALESMAN 7698 1981-2-20 1600.00 300.00 30
> 7521 WARD SALESMAN 7698 1981-2-22 1250.00 500.00 30
> 7566 JONES MANAGER 7839 1981-4-2 2975.00 20
> 7654 MARTIN SALESMAN 7698 1981-9-28 1250.00 1400.00 30
> 7698 BLAKE MANAGER 7839 1981-5-1 2850.00 30
> 7782 CLARK MANAGER 7839 1981-6-9 2450.00 10
> 7788 SCOTT ANALYST 7566 1987-4-19 3000.00 20
> 7839 KING PRESIDENT 1981-11-17 5000.00 10
> 7844 TURNER SALESMAN 7698 1981-9-8 1500.00 0.00 30
> 7876 ADAMS CLERK 7788 1987-5-23 1100.00 20
> 7900 JAMES CLERK 7698 1981-12-3 950.00 30
> 7902 FORD ANALYST 7566 1981-12-3 3000.00 20
> 7934 MILLER CLERK 7782 1982-1-23 1300.00 10
>
> 14 rows selected
>
> SQL> insert into emp(empno, ename, mgr, deptno)
> values(9999,'Menglk_9',null,10);
>
> 1 row inserted
>
> SQL> insert into emp(empno, ename, mgr, deptno)
> values(8888,'Menglk_8',7788,10);
>
> 1 row inserted
>
> SQL> commit;
>
> Commit complete
>
> SQL> select * from emp;
>
> EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
> ----- ---------- --------- ----- ----------- --------- --------- ------
> 7369 SMITH CLERK 7902 1980-12-17 800.00 20
> 7499 ALLEN SALESMAN 7698 1981-2-20 1600.00 300.00 30
> 7521 WARD SALESMAN 7698 1981-2-22 1250.00 500.00 30
> 7566 JONES MANAGER 7839 1981-4-2 2975.00 20
> 7654 MARTIN SALESMAN 7698 1981-9-28 1250.00 1400.00 30
> 7698 BLAKE MANAGER 7839 1981-5-1 2850.00 30
> 7782 CLARK MANAGER 7839 1981-6-9 2450.00 10
> 7788 SCOTT ANALYST 7566 1987-4-19 3000.00 20
> 7839 KING PRESIDENT 1981-11-17 5000.00 10
> 7844 TURNER SALESMAN 7698 1981-9-8 1500.00 0.00 30
> 7876 ADAMS CLERK 7788 1987-5-23 1100.00 20
> 7900 JAMES CLERK 7698 1981-12-3 950.00 30
> 7902 FORD ANALYST 7566 1981-12-3 3000.00 20
> 7934 MILLER CLERK 7782 1982-1-23 1300.00 10
> 9999 Menglk_9 10
> 8888 Menglk_8 7788 10
>
> 16 rows selected
> SQL> select level, lpad(' ',level*2,' ')||ename, t.* from emp t start with
> mgr
> is null connect by mgr=prior empno;
>
> LEVEL LPAD('',LEVEL*2,'')||ENAME EMPNO ENAME JOB MGR HIREDATE SAL COMM
> DEPTNO
> ---------- ---------------------------- ----- ---------- --------- -----
> ----------- --------- --------- ------
>
> 1 KING 7839 KING PRESIDENT 1981-11-17 5000.00 10
>
> 2 JONES 7566 JONES MANAGER 7839 1981-4-2 2975.00 20
>
> 3 SCOTT 7788 SCOTT ANALYST 7566 1987-4-19 3000.00 20
>
> 4 ADAMS 7876 ADAMS CLERK 7788 1987-5-23 1100.00 20
>
> 4 Menglk_8 8888 Menglk_8 7788 10
>
> 3 FORD 7902 FORD ANALYST 7566 1981-12-3 3000.00 20
>
> 4 SMITH 7369 SMITH CLERK 7902 1980-12-17 800.00 20
>
> 2 BLAKE 7698 BLAKE MANAGER 7839 1981-5-1 2850.00 30
>
> 3 ALLEN 7499 ALLEN SALESMAN 7698 1981-2-20 1600.00 300.00 30
>
> 3 WARD 7521 WARD SALESMAN 7698 1981-2-22 1250.00 500.00 30
>
> 3 MARTIN 7654 MARTIN SALESMAN 7698 1981-9-28 1250.00 1400.00 30
>
> 3 TURNER 7844 TURNER SALESMAN 7698 1981-9-8 1500.00 0.00 30
>
> 3 JAMES 7900 JAMES CLERK 7698 1981-12-3 950.00 30
>
> 2 CLARK 7782 CLARK MANAGER 7839 1981-6-9 2450.00 10
>
> 3 MILLER 7934 MILLER CLERK 7782 1982-1-23 1300.00 10
>
> 1 Menglk_9 9999 Menglk_9 10
>
>
>
> *******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>

--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity with
which I am affiliated nor those of the entities themselves.

Messages In This Thread

  • migrate from oracle start with/ connect by
    CHUAN LU -- Monday, 18 August 2008, at 8:14 p.m.
    • Re: migrate from oracle start with/ connect by
      Art Kagel -- Monday, 18 August 2008, at 9:28 p.m.
      • Re: migrate from oracle start with/ connect by
        CHUAN LU -- Monday, 18 August 2008, at 11:49 p.m.
      • Re: migrate from oracle start with/ connect by
        Jonathan Leffler -- Monday, 18 August 2008, at 11:51 p.m.

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Development Tools Forum is maintained by Administrator with WebBBS 5.12.

©2001 - 2007 International Informix Users Group.   All rights reserved.     Terms of use    
*** Powered By IBM Informix Dynamic Server V10.00 ***