Your technology certification is waiting. Enroll in Cloud Class ®
TableName as varchar(100),
ColumnName as varchar(100),
ColUmnValue as varchar(500))
Open in new window
cursor = select TableName from SysTables
While I < TableNameColumn.Count
RecExists = select count(*) from Cursor.TableName where Column(I) like '%' + 'bob' + '%'
if RecExists >0 then
INSERT INTO #temptable select TableNameColumn, Column(I).Name, Column(I).Value from Cursor.TableName where Column(I) like '%' + 'bob' + '%'
In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment