Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | True |
| Execute As | |
| Null on Null Input | False |
| Schema Bound | False |
| Assembly |
Parameters
| Name | Data Type | Length | Description |
|---|---|---|---|
| (Result) | decimal | 9 | |
| @valueStr | varchar | 255 |
SQL Script
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE FUNCTION dbo.StrToDec5 (
@valueStr varchar(255) )
RETURNS decimal(18,5)
WITH encryption ,
EXECUTE AS CALLER
AS
BEGIN
declare @iv decimal(18,4)
if (@valueStr is null) or (len(ltrim(rtrim(@valueStr)))=0)
begin
set @iv= 0
end
else
begin
set @iv= (cast(@valueStr as decimal(18,5)))
end
return @iv
END;
GO
GO
CREATE FUNCTION dbo.StrToDec5 (
@valueStr varchar(255) )
RETURNS decimal(18,5)
WITH encryption ,
EXECUTE AS CALLER
AS
BEGIN
declare @iv decimal(18,4)
if (@valueStr is null) or (len(ltrim(rtrim(@valueStr)))=0)
begin
set @iv= 0
end
else
begin
set @iv= (cast(@valueStr as decimal(18,5)))
end
return @iv
END;
GO
Depends On
No items found
Used By
No items found