i'm having problems when executing a stored procedure in an OLE DB source in SSIS,
I have set the OLE DB source to SQL command and put the following:
![enter image description here]()
This is the code for the SQL command text:
exec timesheet_r12..TIME_lynx_extract ?,?,?,?,?,?,?,?,?,?,?,?,?WITH RESULT SETS ((
worker_reference NVarchar(50),
placement_reference NVarchar(10),
worker_name NVarchar(50),
job_title NVarchar(100),
authorising_line_manager NVarchar(100),
timesheet_date datetime,
company_agent_name NVarchar(100),
type_of_worker NVarchar(100),
week_number NVarchar(100),
hours_worked NVarchar(100),
rate_description NVarchar(100),
rate_per_hour NVarchar(10),
job NVarchar(100),
work_stage NVarchar(100),
project_name NVarchar(100),
location NVarchar(100)))
The first 2 parameters that I need to send are @startweek and @endweek for these,I need to find out how to send the last friday as "@endweek" and the friday of 4 weeks ago as "@startweek" (4 fridays before).
if I want to execute with hard coded @startweek and @endweek the Stored Procedure in the Database, I can do it with the following command:
exec timesheet_r12..TIME_lynx_extract'19 Jul 2018','16 Aug 2019',null,null,null,null,null,null,null,null,null,null,null
this is the error I'm getting when executing the package in SSIS:
So right now what I would need is to know how to pass the parameters to SSIS, and how to make them dinamyc, @startweek and @endweek can be calculated.