Re: XMLColumn.query



Also, if you think that we should support this without the need of
sp_executesql or EXEC() please file a request at
http://connect.microsoft.com/feedback/default.aspx?SiteID=68

Thanks
Michael


"Brandon Berg [MSFT]" <branber@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:44b3e551$1@xxxxxxxxxxxxxxxxxxxxx
"CAUEEE" <CAUEEE@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9C6C06B1-B6B7-45BE-A78B-B7D016DB606C@xxxxxxxxxxxxxxxx
--query1
DECLARE @Qry varchar(100)
SET @Qry = 'data(/FORMDATA/FD_SELECT3)'

select USE_PRSN_XSL_IPUT_VLU.query(@Qry) from xml_tab
where the_id=1
--

an error occurs when the query1 is executed.
should '.query' method's parameter should be a string literal?

Yes. As the error message says, "The argument 1 of the xml data type
method 'query' must be a string literal."

how can I use variable(e.x @Qry) when I use .query method?

Use sp_executesql.

--
Brandon Berg
Software Design Engineer
Microsoft SQL Server



.



Relevant Pages

  • "Thread was being aborted" error from WebApp using Thread.Sleep.
    ... When it receives a request it creates a new thread with the ... Dim oResult As WaitForChangedResult ... is being created the WaitForChanged event is triggered before the file ... with the error message "Thread was being ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Access to the path is denied
    ... I think that the error message is itself self explanatory. ... to make the request run under another users security context. ... An unhandled exception occurred during the execution of the> current web request. ... > Exception Details: System.UnauthorizedAccessException: Access to the path> "CreateFolder" is denied. ...
    (microsoft.public.dotnet.security)
  • Re: Access to the path is denied
    ... I think that the error message is itself self explanatory. ... to make the request run under another users security context. ... An unhandled exception occurred during the execution of the> current web request. ... > Exception Details: System.UnauthorizedAccessException: Access to the path> "CreateFolder" is denied. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: could someone plz explain those ext3/hard disk errors
    ... > John Bradford wrote: ... > I think we could assume that he never told the kernel the disk was ... What I was trying to point out is that the error message is clearly ... request for a sector which is well out of range. ...
    (Linux-Kernel)
  • Re: How to Define a global const class variable in MFC?
    ... but in vc++ it seems that we have to both declare and define variables in ... would declare an array of fixed size in C++ escapes me...). ... I can write the whole header files and source files but I thought it will be ... declarations are so we can figure out why the error message, that SPECIFIC error message, ...
    (microsoft.public.vc.mfc)

Loading