I have written these SP to export:
CREATE PROCEDURE CREATEXML
select 1 as Tag, NULL as Parent, trans_date as [Item!1!trans_date], system_qty as [Item!1!system_qty],
part_name as [Item!1!part_name]
from fastpic.FP_INVTRANS as A
Where trans_date = (select max(trans_date) from fastpic.fp_invtrans i
where a.part_name = i.part_name)and trans_type <> 'ORDER COMPLETE'
order by trans_date desc
for xml explicit
CREATE PROCEDURE RUNXML AS
DECLARE @cmd varchar(200)
set @cmd = 'bcp "EXEC fastpic2.dbo.CREATEXML" queryout c:\parts.xml -S. -Usa -P -c -r -t'
exec master ..xp_cmdshell @cmd
I get a fileexported but it is not a complete file. I get this error in the output window:
SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client][SQL Server]Warning: Server data (2033 bytes) exceeds host-file field length (0 bytes) for field (1). Use prefix length, termination string, or a larger host-file field size. Truncation cannot occur for BCP output files.
anybody has any ideas? does this error mean that my fields are too large? that's not possible.