IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding use of ORDER BY ORDER OF in SQL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Mon Jun 16, 2008 4:08 pm
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
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
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: 771
Location: Germany

PostPosted: Tue Jun 17, 2008 5:16 pm
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
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Fri Aug 08, 2008 7:28 pm
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:
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Rotate partition-logical & physic... DB2 0
No new posts DB2 Load - Sort Or order BY DB2 1
No new posts GDG all in sequence order JCL & VSAM 9
No new posts Combining more 4 files with sorted or... DFSORT/ICETOOL 3
No new posts how to show listing in physical locat... PL/I & Assembler 2
Search our Forums:

Back to Top