Re: XMLColumn.query
- From: "Brandon Berg [MSFT]" <branber@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 10:52:16 -0700
"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
.
- Follow-Ups:
- Re: XMLColumn.query
- From: Michael Rys [MSFT]
- Re: XMLColumn.query
- Prev by Date: SQL 2005 OPENXML doesnt understand xsi:nil
- Next by Date: How should I create XML Schema for this xml? thanks
- Previous by thread: Re: XMLColumn.query
- Next by thread: Re: XMLColumn.query
- Index(es):
Relevant Pages
|
Loading