Issue with exporting file from MSSQL db with querout // UNIX formatting instead of DOS formatting

  • Good morning,

    I face an issue with exporting data from MSSQL DB.

    I merge 3 db tables with union all, with the statement

    "select column1 + column2 from table1 union all

    select column1 + column2 from table2 union all

    select column1 + column2 from table3

    "

    and export the file with the statement bcp querout, as fixed length.

    Columns in tables are nvarchar and same collation with the database.

    The file is exported normally, but when open it with Textpad, file has encoding is ANSI as expected but the format is "No Change" instead of "PC", and when open it with Ultra Edit, file format is UNIX instead of DOS.

    Does anyone have an idea how to fix this issue, and the file to be exported as a PC and DOS format?

    Thanks in advance.

  • Got it..

    When i used for end-of-line terminator instead of \r, it worked.

    Thanks anyway.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply