question

apple avatar image
apple asked

date parameters

I need to pass 2 dates as parameter like today's date and yesterday's date to a stored procedure. I added the variables as datetime In oledb source I am calling the stored procedure and in the parameters I mapped the variables and added Excel destination. The package executes when I hardcode the variables but fails when I pass as parameters . Appreciate your help
ssis
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
Without knowing the error message or the code, we're just going to be guessing at what the problem might be.
4 Likes 4 ·

1 Answer

·
kaddie001 avatar image
kaddie001 answered
I presume that by "oledb source" you meant the "execute sql" task. It sounds like your variable mapping is correct so I'm wondering what your execute sql call looks like. To pass variables to a stored proc from SSIS, you need the following syntax in the SQLStatement field: exec ?,? You need a ? for each variable that you want to pass. Since you are passing 2 variables, I included 2 question marks in my example.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.