MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
SSIS - file import - ANSI non-printing characters -

in Search

SSIS - file import - ANSI non-printing characters

Last post 08-01-2008 1:32 AM by egxis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-25-2008 1:42 AM

    • egxis
    • Top 150 Contributor
    • Joined on 06-25-2008
    • Posts 2

    SSIS - file import - ANSI non-printing characters

    I have an encrypted file, which I need to import into a table in my database. This file consists of the full ANSI character set, including non-printing characters. Unfortunately SSIS tries to interpret these characters by using the built-in character sets. I would like SSIS import to not interpret non-printing special characters [TAB, NULL, CR, LF, etc]. How can I get SSIS to just import every 16 characters, regardless of the content/special characters?

    Filed under: , ,
  • 08-01-2008 1:32 AM In reply to

    • egxis
    • Top 150 Contributor
    • Joined on 06-25-2008
    • Posts 2

    Re: SSIS - file import - ANSI non-printing characters

    Locked Reply Contact
    Simple solutiion - use BCP

    1. create format file

    2. use following command line:

    bcp.exe DBName..Table_Name in C:\Input_Filename.txt -T -f C:\FormatFile.fmt

    or use SQL syntax:

    BULK INSERT DBName..Table_Name FROM 'C:\Input_Filename.txt' WITH (FORMATFILE = 'C:\FormatFile.fmt')

    Done.

    Filed under: ,
Page 1 of 1 (2 items)