Posted by Hugo Kornelis on 08/01/07 19:13
On Mon, 30 Jul 2007 18:37:42 -0700, Mo wrote:
>Thank you for the great pointer. Here is the problem. I am calling a
>function to retrieve the data in XML format. The problem is that it
>returns only nvarchar(8000) which is smaller than what I need. I think
>that is why the returning data is being truncated. my function is as
>follows. Any ideas on how to return larger XML string is greatly
>appreciated.
>
>
>CREATE FUNCTION GetXMLRequests()
>RETURNS nvarchar(max)
>AS
>BEGIN
> -- Declare the return variable here
> RETURN (select * from Request_vw for xml auto)
>
>END
>GO
Hi Mo,
Any reason why you want to return nvarchar(max) rather than use the
dedicated xml datatype?
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
[Back to original message]
|