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 

SQL QUERY PROBLEM

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


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Fri Jul 18, 2008 11:57 am    Post subject: SQL QUERY PROBLEM Reply with quote

Hi All,

Herein I am getting a problem.

I am quering a table in the below mentioned way:

SELECT COUNT(*)
FROM
TABLE1;
---------+---------+---

---------+---------+---
0



SELECT *
FROM
TABLE1;
---------+---------+---------+---------+---------+---------+---
RID OPSEQ OPCODE OPCOMB OPHOURS OPTECHID
---------+---------+---------+---------+---------+---------+---
1 1 860991 1.5 709051650
2 1 001013 2.0 533730792
3 1 001013 2.0 533730792


and I am getting the data when I am using the above query with Select * but not giving the count if i am giving SELECT COUNT(*)

Please suggest me.
_________________
Satya
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Fri Jul 18, 2008 1:49 pm    Post subject: Reply with quote

found the answer..
_________________
Satya
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Jul 18, 2008 11:28 pm    Post subject: Reply with quote

Please share the solution for our benefit.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 21, 2008 10:56 am    Post subject: Reply with quote

Terry,

I was asking if anyone found the answer. Sorry, If it meant that I found the answer.

What I did was I ran Runstats.
But no effect.
_________________
Satya
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Jul 21, 2008 11:22 am    Post subject: Reply with quote

If you get 3 rows in the SELECT *, you should get 3 as the result of SELECT COUNT(*). I saw something similar a long time ago with a huge table that was resolved by running a reorg.
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 21, 2008 1:06 pm    Post subject: Thanks Sharon Reply with quote

Thanks I will reorg and see if the problem gets solved.
_________________
Satya
Back to top
View user's profile Send private message
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