Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Ascending Cursor for multiple index

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
yourchoice_amit

New User


Joined: 01 Sep 2005
Posts: 5
Location: Mysore

PostPosted: Sun Apr 05, 2009 8:44 pm    Post subject: Ascending Cursor for multiple index
Reply with quote

Hi,

I need to code a ascending cursor for a table with the following index,

DATE
TYPE
PRICE
CONTRA (NULL exist)
ADD_TIMESTAMP

Can anybody help me in writing a cursor to fetch the rows in an ascending pattern. My ORDER_BY preference would be in the order mentioned above.


Thanks in Advance.
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: Mon Apr 06, 2009 3:22 am    Post subject:
Reply with quote

Hello,

Where is the difficulty? Declare the cursor as

select from..
where. . .
order by . . .

If you are having problems (syntax or undesired sql return codes), post your code and the error(s) and someone will be able to clarify.
Back to top
View user's profile Send private message
yourchoice_amit

New User


Joined: 01 Sep 2005
Posts: 5
Location: Mysore

PostPosted: Mon Apr 06, 2009 9:09 pm    Post subject:
Reply with quote

how do i give a WHERE clause for CONTRA which has NULL values and VALID Alpha numeric in it.
???
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Apr 06, 2009 9:55 pm    Post subject:
Reply with quote

Amit .. are you concerned about your order by or where clause ...
post the current SQL and the problem you are facing with an example ...
it would be easy for us to help ...
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 Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us