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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV import - character before CRLF

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

A little help here.

I am taking a file which is created by lots of batch scripts (would rather not have to alter them!) and wanting a SSIS scheduled task to load it into SQL.

Well normally this would be easy - however i have an issue. There seems to be a character (in notepad - it looks like a space) which causes SQL to error. SSIS then cannot find the text qualifier on the final column. If i remove this character - it then uploads fine.

If i open this file in excel - it opens fine. If i save it then from excel, it uploads fine.

How can i clean this file automatically with SQL before upload? Is there any way i can find what this character is.

Many thanks

Dan


----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
if you know there character code then you can replace it using a derived column task.
 
Sorry - i should have posted. Fixed it - just did a script that removed the last char. works fine now. Sorry.

DAn

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top