Hello, experts! The code below is working great for integers, but the problem is I now need to query for character values. I've tried every variation of single and double quotations that I can think of, to no avail.
EXEC sp_MSForEachTable '
IF COL_LENGTH(''?'', ''myField'') IS NOT NULL
EXEC(''SELECT * FROM ? WHERE myField = abc)
Any help is greatly appreciated!