Load bit data type data from SQL to Numeric data type in Oracle

Tadishetty, Sandeep 101 Reputation points
2021-05-06T00:59:24.457+00:00

Hi,

I am trying to load data from SQL table which is bit data type for one of the column in to Oracle table where column data type is numeric and all the values of 1 are loading as -1 in Oracle table. Please let me know the solution as I tried to convert but didn't work as expected.

SQL Database:- Column Name - Is Load; Data Type: Bit ; Values- 1,0

Oracle Database:- Column Name: - IsLoad; Data Type - Numeric; Values - ( Need 1,0 but loading -1 instead of 1 )

Thanks,
Sandeep

SQL Server Integration Services
0 comments No comments
{count} votes

Answer accepted by question author
  1. ZoeHui-MSFT 41,536 Reputation points
    2021-05-06T07:28:01.883+00:00

    Hi @Tadishetty, Sandeep ,

    I tested locally that when we convert the Bit data to other data types, it will returns a negative value.

    I'd suggest that we could add a "derived column" component to create a new column with the expression:

    YourField ==  TRUE  ? 1 : 0  
    

    And then map this new column to the destination.

    94280-screenshot-2021-05-06-154804.jpg

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.