Home Oracle Create a script to create script!
Create a script to create script! PDF Print E-mail
Written by Siva   
Sunday, 31 October 2010 22:37

This is to find count in table; where unit_id = 10071:
 

prompt "T_ADJUSTMENT";
select count(*) from T_ADJUSTMENTS where unit_id = 10071;
prompt "T_ATTEMPT";
select count(*) from T_ATTEMPTS where unit_id = 10071;
PROMPT "T_ATTRIBUTES";
select count(*) from T_ATTRIBUTES where unit_id = 10071;
PROMPT "T_ATTRIBUTE_VALUES";
select count(*) from T_ATTRIBUTE_VALUES where unit_id = 10071;
PROMPT "T_BUSINESS_UNIT";
select count(*) from T_BUSINESS_UNIT where unit_id = 10071;

 

You may use ASP or C# to create this batch or .sh or .SQL file.

 

The logic syntax goes like..

 

for i = 1 to "total count of the table"
var[i] = select TABLE_NAME from DBA_TABLES where owner = 'YOUR_SCHEMA_NAME'
response.write "prompt" + var[i] + "\n";" + "select count (*) from var[i] where unit_id = 10071;"
n
ext

 

Isn't it cool?

Last Updated on Sunday, 31 October 2010 22:37
 
 

Advertisement

Featured Links:
HREmail.com
Looking for job? Try HREmail.com
Want to have CMS based Websites?
Try siliconwebcreators.com to CMS based websites.
VM Solutions Inc
For best VM solutions..
Digital Procedure Inc.
Looking for Oracle /SAP /Weblogic Consulting services? visit digitalprocedure.com