Re: Problem Transact-SQL Statement
From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 01/06/05
- Next message: Allen Yu: "Re: Problem Transact-SQL Statement"
- Previous message: Allen Yu: "Problem Transact-SQL Statement"
- In reply to: Allen Yu: "Problem Transact-SQL Statement"
- Next in thread: Allen Yu: "Re: Problem Transact-SQL Statement"
- Reply: Allen Yu: "Re: Problem Transact-SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 Jan 2005 12:45:05 -0500
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
- Next message: Allen Yu: "Re: Problem Transact-SQL Statement"
- Previous message: Allen Yu: "Problem Transact-SQL Statement"
- In reply to: Allen Yu: "Problem Transact-SQL Statement"
- Next in thread: Allen Yu: "Re: Problem Transact-SQL Statement"
- Reply: Allen Yu: "Re: Problem Transact-SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|