Counts mismatch while compare between sql box and ssis

  • Please see the below example.

    --SQL Box

    select top 1 1 from table1 where 'xyz'='xyz' --1 count

    select top 1 1 from table1 where 'xyz'='xyz ' --1 count

    --SSIS (Lookup)

    select top 1 1 from table1 where 'xyz'='xyz' --1 count

    select top 1 1 from table1 where 'xyz'='xyz ' --0 count

  • I will give more details.

    Two tables.

    1. table1 ( rid varchar(20),rname varchar(20))

    2. table2 (rid varchar(20),raddress varchar(20))

    The records are

    table1: '123','rname1'

    table2: '123 ','USA'

    SQL box:

    select * from table1 a inner join table2 b on a.rid = b.rid

    SSIS:

    1.Create dataflowtask.

    2.Create oledbsource as select * from table1

    3.connet one lookup as select rid,raddress from table2

    4. Join the oledb source and lookup based on the rid colums.

    5. Create destination table to populate rid , raddres..

    6. Run the dataflowtask to populate the data into destnation.

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

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