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

Cursor order by 1


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

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Mon Jan 12, 2009 10:43 am
Reply with quote

Hi ,

i want to know what does teh syntax below means i.e order by 1

Code:
EXEC SQL   
     DECLARE Z1 CURSOR WITH HOLD FOR
            SELECT I_ACCT                       
                  ,C_TYP_REQ                     
                  ,C_AUCTN_HSE                   
              FROM Z.ZCTTTLQ                     
             WHERE I_ACCT = :TEMP-ACCT           
           AND NOT C_TYP_REQ = 'P'               
          ORDER BY 1                             

END-EXEC       

Thanks,
Jaspal

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Jan 12, 2009 10:52 am
Reply with quote

Click on IBM Manuals at the top of the screen and look at the DB2 SQL Reference Manual.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Jan 12, 2009 3:08 pm
Reply with quote

It means order by first col ... which is I_ACCT
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jan 12, 2009 3:17 pm
Reply with quote

Hi,

Teryy has given you a right direction, however here is a rather polite day for me..so check this link & search on "By 1"

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_sql_fullselect.htm

Good Luck.
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