I am kinda new to tsql programming and trying to find a quickie from google and such for a solution.
What I want is to get a list of tables and columns that contain a certain
string. I actually want to replace all such occuranaces with some other string but here is how I started:
When I try to run ths, it complains that table variable @tn is not declared. Obviously I cann't use a varchar variable in place of a table, looks like..
Can anyone point out how I should change the above? I basically want to use the @tn and @cn as table name and column name in my 'select' inside the loop. HOW???
Thanks for your time.