Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 3270 Data stream error Benchwarmer CICS 4 Tue Apr 17, 2018 12:06 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts IMS error U4038 while executing my PL... abdulrafi IMS DB/DC 2 Thu Feb 08, 2018 1:05 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us