UFN_GET_CONVERTEDEXTERNALSERVICESTATUS
Return
Return Type |
---|
int |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EXTERNALSTATUSCODE | int | IN |
Definition
Copy
create function dbo.UFN_GET_CONVERTEDEXTERNALSERVICESTATUS (
@EXTERNALSTATUSCODE int
)
returns int
with execute as caller
as begin
declare @CONVERTEDSTATUSCODE int;
set @CONVERTEDSTATUSCODE =
case @EXTERNALSTATUSCODE
when 200 then 3 -- Completed
when 201 then 10 -- Uploading
when 202 then 1 -- Processing (Accepted)
when 203 then 1 -- Submitting (Accepted)
when 204 then 5 -- Incomplete (Canceled)
when 205 then 4 -- Exception
else @EXTERNALSTATUSCODE -- Just use the passed in code
end
return @CONVERTEDSTATUSCODE;
end