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

Multiple ORDER BY clause in a SQL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
herewego

New User


Joined: 20 Feb 2006
Posts: 14

PostPosted: Thu Mar 05, 2009 7:01 pm
Reply with quote

Can we use multiple ORDER BY Clause in a SQL.

Let's consider I have a requirement where I need to sort the data in two different ways based on one of the input field which I will be using in my where condition.

Thanks,
Herewego
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Thu Mar 05, 2009 8:13 pm
Reply with quote

Dynamic SQL or else different SQLs for different Inputs ....
Back to top
View user's profile Send private message
ajeshrn

New User


Joined: 25 Mar 2009
Posts: 78
Location: India

PostPosted: Thu Apr 09, 2009 10:57 am
Reply with quote

Hi,

We can do this through Dynamic SQL.Can some one tell whether this can be done through our Static SQl statements.

Thanks
Ajesh R N
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: Thu Apr 09, 2009 7:42 pm
Reply with quote

Hello,

No, you can't.

As Ashimer already posted:
Quote:
Dynamic SQL or else different SQLs for different Inputs ....
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts Rotate partition-logical & physic... DB2 0
Search our Forums:

Back to Top