Tuesday, March 27, 2012
Estimated Execution Plan Fails, XML Error?
Execution Plan in SQL Studio on any non-trivial query, I get this unhelpful
message:
Error processing execution plan results. The error message is:
There is an error in XML document (1, 501).
There is an unclosed literal string. Line 1, position 501.
The only suggestion I've heard of is to instal SQL SPs, but that didn't
help. This is SQL 2K5 running on Win2K3. I don't believe there's any
strangeness like odd characters in instance names, and all language settings
are default. I've seen this before on another server, but Google has nothing.
Any ideas? Thanks!
I think I heard that the XML used for this can not handle some unusual
object names, but at best that is a long shot.
Roy Harvey
Beacon Falls, CT
On Mon, 6 Aug 2007 13:32:02 -0700, JonOfAllTrades
<JonOfAllTrades@.discussions.microsoft.com> wrote:
> Good afternoon, all. Whenever I try to use Query | Display Estimated
>Execution Plan in SQL Studio on any non-trivial query, I get this unhelpful
>message:
>Error processing execution plan results. The error message is:
>There is an error in XML document (1, 501).
>There is an unclosed literal string. Line 1, position 501.
> The only suggestion I've heard of is to instal SQL SPs, but that didn't
>help. This is SQL 2K5 running on Win2K3. I don't believe there's any
>strangeness like odd characters in instance names, and all language settings
>are default. I've seen this before on another server, but Google has nothing.
> Any ideas? Thanks!
Estimated Execution Plan
Go to Query menu -- Click Show Execution plan.
After that execute the Query.
Thanks
Hari
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>|||To display the estimated execution plan, select Query --> Display Estimated
Execution Plan on the menu or press Ctrl-L.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>|||On Tue, 16 Nov 2004 08:10:29 -0600, "Dan Guzman"
<guzmanda@.nospam-online.sbcglobal.net> wrote:
>To display the estimated execution plan, select Query --> Display Estimated
>Execution Plan on the menu or press Ctrl-L.
Or click the little icon.
Or SET SHOWPLAN_ALL ON or SET SHOWPLAN_TEXT ON.
J.sql
Estimated Execution Plan
Hi,
Go to Query menu -- Click Show Execution plan.
After that execute the Query.
Thanks
Hari
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>
|||To display the estimated execution plan, select Query --> Display Estimated
Execution Plan on the menu or press Ctrl-L.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>
|||On Tue, 16 Nov 2004 08:10:29 -0600, "Dan Guzman"
<guzmanda@.nospam-online.sbcglobal.net> wrote:
>To display the estimated execution plan, select Query --> Display Estimated
>Execution Plan on the menu or press Ctrl-L.
Or click the little icon.
Or SET SHOWPLAN_ALL ON or SET SHOWPLAN_TEXT ON.
J.
Estimated Execution Plan
Go to Query menu -- Click Show Execution plan.
After that execute the Query.
Thanks
Hari
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>|||To display the estimated execution plan, select Query --> Display Estimated
Execution Plan on the menu or press Ctrl-L.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%23blIBj5yEHA.3236@.TK2MSFTNGP15.phx.gbl...
> How do I display this in Query Analyzer ?
>|||On Tue, 16 Nov 2004 08:10:29 -0600, "Dan Guzman"
<guzmanda@.nospam-online.sbcglobal.net> wrote:
>To display the estimated execution plan, select Query --> Display Estimated
>Execution Plan on the menu or press Ctrl-L.
Or click the little icon.
Or SET SHOWPLAN_ALL ON or SET SHOWPLAN_TEXT ON.
J.
Monday, March 26, 2012
escaping a string
hi guys
please help me. i've never user stored procs before but here is my problem.
this is only what i am allowed to display but it shows my problem
declare @.suite varchar(10),@.company varchar(1)
set @.suite = 'brutus'
set @.company = 'A'
exec ('insert into tot (SuiteName,Company) values ('+@.suite+','+@.company+')')
when i exec the query it says that "brutus" is an invalid column name. i know that i need to insert a extra ' but i don't know how or what is the escape character. please help me.
Hi,this should be accomplishedby this one here:
exec ('insert into tot (SuiteName,Company) values ('''+@.suite+''','''+@.company+''')')
But I would rather prefer not using dynamic sql in this case:
insert into tot (SuiteName,Company) values (@.suite,@.company)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||
thanks that helps but when i do this
1. exec ('alter table tot add '+@.UnitT+' varchar(3) DEFAULT '' WITH VALUES')
2. alter table tot add @.UnitT varchar(3) DEFAULT ' ' WITH VALUES
not one work. in 1 i get the same problem and in 2 it tells met there is a problem with syntax before @.unit
|||No, therefore you would need dynamic SQL, that will not function with the second opion I posted.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||OK THANKS
i used your first solution with the ''' multiple quotes and it works perfect. thanks