• Thnx Steve n GilaMonster.....

    What i have done is i have created below SP;

    declare @WhereCond varchar(max)

    declare @BeforeWhere varchar(max)

    declare @AfterWher varchar(max)

    declare @totalquery nvarchar(max)

    set @BeforeWhere=

    'select * from Mytable where'

    select @WhereCond=CNFGRTN_VAL from CONFIG_TABLE

    set @totalquery=@BeforeWhere+@WhereCond

    insert into #TEMPtable execute sp_executesql @finalQuery

    select * from #TEMPtable

    And this SP i have called in SSIS OLEDB source. Please let me know wheter this would be working for large dataset.