mhr123 Posted January 18, 2011 Posted January 18, 2011 I need an Immediate help from u Guys... i have created a SQL query to generate a EDI text file , the table have stored special characters like carriage return... i need to know how to avoid special character like carriage return and line feed while generating the in text files.
nballa Posted January 20, 2011 Posted January 20, 2011 replace char(13) and char(10) with empties. REPLACE(REPLACE (x,CHAR(13),''),CHAR(10),'')
mhr123 Posted January 22, 2011 Author Posted January 22, 2011 Insufficient info ... need the sql that is spitting out the information and the column(s) that contain the junk characters. but assuming that you want to completely eliminate the junk characters you can use the replace function from SS to replace these characters ( You will have to get their ASCII codes first). But this is all expensive if the table is big. So an alternative would be to simply do a find/replace using a regular expression on the text file with junk characters. Perl is very very good at this. replace char(13) and char(10) with empties. REPLACE(REPLACE (x,CHAR(13),''),CHAR(10),'') Thanxs a lot dear... it was really helpful and it worked for me... thanxs a million....
Recommended Posts