Link to home
Start Free TrialLog in
Avatar of rschmehl
rschmehlFlag for United States of America

asked on

how do i read this sql code

hello,

I think i'm having a brain cramp. but the exec @failing   stored proc   ..output  
followed by if @failing > 0


 is throwing me off here.  Can someone explain how to "read" the code .    
Is the output stATEMENT rEPLACING THE @FAILING WITH THE return code being st in the stored proc if it errors out?



         set @LocalProcedure = 'up_XL_zUpdateStgSiteToSite'
      exec @Failed = JabilDBImport.dbo.up_zUpdateImportJobEvent
         @ImportJobID = @ImportJobID,
         @Event = 'Update Site',
         @StartDTS = @CreateUpdateDTS,
         @AddMessage = 'Started',
         @Status = 'Processing...',
         @EndDTS = null
      exec @Failed = up_XL_zGetDataSourceID @ImportJobID, @DataSourceID OUTPUT
      if @Failed <> 0
        begin
          -- ams 7/9/02 c1/a2
          --RAISERROR('up_zUpdateStgSiteToSite',18,1)
          set @ErrorMessage = @LocalProcedure + ' - Error calling up_XL_zGetDataSourceID'
          RAISERROR(@ErrorMessage,18,1)
          return 1
        end
SOLUTION
Avatar of Ken Butters
Ken Butters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rschmehl

ASKER

I'm not sure I understand the exec @Failed proc_ABC , why put the @failedin at all when you are exec Proc_abc?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks alot