Advertisement
EliasJRodriguez

ConversionBSD2021+CONTAB

Sep 28th, 2021
1,751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.60 KB | None | 0 0
  1. CREATE FUNCTION  [dbo]._dcBolivarFuerte (@Valor decimal(32,2)) RETURNS  decimal(32,2)
  2.   AS  
  3.    BEGIN  
  4.      declare @Result decimal(32,2)    Set  @Result = @Valor  
  5.        If @Result<>0  
  6.        begin  
  7.        Set @Result = ISNULL(CAST(ROUND(@Valor/1000000,3)AS DECIMAL(32,2)),0.0)
  8.         end  
  9.         RETURN @Result
  10.         END
  11.         GO
  12.  CREATE FUNCTION  [dbo]._dcBolivar(@Valor decimal(32,2)) RETURNS  decimal(32,2)
  13.   AS  
  14.    BEGIN  
  15.      declare @Result decimal(32,2)    Set  @Result = @Valor  
  16.        If @Result<>0  
  17.        begin     Set @Result = Round(@valor/1000000.0,3)  
  18.         end  
  19.         RETURN @Result  
  20.         END
  21.         GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement