Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help on a query

Status
Not open for further replies.
Jul 25, 2000
33
0
0
US
Need to identify all of the tables that LIKE 'adp%' which have a column titled OBJID.
I will then need to go to these tables individually and drop this column.
Am a beginner here (with T-SQL) so any help/tips would be greatly appreciated. Additionally, any source material that could help me learn this any better? I am getting sparse exposure to acutally using T-SQL and really want to understand it more.

Thanks in advance! The crux of the hypothesis is the biscuit.
 

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.
 
Thank you thank you thank you! The crux of the hypothesis is the biscuit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top