Export SQL table data into excel

  • Hi,

    I am trying to export the SQL table data into excel destination. I followed below steps.

    I used Import/Export wizard, I selected source database, and excel as destination.

    In table one of column datatype is (bit, null). In excel the column data is not showing correct.

    Orginal data Data in excel

    1 -1

    1 -1

    1 -1

    1 -1

    Is there any way to transfer the correct data only. Please advice.

  • Does the data show up as negatives in Excel?

  • Yes

    Original Column data

    1

    1

    1

    1

    Data in excel

    -1

    -1

    -1

    -1

  • In Excel, 0 equals FALSE for boolean values, and any other number equals TRUE.

    However, I believe that Excel stores a boolean default as -1.

    So, theoretically, nothing is wrong with your package 🙂

    If you really want 1 for true values, then simply convert your boolean values to integers in your package, and then write them to Excel.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 4 posts - 1 through 3 (of 3 total)

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