|
|
| Author |
Message |
sasanka Warnings : 1 New User
Joined: 18 Jan 2008 Posts: 6 Location: chennai
|
|
|
|
Hi,
What is ORDER BY ORDER OF clause in SQL? Please explain me its use with examples.
Thanks & Regards,
sasanka |
|
| Back to top |
|
 |
References
|
Posted: Mon Jun 16, 2008 2:06 pm Post subject: Re: Regarding use of ORDER BY ORDER OF in SQL |
 |
|
|
 |
Gnanas SNG
Senior Member
Joined: 06 Sep 2007 Posts: 415 Location: India
|
|
|
|
| sasanka wrote: |
Hi,
What is ORDER BY ORDER OF clause in SQL? |
Where did you find it? |
|
| Back to top |
|
 |
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 168 Location: Bangalore
|
|
|
|
| can you please post the complete query |
|
| Back to top |
|
 |
sasanka Warnings : 1 New User
Joined: 18 Jan 2008 Posts: 6 Location: chennai
|
|
|
|
| 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 |
|
 |
UmeySan
Senior Member
Joined: 22 Aug 2006 Posts: 624 Location: Germany
|
|
|
|
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 |
|
 |
ashimer
Senior Member
Joined: 13 Feb 2004 Posts: 344 Location: Bangalore
|
|
|
|
| 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 |
|
 |
sasanka Warnings : 1 New User
Joined: 18 Jan 2008 Posts: 6 Location: chennai
|
|
|
|
| please give me one example |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7916 Location: 221 B Baker St
|
|
| Back to top |
|
 |
|
|