dbTalk Databases Forums  

Counting Records

comp.databases.oracle.server comp.databases.oracle.server


Discuss Counting Records in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default Counting Records - 08-01-2011 , 10:16 AM






Hi,

I have a table with 3 nested tables in it. I want to be able to
return the number of rows retrieved from each nested table in my
result set.

This cannot be just a simple count, as if the nested tables have 100
rows each, but the result set selects 10 from nested table 1, 50 from
nested table 2 & 25 from nested table 3.

Is there a way for me to get this count?

Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Counting Records - 08-01-2011 , 11:27 AM






On Mon, 01 Aug 2011 08:16:08 -0700, The Magnet wrote:

Quote:
Hi,

I have a table with 3 nested tables in it. I want to be able to return
the number of rows retrieved from each nested table in my result set.

This cannot be just a simple count, as if the nested tables have 100
rows each, but the result set selects 10 from nested table 1, 50 from
nested table 2 & 25 from nested table 3.

Is there a way for me to get this count?
Yup. Truncate all 3 tables and do "select 0 from dual".



--
http://mgogala.byethost5.com

Reply With Quote
  #3  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Counting Records - 08-01-2011 , 03:01 PM



"The Magnet" <art (AT) unsu (DOT) com> a écrit dans le message de news: 93486fc1-ada5-4c6e-8ca7-a66c55ee1003...oglegroups.com...
Quote:
Hi,

I have a table with 3 nested tables in it. I want to be able to
return the number of rows retrieved from each nested table in my
result set.

This cannot be just a simple count, as if the nested tables have 100
rows each, but the result set selects 10 from nested table 1, 50 from
nested table 2 & 25 from nested table 3.

Is there a way for me to get this count?
Test case ?

Regards
Michel

Reply With Quote
  #4  
Old   
TheBoss
 
Posts: n/a

Default Re: Counting Records - 08-01-2011 , 03:52 PM



The Magnet <art (AT) unsu (DOT) com> wrote in news:93486fc1-ada5-4c6e-8ca7-
a66c55ee1003 (AT) eb9g2000vbb (DOT) googlegroups.com:

Quote:
Hi,

I have a table with 3 nested tables in it. I want to be able to
return the number of rows retrieved from each nested table in my
result set.

This cannot be just a simple count, as if the nested tables have 100
rows each, but the result set selects 10 from nested table 1, 50 from
nested table 2 & 25 from nested table 3.

Is there a way for me to get this count?
Redesign to properly normalised parent/child tables.

--
Jeroen

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.