all groups > sql server replication > january 2005 >
You're in the

sql server replication

group:

Problem Transact-SQL Statement


Re: Problem Transact-SQL Statement Tom Moreau
1/6/2005 12:45:05 PM
sql server replication:
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
..
[quoted text, click to view]
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


Problem Transact-SQL Statement Allen Yu
1/7/2005 12:53:00 AM
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


Re: Problem Transact-SQL Statement Allen Yu
1/10/2005 11:26:47 PM
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...
[quoted text, click to view]

AddThis Social Bookmark Button