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

What's the best way of creating a empty resultset?


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

New User


Joined: 16 Feb 2007
Posts: 2
Location: U.S.A

PostPosted: Thu Mar 08, 2007 8:31 pm
Reply with quote

I am working on a Stored Procedure which needs to return up to 5 resultsets based on different conditions. In some situation, the last 2 resultsets should be non-applicable therefore I am planning to return just empty resultsets. What's the best way of handling this? I don't want to create GTT table because of the overhead involved.

Thanks for your advise
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 09, 2007 4:48 am
Reply with quote

I've got no idea what a "GTT table" is, but what constitutes an "empty resultset"? An SQL code indicating "no rows returned"?
Do not forget, you can select rows that are impossible to qualify for.
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 Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts EMPTY file check scenario JCL & VSAM 6
No new posts Creating CSV file from Variable recs ... DFSORT/ICETOOL 11
Search our Forums:

Back to Top