Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Gettig error in fetching the no of rows in SQL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
janardhana Reddy

New User


Joined: 20 Oct 2004
Posts: 17
Location: Bangalore

PostPosted: Thu Oct 21, 2004 1:18 pm    Post subject: Gettig error in fetching the no of rows in SQL
Reply with quote

Hi all

I am getting the result for for the following query.
Select * from table_name;

now gettig the error in fetching the no. of rows from the below query.

select count(*) from table_name;


What does it mean ?
Back to top
View user's profile Send private message

unna

New User


Joined: 15 Oct 2004
Posts: 17

PostPosted: Thu Oct 21, 2004 6:35 pm    Post subject:
Reply with quote

Hi Jana,

count * in the select statement will display the number of rows in a tableand will not fetch the rows from the table.

Regards,
Back to top
View user's profile Send private message
janardhana Reddy

New User


Joined: 20 Oct 2004
Posts: 17
Location: Bangalore

PostPosted: Mon Oct 25, 2004 10:33 am    Post subject:
Reply with quote

Hi Unna,

not getting the result for the query select count(*) from table name
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Oct 26, 2004 1:54 am    Post subject:
Reply with quote

Hi Janardhana,

Try this:

select count(*) as rcdcnt from table_name;
Back to top
View user's profile Send private message
janardhana Reddy

New User


Joined: 20 Oct 2004
Posts: 17
Location: Bangalore

PostPosted: Tue Oct 26, 2004 11:08 am    Post subject:
Reply with quote

Hi all,

My query is Select count(*) from se_number;

and not getting result for the above query.

Getting the rows for Select * from Se_number;


Finally i got the reason , no index exists for that table.
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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us