Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Regarding use of ORDER BY ORDER OF in SQL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
sasanka
Warnings : 1

New User


Joined: 18 Jan 2008
Posts: 6
Location: chennai

PostPosted: Mon Jun 16, 2008 2:06 pm    Post subject: Regarding use of ORDER BY ORDER OF in SQL
Reply with quote

Hi,

What is ORDER BY ORDER OF clause in SQL? Please explain me its use with examples.

Thanks & Regards,
sasanka
Back to top
View user's profile Send private message
References
Gnanas SNG

Senior Member


Joined: 06 Sep 2007
Posts: 440
Location: India

PostPosted: Mon Jun 16, 2008 4:08 pm    Post subject: Re: Regarding use of ORDER BY ORDER OF in SQL
Reply with quote

sasanka wrote:
Hi,

What is ORDER BY ORDER OF clause in SQL?


Where did you find it?
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 168
Location: Bangalore

PostPosted: Mon Jun 16, 2008 5:10 pm    Post subject:
Reply with quote

can you please post the complete query
Back to top
View user's profile Send private message
sasanka
Warnings : 1

New User


Joined: 18 Jan 2008
Posts: 6
Location: chennai

PostPosted: Tue Jun 17, 2008 4:59 pm    Post subject: Re: Regarding use of ORDER BY ORDER OF in SQL
Reply with quote

Gnanas SNG wrote:
sasanka wrote:
Hi,

What is ORDER BY ORDER OF clause in SQL?


Where did you find it?


It is given in a book(but i forgot its name) there this clause is used in the sub-query and in the main query ORDER BY clause is also present. But it sorts the final results according to the sub-query because of ORDER BY ORDER OF clause.
Can anyone explain its use with example.
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 625
Location: Germany

PostPosted: Tue Jun 17, 2008 5:16 pm    Post subject:
Reply with quote

Hi !

The book could be DB2 V9.1 for Z/OS Appl.Programming.
have a look at chapter: Preserving the order of a derived table.

There's what you want.
Back to top
View user's profile Send private message
ashimer

Senior Member


Joined: 13 Feb 2004
Posts: 360
Location: Bangalore

PostPosted: Tue Jun 17, 2008 5:31 pm    Post subject:
Reply with quote

This is something new introduced in DB2 V9 .. where you can order by subselect ... check the DB2V9 SQL Cookbook and you will get enough examples ...
Back to top
View user's profile Send private message
sasanka
Warnings : 1

New User


Joined: 18 Jan 2008
Posts: 6
Location: chennai

PostPosted: Fri Aug 08, 2008 10:13 am    Post subject:
Reply with quote

please give me one example
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8720
Location: 221 B Baker St

PostPosted: Fri Aug 08, 2008 7:28 pm    Post subject:
Reply with quote

Hello,

The material contains multiple examples.

If you have found something in tha material that you do not understand, you should post what you found and which part of it you do not understand. SOmeone here shoulde be able to clarify or profide some direction.

Another place to look is here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqk10/4.2.8?
which is available via the "IBM Lnks" at the top of the page.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1