I have 233 tables in a database. 2 columns are of my interest. Table_Name, Delta_byte(this only has 3 values A,C or D).
i need help to write a query that goes through all these tables and gets a count of the Delta_Byte column of each table.
Output like
Table Name | Delta_Byte| Record
T1 , A , 50
T1 , C , 3
T1 , D ,10
T2 , A , 27
T2 , C , 7
T2 , D ,11
and so on for all the tables. With the output i can get and aggregate sum of all the delta_Byte values
e.g.
Delta_Btye | Records
A 77
C 10
D 21
Hope that makes sense. i could use a UNION ALL query.. but that would mean specifying each table name and a where clause for the delta byte column...and there is a high chance of getting new tables added or previous ones deleted..
Help is appreciated...
-- 20 years Store Procedure expert for any complex, I have ready store procedure to read all table schema for a particular field value, so get this out put for sum of particular field i can easily solve you , i am ready now
I m a database administrator with 9 years of experience in this industry.
I read your project details and I understood your needs ,I can do what you want in the deadline just contact me and we can discuss more about the project.
I can efficiently and qualitatively develop script for required calculation through all existing tables because I am Senior MS SQL Developer with 10-plus years' seniority and with exceptional professional expertise in implementation of complex SQL logic. This script will recognize all actual tables and perform calculations through them.
Hi I have 15 years of experience in SQL server Database development. I can build the query for you in 3 hours. please ping me offline we can close it quickly.