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
 
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: 10308
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: 10308
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: 10308
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: 10308
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 Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am

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