none
How to create ASCII file from SQL server table using SSIS 2014 ? RRS feed

  • Question

  • How to create ASCII file from SQL server table using SSIS 2014 ?



    • Edited by MLTC Monday, October 21, 2019 3:42 PM
    Monday, October 21, 2019 3:42 PM

All replies

  • See [redacted by moderator]

    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    • Edited by Pete LakerMVP, Moderator Tuesday, October 22, 2019 2:04 AM please choose Microsoft only links or non-commercial sites, thanks Olaf
    Monday, October 21, 2019 3:57 PM
  • Thanks ,I see in the link that ANSI has been specified as encoding.

    Will a ANSI encoding in SSIS will create a ASCII file ?





    • Edited by MLTC Monday, October 21, 2019 4:45 PM
    Monday, October 21, 2019 4:00 PM
  • Hi MLTC,

    Could you please share the example data of the source and the destination file you wanna get?

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, October 22, 2019 7:35 AM
  • Hi MLTC,

    Could you please share the example data of the source and the destination file you wanna get?

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Source sql table will always have unicode data( to support different languages)

    User_first_name nvarchar(100)

    Target CSV file

    example record in source:

    Péctor

    Required o/p:

    Pector

    The data in User_first_name can be having unicode special characters ,how do we remove special characters and ensure we create ASCII csv file?









    • Edited by MLTC Tuesday, October 22, 2019 5:49 PM
    Tuesday, October 22, 2019 4:12 PM
  • Hi MLTC,

    We could use Data Conversion Transformation to change the datatypes of data in the source.

    Please keep the datatypes as the same between input data and output data.

    DT-STR--> (char, varchar, text)-->Non-Unicode
    DT-WSTR-->(nchar, nvarchar, ntext)-->Unicode

    Please refer to the following links:

    What is Unicode and non Unicode data formats?

    DT_STR vs DT_WSTR data types

    Best Regards,

    Mona



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, October 25, 2019 5:33 AM