I have a database with about 150 tables. And somewhere in those there is a value that causes an error for being too large (yes, that column should probably be corrected!) - the problem is that I don't exactly know in what table the problem is appearing. Out of the 150 tables...it's probably in a smaller collection of 10-15 tables that could be the problem.
But each of those 15 tables have multiple numeric columns and writing multiple ORDER BY's for each column is very time consuming.
Is there any way to order by biggest numeric value in a table or the entire database without specifying which columns it is by hand?
Edit
For the people who didn't read comments - the specific problem is solved. But I'd still like to know if there's a query to do it.