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

Changing the order of cursor fetch


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Mar 15, 2008 7:30 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Mar 15, 2008 8:08 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Mar 15, 2008 8:15 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Mar 15, 2008 10:16 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 15, 2008 10:49 pm
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 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 changing defaults in db2 admin - Unlo... DB2 0
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Code Multi Row fetch in PL1 program PL/I & Assembler 1
No new posts Need to fetch data from so many DB2 t... DB2 9
Search our Forums:

Back to Top