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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am


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