Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Changing the order of cursor fetch

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

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Sat Mar 15, 2008 7:04 pm    Post subject: Changing the order of cursor fetch
Reply with quote

Hi,

I've two columns employee name and type
Emp Type
George AB
George SJ
George SH
George ZA
George 12
George 13

Anand SJ
Anand SH

I'm using a cursor and grouping it by employee name.
Is it possible to take SH records first and then the other records?

The order of fetch i want is
Emp Type

George SH
George AB
George SJ
George ZA
George 12
George 13

Anand SH
Anand SJ

I'm sure there must be a way. Pl give your opinion.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Sat Mar 15, 2008 7:30 pm    Post subject: Reply to: [b]Changing the order of cursor fetch???[/b]
Reply with quote

You already asked the same question even if with different data and column names,
it should not be difficult to apply to this case the same technique that was explained to You in the other thread
Back to top
View user's profile Send private message
lanand_hps

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Sat Mar 15, 2008 7:56 pm    Post subject:
Reply with quote

I didn't get correct answer for the other thread.
I'm presenting the question in a different manner so that ppl would appreciate the query better.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Sat Mar 15, 2008 8:08 pm    Post subject: Reply to: Changing the order of cursor fetch
Reply with quote

did You test it ?
what makes You think that You will get a different/better reply from reposting ?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Sat Mar 15, 2008 8:15 pm    Post subject: Reply to: Changing the order of cursor fetch
Reply with quote

the solution give in the other post was good, even if with a glitch/typo
what about doing a little bit of reading the manuals Yourself
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnsqk10/2.22.8?ACTION=MATCHES&REQUEST=select+case&TYPE=FUZZY&SHELF=DSNSHKA0&DT=20070125023435&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
lanand_hps

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Sat Mar 15, 2008 9:18 pm    Post subject: Reply to: Changing the order of cursor fetch
Reply with quote

I tested it. It didnt work.
Thanks for the link anyways. It was useful.

But what I was wanted was different friend...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Sat Mar 15, 2008 10:16 pm    Post subject: Reply to: Changing the order of cursor fetch
Reply with quote

If You posted the db2 release level icon_confused.gif
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: Sat Mar 15, 2008 10:49 pm    Post subject:
Reply with quote

Hello,

Quote:
I tested it. It didnt work.
So, how did it not work?

For you to get "better" results from the forum, you have to provide proper feedback. If the "other" reply did not meet your request, why did you not reply back to that topic with this info? When someone posts a reply to a "how to" question (and you won't take the time to reply that you did not understand what they posted or that it did not work), people here believe your request was satisfactorily answered.

Starting the same question as a new topic just introduces clutter for us and does you no good either.
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us