Can a stored procedure be written with a column name?
For Table1 with ColA, ColB, ColC, I want a query like:
EXEC sp_Mine 'ColA', '100%'
I want the results to be like:
SELECT ColA, ColB, ColC
FROM Table1
WHERE ColA Like '100%'
I tried setting up this stored procedure, but it came out with the WHERE clause looking like:
WHERE 'ColA' Like '100%'
That is, it is trying to compare the two strings I passed in.