Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non-Character at end of Text file ???

Status
Not open for further replies.

JayKusch

MIS
Oct 30, 2001
3,199
US
Have a DTS push from a SQL Server table to a text file. All is great EXCEPT ... there is a Non-character value appended to the end of the file.

Wondering if it is not the EOF marker or something.

I need to see to to suppress or remove it when I create the file.

Thanks

J. Kusch
 
Hmmm .... on further investigation, I have found that it is NOT the export of the data into the text file creating this anomoly ...

What is happening is that in my DTS package I create A.txt which is a header record and B.txt that are detail records.

A.txt and B.txt have different formats so I cannot just create the header and detail records w/in the same file during the DTS export.

SO ... I create them and them execute an xp_cmdshell 'COPY a.txt + B.txt C.txt'.

That is when the special character is created.

Does anyone know how to correct this issue? I will try a post in the OS forums to see if I can scrounge up an answer while I look for one myself.

Thanks ALL ...


Thanks

J. Kusch
 
Was easier that I had anticipated ...

It is a Cntl-Z character that can be suppressed by adding the /b flag after the Copy command. Somewhat like this ...

xp_cmdshell 'COPY /b a.txt + B.txt C.txt'.


Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top