473,466 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why XML Output is Truncated

Mo
Hi,
I am trying to generate an XML output form the database. I am
executing

select * from Request_vw for xml auto

The output data is being truncated. is there a limit on the output
result of an XML query?

Thanks

Jul 30 '07 #1
3 10341
On Mon, 30 Jul 2007 07:51:41 -0700, Mo wrote:
>Hi,
I am trying to generate an XML output form the database. I am
executing

select * from Request_vw for xml auto

The output data is being truncated. is there a limit on the output
result of an XML query?

Thanks
Hi Mo,

In SQL Server Management Studio: Tools / Options / Query Results / SQL
Server / Results to Text / Maximum number of characters displayed in
each column

In Query Analyzer: Tools / Options / Results / Maximum characters per
column

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Jul 30 '07 #2
Mo
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

Jul 31 '07 #3
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
Aug 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jerry | last post by:
I've found a problem with exec, passthru, shell_exec & system. I'm trying to run the following exec("sort -r -n -k2,2 r1.txt > r2.txt") with r1.txt being a numeric file. The file looks like...
5
by: Jay Chan | last post by:
The transaction log in a database in our SQLSERVER-2000 server has grown to 16GB. I cannot shrink the transaction log manually because it says that the entire 16GB log size is not free. This is...
2
by: Thomas Hermann | last post by:
A newbie question: With the config mentioned in the topic, all on localhost, Win xpsp2, i created a caledar-table. The output should be a daily calendar for half a year with about 15 cols. ...
6
by: rey | last post by:
Hello, I need to produce with T-SQL a user defined function or stored procedure that make one SLQ-Statement and prepare as string from the result set. The request muss be able to return a very...
2
by: dwight0 | last post by:
I have various ASP.net forms and on most forms, on IE I can go to "view source" and I can see the output of the data grid. However I have a few different pages where I have a large amount of output...
5
by: z. f. | last post by:
hi, i have a vb.net web application and i make a request using internet explorer to an aspx page. the aspx page size if over 170KB, and the page in internet explorer looks truncated and in the...
0
by: Chris | last post by:
Hi, I created the SQL 2005 stored procedure below: CREATE PROCEDURE . @s_no smallint, @deliverable_path nvarchar(255) OUTPUT When I run in ASP.NET 2005 the stored procedure from server...
7
by: Kenevel | last post by:
Hi there, I'm trying to track down the log file into which the following failure will be written. --- SQL4302N Procedure or user-defined function "SRCPROD.PRO_GENERATE_GROUP_EVENTS",...
2
by: yogeshbhandare | last post by:
Hi Friends I have an issue with shell_exec. I am trying evoke a command from browser. The command get executed properly without any issue however it deos not return all the output which is...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.