passing date parameter in ssis 2008 at run time

  • hi again,

    i need to run data parameter in ssis 2008 through BIDS

    For example, the package contains dumping the data into table when u select 1st april, 2013.

    then the data should be extracted for previous 3 months (1-jan-2013 to 31-mar-2013)

    regards

    shaun 2012

  • Need cheap SQL Server 2008 Standard Product Key[/url]

  • You can pass the rundate dynamically using SSIS package config file.

    When you run SSIS package, it first checks the variable/property values in config file. If found any, it will over ride the default values.

    Thanks,
    Naveen.
    Every thought is a cause and every condition an effect

  • Hi,

    Could you be a little more elaborative?

    Assuming that you have difficulty passing the date,

    1. I'd suggest : Use an sQL query to get the first day of the current month and pass it to an output variable in SSIS.

    2. Depending on the variable, calculate a start range( Current month -2months). Assign it in other variable and use it in your SQL query to get data between the ranges.

  • i had created variable but not sure how to use it in the execute sql task query.

    I had created varriable

    Mydate as datetime- data type.

    and i have execute task to delet record as

    delete from abc where year(admit_date) = year('2013/01/01')

    ..

    So i want to replace

    '2013/01/01' with Mydate variable..

    Shaun..

  • in the area where you give SQL query say,

    "delete from tableA where createdate= ? "

    and in parameters tab in the source editor, please add an input parameter. user::Mydate is the variable in ssis which u can pass as parameter.

  • thank you so much, it is working now..

    Shaun..

Viewing 7 posts - 1 through 6 (of 6 total)

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