A rowset based on the SQL command was not returned by the OLE DB provider

  • Hi, can any body help me,

    Data flow task contains OLEDB source which execute sp, while parse in OLEDB Editor it parse successfuly and also give result in preview, but while Execute Data flow task it give following error:

    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    my sp is as under :

    USE [COF_Daily]

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    ALTER procedure [dbo].[Sp_Compliance_No_of_Customers_having_Top10Percent_Deposits]

    As

    Declare @b-2 as integer

    set @b-2=1

    WHILE ( ( select SUM(Amount) From (

    select top (@b) SUM(local_eqv) Amount

    From Daily_Deposits D , [10.33.0.58].Atlas_Bank.dbo.Business_Relation C

    where D.relation_id =C.Relation_id and D.ason_date = (Select [Current Day] From Date)

    Group by C.relation_id , C.F_name+' '+M_Name+' '+L_Name

    order by sum(Local_eqv) desc ) a ) < (

    Select (SUM(local_eqv))*0.1 as Ten_Per_Deposit from Daily_Deposits

    where ason_date = (Select [Current Day] From Date)) )

    begin

    UPDATE Depositors_holding_TenPercent SET NO_OF_CUSTOMER = @b-2+1

    begin

    select top (@b+1) C.relation_id , C.F_name+' '+M_Name+' '+L_Name As Customer_name , SUM(Local_eqv)/1000000 as Amount

    From Daily_Deposits D , [10.33.0.58].Atlas_Bank.dbo.Business_Relation C

    where D.relation_id =C.Relation_id and D.ason_date = (Select [Current Day] From Date)

    Group by C.relation_id , C.F_name+' '+M_Name+' '+L_Name

    order by sum(Local_eqv) desc

    end

    IF ( select SUM(Amount) From (

    select top (@b) SUM(local_eqv) Amount

    From Daily_Deposits D , [10.33.0.58].Atlas_Bank.dbo.Business_Relation C

    where D.relation_id =C.Relation_id and D.ason_date = (Select [Current Day] From Date)

    Group by C.relation_id , C.F_name+' '+M_Name+' '+L_Name

    order by sum(Local_eqv) desc ) aa ) > (Select (SUM(local_eqv))*0.1 as Ten_Per_Deposit from Daily_Deposits

    where ason_date = (Select [Current Day] From Date))

    BREAK

    ELSE

    set @b-2=@B+1

    CONTINUE

    END

Viewing 0 posts

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