How do i put where condition using Package variables in SSIS

  • 0 down vote favorite

    1

    share [fb] share [tw]

    i have created one ssis package I need run following query

    Insert into mydata.dbo.MonthEndCDSSpreadCalc(Date,CompanyName)

    SELECT Date, CompanyName

    FROM mydata.dbo.UpdateNAV

    WHERE (Date = @[User::Date]) AND (PortfolioId = @[User::PortfolioId]) AND (SecurityType in (@[User::SecurityType]))

    but in above i'm getting error at user variable. running above query into SQL Task please tell me how do i use them properly?

  • In the Execute SQL Task, you put question marks in the query, and use the Parameters function to define them with the package variables.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

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