Re: Convert NTEXT to XML for use in following query.
- From: "Robin Tucker" <rtgroups@xxxxxxxxxxx>
- Date: Tue, 14 Aug 2007 09:56:56 +0100
Hi Kent, thanks for your response. I think some misunderstanding here
though with your answer - I can't quite see how to make that work. I have
the following (below). My problem is with the truncation of @In_IDs (the
XML parameter). I want to replace it with an NTEXT parameter and then
somehow prepare it as an XML document in order to perform the query. I'm
passing in an XML list of ID's and want to return the record for each of
those IDs but I think the limit on the size of the XML document prevents the
code below from working when the number of ID's is largeish.
Robin
CREATEPROCEDURE [dbo].[Image_Get_Set_Details]
@In_IDs XML /* The IDs of the image whose details we want to fetch
*/
/*
Procedure expects XML in the following format:
<query>
<id>1023</id>
<id>1024</id>
<id>1025</id>
</query>
*/
AS
SELECT Images.ID_Adjacency,
Images.IsCompressed,
Images._Timestamp
FROM
Images
CROSS APPLY
@In_IDs.nodes('//id') AS T(nref)
WHERE
Images.ID_Adjacency = nref.value('.', 'int')
.
- Follow-Ups:
- Re: Convert NTEXT to XML for use in following query.
- From: Kent Tegels
- Re: Convert NTEXT to XML for use in following query.
- References:
- Convert NTEXT to XML for use in following query.
- From: Robin Tucker
- Re: Convert NTEXT to XML for use in following query.
- From: Kent Tegels
- Convert NTEXT to XML for use in following query.
- Prev by Date: Re: SubQuery
- Next by Date: Re: Convert NTEXT to XML for use in following query.
- Previous by thread: Re: Convert NTEXT to XML for use in following query.
- Next by thread: Re: Convert NTEXT to XML for use in following query.
- Index(es):
Relevant Pages
|
Loading