Run this query to generate your alter table statements:
select 'ALTER TABLE ' + o.name + ' DROP COLUMN OBJID'
from sysobjects o
where o.name like 'ADP%'
Then run the output.
Jnicho2,
Thanks for the info and your help.
However, I was not having a problem storing the @@error (which is the numeric error code):
"208"
Nor was I having a problem selecting the generic error from the sysmessages table (which your query would return):
"Invalid...
I would like to save the error message that SQL-Server generates when an error occurs.
I am able to select @@ERROR to get the the error number and I am then able to look up the generic error message from the sysmessages table. However, the sysmessages is generic and does not have, for example...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.