locked
what have I done wrong in this stored proc with set @updatedCnt = @@RowCount that cuases SQL46029 :: Unexpected end of file occurred RRS feed

  • Question

  • the stored proc in simplified form is

    create Procedure dbo. p_wkholdgFromCsv_upd(@Valuation_dt DATE, @Acct_grp_ID INT, @subAcct_ID INT, @Acct_ID,...
    , @updatedCnt int output)
    AS
    BEGIN
    	DECLARE @w_Acct_ID INT
            ...
           update  dbo.wkholdgFromCsv set Valuation_dt = @Valuation_dt, Acct_grp_ID = @Acct_grp_ID,.....
           where  [Valuation_dt] = @Valuation_dt and [Acct_grp_ID] = @Acct_grp_ID and [subAcct_ID] = @subAcct_ID and [Fi_Sym] = @Fi_Sym
    	set @updatedCnt = @@RowCount 
    END
    

    if I remove the set statement, it will be fine

    Friday, September 25, 2020 7:28 PM

Answers

All replies

  • I'd try asking for help over here.

    https://docs.microsoft.com/en-us/answers/topics/sql-server-transact-sql.html

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Guido Franzke Monday, September 28, 2020 5:40 AM
    • Marked as answer by Guido Franzke Wednesday, September 30, 2020 5:43 AM
    Friday, September 25, 2020 8:06 PM
  • thx, I'll try there
    Friday, September 25, 2020 9:24 PM
  • Sounds good, you're welcome.

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, September 25, 2020 9:25 PM