﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / any help on sql query for record counts on various tables in a table / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 15:52:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>depends from which user u are executing..............might be possible u don't have access on this schema because this is sys schemadbc is default schema for Teradata....it should run....Regards,Subhash</description><pubDate>Fri, 01 Aug 2008 01:38:07 GMT</pubDate><dc:creator>gander_ss</dc:creator></item><item><title>RE: any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>Hi subhash:I am trying to execute your querybut I am getting 3807 error sayingdatabase does not exist</description><pubDate>Thu, 31 Jul 2008 17:01:47 GMT</pubDate><dc:creator>krisp1234</dc:creator></item><item><title>RE: any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>hi dearI have designed this in TD itself...........And substr will work in TD as wellSubhash</description><pubDate>Thu, 31 Jul 2008 15:13:33 GMT</pubDate><dc:creator>gander_ss</dc:creator></item><item><title>RE: any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>Hi Subash:Thankyou so much for ur wonderful reply. really appreciate thatBut my database is teradataI guess substr is not working on teradataany improvements in query to work well in teradata?Thanks</description><pubDate>Thu, 31 Jul 2008 12:00:40 GMT</pubDate><dc:creator>krisp1234</dc:creator></item><item><title>RE: any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>Follow this steps :step 1: create table table2 (tablename varchar(50),cnt integer)step 2 : select k.x from (Select	substr('''',1,1)||a.tablename||substr('''',1,1)  c, a.tablename q, ',count(*) from '||q p,'insert into table2 select'||' '||c||p||';' xFrom	(Select	Distinct Trim(databasename)||'.'||Trim(tablename) tablenameFrom	dbc.tablesWhere	tablekind='T') a) kstep 3: run this result set in one shot.Here I have taken example of all the database table u can modify u'r query accordingly.Regards,Subhash</description><pubDate>Thu, 31 Jul 2008 01:20:41 GMT</pubDate><dc:creator>gander_ss</dc:creator></item><item><title>any help on sql query for record counts on various tables in a table</title><link>http://www.teradata.com/teradataforum/Topic12318-9-1.aspx</link><description>Hi I have bunch of tables collected from a database and tabulated them in a tableCould you please let me know what is best sql or method to get record countson each table in the table i created and listed themthanks</description><pubDate>Mon, 28 Jul 2008 17:46:06 GMT</pubDate><dc:creator>krisp1234</dc:creator></item></channel></rss>