Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

The XML Output file was not created Expand / Collapse
Author
Message
Posted Tuesday, October 15, 2013 7:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 4:44 AM
Points: 1, Visits: 56
Can anyone help?

The XML query gets created using XML path. I added the following for an XML output..

select top 1 LTRIM(REPLACE(SUBSTRING(mm.MATTERCODE, 1, CHARINDEX(''.'', mm.MATTERCODE)), ''0'', '''')) +
LTRIM(REPLACE(SUBSTRING(mm.MATTERCODE, CHARINDEX(''.'', mm.MATTERCODE) + 1, LEN(mm.MATTERCODE)), ''0'', ''''))
as ''MATTERCODE'', ' +
but get the following error

Msg 50000, Level 16, State 1, Procedure ls_bcp_out_from_query, Line 124
An unknown error has occurred.
The output file was not created.

at this point in the stored procedure:

-- The -a flag allows us to request a greater packet size, which will speed up processing.
set @cmd = 'bcp "' + @query + '"'
+ ' queryout ' + @temp_output_path
+ ' -t^' + @field_terminator
Line 124.... + ' -T -c -a32767'
+ ' -S ' + @@servername
Post #1504750
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse