Re: Problem Transact-SQL Statement
From: Allen Yu (allenyu_at_netvigator.com)
Date: 01/10/05
- Previous message: Tom Moreau: "Re: Problem Transact-SQL Statement"
- In reply to: Tom Moreau: "Re: Problem Transact-SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 23:26:47 +0800
I wish I had worked with you before!
How to interpret this ==> ''' + name + ''' ?
Thanks!
Allen
"Tom Moreau" <tom@dont.spam.me.cips.ca>
???????:e6O7UeB9EHA.2156@TK2MSFTNGP10.phx.gbl...
> This is generating a bunch of sp_changeobjectowner statements - one for
each
> table - to change the object owner to do.
>
> If you have embedded quote marks within a string, then double each quote
> inside the string.
>
> BTW, are you the same Allen Yu I worked with at 880 Bay in 1995 - 96?
>
> --
> Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> .
> "Allen Yu" <allenyu@netvigator.com> wrote in message
> news:OHrRxAB9EHA.3944@TK2MSFTNGP12.phx.gbl...
> I've come across a Transact-SQL statement as follows:
>
> -- Statements start here
>
> select 'EXECUTE sp_changeobjectowner ''' + name + ''', ''dbo''' from
> sysobjects where type = 'U'
>
> -- end here
>
> Questions:
>
> (1) How should the 'select' statement be interpreted?
>
> (2) What are the rules for using the quotation marks: ''', '',,, etc?
>
> Thanks!
>
> Allen
>
>
>
- Previous message: Tom Moreau: "Re: Problem Transact-SQL Statement"
- In reply to: Tom Moreau: "Re: Problem Transact-SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|