Using variables in query in OLEDB source
Hi, I am trying to use two variables for storing the dates (BeginDate and EndDate). Now based on these dates, I need to fetch data using OLEDB Source, the query goes something like this:- Select * from temp where CoverageDate between --- and ---- This query is there inside one CTE Now I want to use those two variables for the range. Is there any way:---- I have tried something like this but it doesn't work and gives me date/string conversion problem.... between '@[USER::BeginDate]' and '@[USER::EndDate]'........
February 21st, 2011 4:13am

Use parameters: http://msdn.microsoft.com/en-us/library/ms141696.aspx Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 4:20am

User parameters: http://msdn.microsoft.com/en-us/library/ms141696.aspx Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
February 21st, 2011 4:23am

Have a look at the following blog post which shows how to map variables in an OLEDB source. http://geekswithblogs.net/stun/archive/2009/03/05/mapping-stored-procedure-parameters-in-ssis-ole-db-source-editor.aspx every day is a school day My Blog
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 4:24am

What is the data type of the 2 varaibles you are trying to use. Set it to string and set the dates in the format: MM.DD/YYYYMy Blog | Ask Me
February 21st, 2011 6:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics