Unanswered: update query with dynamic tablename obtained from the result of select query
In my stored procedure , I have a select statement which retrieves some table names based on where condition.
I have to update a particular column in all these tables using update query.
my select query is
select so.name from sysobjects so,syscolumns sc where sc.id = so.id
and sc.name = 'productNum' and so.type = 'U'order by so.name
how can we give these dynamic tables in an update statement