There is actually a way to display the tables name and the number of records in each in Axapta (Both version 2.1 and 3.1). I do not have access to Axapta at the moment but I think the path is Tools - > Development -> Number of records. Unfortunately the screen that comes up is not an ordinary grid that allows you to copy and paste the data for easy analysis but it can help in some way. I Actual wrote a routine once that does the same think but allows you to copy and paste the data. The routine made use of the dict classes to get a list of all the tables in Axapta. You can combine this with a class in Axapta (Sorry I forget the name) that allows you to use the native code of the backend database to do the record count. You must remember to filter by DATAAREAID when using this class.
 
All the best,
Varden Morris


James Flavell <[EMAIL PROTECTED]> wrote:
Thanks but my axpata is version 2.1 and no such report exists unfortunately
Thanks
James


-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Sonny Wibawa
Adi
Sent: 05 August 2005 10:36
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Re: SQL script to do record count


Hi James Flavell,


There is a menu in Axapta to obtain that information.

The menu is Administration | Reports | Size of company accounts. The report
name is SysCompanySize report.


Best regards,


Sonny Wibawa Adi, MBSCP, MCAD.NET, MCSD.NET, MCP

--- "Suresh Kumar K."
<[EMAIL PROTECTED]> wrote:

> Hi,
>
> If you just need the list of tables and the number
> of records in it, I
> think all u have to do is get the values of the
> column TABLE_NAME from
> the table USER_TABLES. Based on this info all you
> have to do is a
> COUNT(*) for those tables. You will end up with the
> returned value of
> record counts for those tables. I currently don't
> have Oracle installed,
> else I could have send the script.
>
> Regards,
>
> Suresh.
>

>

>
> ________________________________
>
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of
> cdlmalherbe01
> Sent: Thursday, August 04, 2005 5:04 PM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: [Axapta-Knowledge-Village] Re: SQL script
> to do record count
>

>
> Hi James,
>
> The following is crude and inefficient, but does the
> job.
>
> create table ##TableRecordCount
>       (TableName varchar(256) not null,
>       RecordCount bigint not null)
> declare @TableName varchar(256)
> declare @SqlString nvarchar(4000)
>
> declare Tables cursor read_only
> for select [name] from sysobjects where [xtype] in
> ('U')
>
> open Tables
>
> fetch next from
>       Tables
> into
>       @TableName
>
> while @@fetch_status <> -1
>       begin
>             if @@fetch_status <> -2
>                   begin
>                         set @SqlString = 'insert
> into
> ##TableRecordCount select ' + '''' +
> ltrim(rtrim(@TableName)) + ''''
> + ',count(*) from ' + @TableName
>                         exec sp_executesql
> @SqlString
>                   end
>
>             fetch next from
>                   Tables
>             into
>                   @TableName
>
>       end
>
> select * from ##TableRecordCount
>
> close Tables
> deallocate Tables
> drop table ##TableRecordCount
>
> Hope it helps!
>
> Christoph
>
> --- In Axapta-Knowledge-Village@yahoogroups.com,
> "James Flavell"
> <[EMAIL PROTECTED]> wrote:
> > Hi
> > 
> > Does anyone have a SQL script that I can run
> against a Axapta DB
> to get a
> > simple output of table name and record count for
> the table?
> > 
> > I need to do a check of record counts from a SQL 7
> to SQL 2000
> upgrade to be
> > sure everything is in order after the upgrade.
> > 
> > Thank you very much
> > James
>
>
>
>
> Sharing the knowledge on Axapta.
>
>
>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "Axapta-Knowledge-Village
>
<http://groups.yahoo.com/group/Axapta-Knowledge-Village>
> " on the web.
>        
> *      To unsubscribe from this group, send an email to:
>      
> [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]
> ubscribe>
>        
> *      Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>

>
> ________________________________
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Sharing the knowledge on Axapta.
Yahoo! Groups Links







Start your day with Yahoo! - make it your home page

Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to