Re: query analyzer table owner
- From: "g" <gregoranton_nospamplease_@xxxxxxxxxxx>
- Date: Thu, 16 Feb 2006 16:35:25 GMT
Thanks but I cant create the scripts dynamically, the scripts are already
generated for me by another application so I get something like:
Select account, email from account where accountid = 'xyz'
and I need to change it to
select account, email from sysdba.account where accountid = 'xyz'
it's not so bad for a simple statement like this but once you get joins and
nested sql it gets cumbersome
<Jens.Suessmeyer@xxxxxxxxxxxxxx> wrote in message
news:1140074651.542770.75340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
You can quickly create scripts by using this command:
SELECT 'sp_changeobjectowner ''' + TABLE_SCHEMA + '.' + Table_name +
''',''newowner'''
FROM INFORMATION_SCHEMA.Tables
WHERE TABLE_SCHEMA = 'oldowner'
(Untested)
HTH, jens Suessmeyer.
.
- References:
- query analyzer table owner
- From: g
- Re: query analyzer table owner
- From: Jens . Suessmeyer
- query analyzer table owner
- Prev by Date: Re: SSMS Query Editor... Vs Query Analyser
- Next by Date: Re: query analyzer table owner
- Previous by thread: Re: query analyzer table owner
- Next by thread: Re: query analyzer table owner
- Index(es):
Relevant Pages
|