In a typical query, you have to declare a column in the where statement.
Select *
From TABLE
Where ColumnName like '%Some Value%'
I would like to scale my query to execute against every column, in every table.
More Info: I'm working with a database that has ~1,000 tables, and each table has 5-100 columns each. I'm attempting to check for special characters throughout the entirety of the db. My existing query works, but it's per column, and would be very hard to write for every column in every table.
SELECT *
FROM Table
WHERE ColumnName '%[^a-z0-9 ._-]%'
This has likely been addressed as it can't be unique, but I've yet to find a post that answered it directly (usually it's an adaptation in some form). If there's a post that does capture this please feel free to link - I just haven't found one that quite covered it. It seems like it may be an adaptation of 'search database for string' scripts, but I haven't seen one of these that I was able to adapt to include the where logic I'm using.