COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: hanht on 16 Nov 2012 01:41:42 AM

Title: Table size?
Post by: hanht on 16 Nov 2012 01:41:42 AM
Hi,

can we know how many rows and columns in an exist table? Is Cognos report having an attribute to show that?

Appreciate all your help! :)
Title: Re: Table size?
Post by: nsaha on 16 Nov 2012 07:26:08 AM
Hi hanht,

Do u want to count the no of rows/columns from Cognos Report side or Framework Manager side?I think if you count the no of rows from Framework Manager then it will b better and more accurate.Anyways u can also count it from Report Studio.Just drag the column ( primary key ) of that table and set the attribute as count.It will give you the count of rows of that table.
Title: Re: Table size?
Post by: blom0344 on 17 Nov 2012 06:44:07 AM
Information like this is typically stored in DBA table / views.  If statistics are kept up to date, you can find information in the appropriate tables (depending on which database you use) on the cardinality of keys and indices.  If you actually want to perform a count against a data table, then counting a column that has an unique index set will result in a much more efficient result, cause existing information is used.  This is the same info that is used by the database optimizer
Title: Re: Table size?
Post by: hanht on 19 Nov 2012 08:23:05 PM
Hi nsaha & blom0344,

Thank you for your advices, but i means the table we draged to report studio, after we did many things(add blocks, charts, crosstabs,...), we can't see clearly & we also don't remember how many rows & columns we chose at the beginning.
So can we have any ways to know table's numbers of rows & columns on our old report?

Regards
Title: Re: Table size?
Post by: blom0344 on 20 Nov 2012 02:05:06 AM
You mean the factual input of prompts or the definition of the query filters?  The report itself is just a metadata definition. The data is contains after execution depends on the datasource, the prompt(s) input and the filters defined against the queries
Title: Re: Table size?
Post by: Lynn on 20 Nov 2012 01:03:39 PM
Quote from: hanht on 19 Nov 2012 08:23:05 PM
Hi nsaha & blom0344,

Thank you for your advices, but i means the table we draged to report studio, after we did many things(add blocks, charts, crosstabs,...), we can't see clearly & we also don't remember how many rows & columns we chose at the beginning.
So can we have any ways to know table's numbers of rows & columns on our old report?

Regards

Are you familiar with the page structure view? Go to the "View" menu and select "Page Structure".
Title: Re: Table size?
Post by: cognostechie on 20 Nov 2012 01:38:34 PM
The count will only be what the query fetches depending on the joins, filters etc so it may not be the exact count of records.
Title: Re: Table size?
Post by: Lynn on 20 Nov 2012 02:01:43 PM
I think OP is talking about a table object in the layout, not a database table.
Title: Re: Table size?
Post by: MFGF on 20 Nov 2012 02:05:10 PM
Oh. Ha! I answered the exact same post (presumably by the same person) elsewhere on Cognoise, and assumed the intent was to know how many rows and columns were in database tables! Time to go and clean up the duplicate (and to slap myself on the back of the head for misunderstanding) :)

MF.
Title: Re: Table size?
Post by: tjohnson3050 on 20 Nov 2012 05:49:09 PM
Violence is never the answer, even for a muppet :)
Title: Re: Table size?
Post by: hanht on 20 Nov 2012 09:33:29 PM
Quote from: Lynn on 20 Nov 2012 02:01:43 PM
I think OP is talking about a table object in the layout, not a database table.
Thank you Lynn, this is exactly 'bout my problem. And with your advice, i can solve it.
Quote from: Lynn on 20 Nov 2012 01:03:39 PM
Are you familiar with the page structure view? Go to the "View" menu and select "Page Structure".
Sorry everybody cause i made you misunderstand  :P
Title: Re: Table size?
Post by: MFGF on 21 Nov 2012 08:46:42 AM
Quote from: tjohnson3050 on 20 Nov 2012 05:49:09 PM
Violence is never the answer, even for a muppet :)

I wouldn't class hitting myself on the back of the head as violence. It would have to hurt for that to be the case, and you know the old adage - no sense = no feeling :)
Title: Re: Table size?
Post by: cognostechie on 21 Nov 2012 04:35:18 PM
I think a good way to get some 'feeling' is to break your neighbor's windows, scream at cops or abuse some gangsters. These acts will make them reciprocate in an equal or more abusive manner resulting in getting some 'feeling'  ;)

Suggestions are welcome for other ways  :)
Title: Re: Table size?
Post by: MFGF on 23 Nov 2012 09:58:02 AM
Have you been stalking me? ;)
Title: Re: Table size?
Post by: cognostechie on 23 Nov 2012 06:55:52 PM
Absolutely ! I have seen that face behind the muppet's cover !   

..but I won't tell the cops so not to worry   ;)