I need a T-SQL statement that will return the longest current value of each column in all tables in a schema that have a text or number datatype.. dates, etc. can be ignored. With Numbers, precision/scale does not matter, just the net total length of the data.
No need to return the actual data.
Table Name Column Name datatype longest current value
T1 C1 nvchar 26
T1 C4 number 14
T2 C1 number 5
Any and all pointers & suggestions appreciated..