fikir
Programmer
- Jun 25, 2007
- 86
what is wrong with this query
EXEC sp_MSForEachTable 'IF left(''?'',12) = ''[FastActRes]''
begin
UPDATE ?
SET TO_BE_LOADED = ''Yes''
end'
Only those with schema FastActRes have TO_BE_LOADED column
and trying to update this column.
There are other tables with different schema, theses tables don't have TO_BE_LOADED column,
when I am trying to run the above query, it is complaining that 'Invalid column name TO_BE_LOADED', but it still updates the TO_BE_LOADED for those tables with the schema FastActRes.
where is the error coming, is the script cheching the other tables with different schema also?
thanks,
EXEC sp_MSForEachTable 'IF left(''?'',12) = ''[FastActRes]''
begin
UPDATE ?
SET TO_BE_LOADED = ''Yes''
end'
Only those with schema FastActRes have TO_BE_LOADED column
and trying to update this column.
There are other tables with different schema, theses tables don't have TO_BE_LOADED column,
when I am trying to run the above query, it is complaining that 'Invalid column name TO_BE_LOADED', but it still updates the TO_BE_LOADED for those tables with the schema FastActRes.
where is the error coming, is the script cheching the other tables with different schema also?
thanks,