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.
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
Delta_Btye | Records
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...
10 pekerja bebas membida secara purata $32 untuk pekerjaan ini
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.