all.
I am using stored procedures from linked server. I want to use the procedure in ole db source.
I wrote the query, which works in SSIS.
select ID,
LAST_NAME_ENG,
LAST_NAME_G,
FST_NAME_ENG,
FST_NAME_G,
BIRTHDATE
from openquery (linkedserver,
'exec [linkedserver].get_records @SESSION_ID = 12 , @SYSTEM = ''oCRM'', @ENTITY_NAME = ''CLIENT''
WITH RESULT SETS (([ID] [int] NOT NULL,
[LAST_NAME_ENG] [varchar](50) NOT NULL,
[LAST_NAME_G] [varchar](50) NOT NULL,
[FST_NAME_ENG] [varchar](50) NOT NULL,
[FST_NAME_G] [varchar](50) NOT NULL,
[BIRTHDATE] [date] NOT NULL))');
I can use it in SSIS ole db source and successfully get required data. But in the next step there is the problem:
I need to pass the parameter to the @SESSION_ID from SSIS instead of '12'. And I cannot find the right way to do it.
There are a lot of advices to use dynamics sql and construct full query string with required parameter values and then exec it, but if I will do it - the SSIS couldnt get columns data from the dynamics query.
Are there ways to solve it? Any ideas will be helpfull.
Thank you.
With regards, Yuriy.