MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COUNT (*)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Bhaskar
Beginner


Joined: 06 Jun 2004
Posts: 12
Topics: 5

PostPosted: Tue Jun 08, 2004 5:17 am    Post subject: COUNT (*) Reply with quote

Hello,

I have a query...'select count (*) from TABLE where AGE < 40 ;'
The output will be 30.
Now... without changing the query I need to restrict the output to 10.
Any help please.

Rgds,
Bhaskar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Jun 08, 2004 5:30 am    Post subject: Reply with quote

Bhaskar,

I must say this is one of the weird question I have ever come across.

If you are running this query in spufi, you can edit the output spufi dataset. If you are running this in a cobol pgm, you can move 10 to the host variable containg the count.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bhaskar
Beginner


Joined: 06 Jun 2004
Posts: 12
Topics: 5

PostPosted: Tue Jun 08, 2004 5:42 am    Post subject: Reply with quote

Kolusu,

Hope that I have not conveyed properly.
I have a PLI pgm with the delete...... query.The count of the recs are 12000 which I can delete in a single shot (getting error).
So I thought of splitting it into 4 sets.At the same time I should not edit the pgm too where the Delete query exists.
I am just searching for a soln to over come these crisis.

Rgds,
Bhaskar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Jun 08, 2004 7:51 am    Post subject: Reply with quote

Bhaskar,

Your posts do not make any sense and it is hard to provide you an answer when we don't know what the question is. Please follow the rules especially rule # 4 (Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.)

This is what I figured out from your posts.

You have a file and using this file you need to delete records of a DB2 table. Is that right?

You need to provide us the error you are getting when you tried to delete all recs from the file. Do you have an error sql code ?

I don't think splitting the file into 4 different files will serve the purpose here.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group