Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
Author Message
sasanka
Warnings : 1

New User


Joined: 18 Jan 2008
Posts: 34
Location: India

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

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, 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: 165
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: 34
Location: India

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

Active Member


Joined: 22 Aug 2006
Posts: 743
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

Active Member


Joined: 13 Feb 2004
Posts: 551
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: 34
Location: India

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSORT control statements in any order ? ronald masters DFSORT/ICETOOL 2 Tue Dec 15, 2015 11:22 pm
No new posts Retrieve records in the order of alte... jacobdng Compuware & Other Tools 8 Fri Jul 31, 2015 8:16 am
No new posts Order to search CLIST if using ALTLIB... jackzhang75 CLIST & REXX 11 Thu Apr 23, 2015 8:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us