LookUp Task in SSIS

  • I am including this query in sql cmd of loopup task

    SELECT ISNULL((SELECT EmpID, FROM StateEmp.EmployeeLink),NULL).

    But I am not getign any column to map it in the next tab in lookup task.

    ACtually i am trying to lookup empid and if it doesnt exist i want to replace null

  • Hi Mike,

    Why don't you give the add an alias to the query. Now the lookup doesn't know what the name of the column should be to display to you.

    SELECT ISNULL((SELECT EmpID, FROM StateEmp.EmployeeLink),NULL) AS EmpID

    I noticed that you also have a ',' in your subquery after the EmpID......

    Regards

    Micha

  • Mike,

    Can you post your entire query? If all you are looking up is the EmpID why do you need a query to define it? If you want it to return NULL in the event of it not being found make sure to configure the error output to 'Ignore Failure' and you'll get NULL when the lookup fails.

    Hope this helps!


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

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

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