View previous topic :: View next topic |
Author |
Message |
Bhaskar Beginner
Joined: 06 Jun 2004 Posts: 12 Topics: 5
|
Posted: Tue Jun 08, 2004 5:17 am Post subject: COUNT (*) |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Jun 08, 2004 5:30 am Post subject: |
|
|
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 |
|
|
Bhaskar Beginner
Joined: 06 Jun 2004 Posts: 12 Topics: 5
|
Posted: Tue Jun 08, 2004 5:42 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Jun 08, 2004 7:51 am Post subject: |
|
|
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 |
|
|
|
|