CrazyJS,疯狂的JS

vb转大写函数

Function RMBChinese(ByVal Rmb As Double) As String On Error Resume Next Dim Rmbexp As String, Rmbda As String, Expda As String, Lent As Integer, Ntyp As Integer, Icnt As Integer, i As Integer, Trmb As String Rmb = Format(Rmb, “###0.00”) If Rmb > 999999999999.99 Then RMBChinese = “需转换的金额整数长度超过了12位!” Exit Function End If Rmbexp = “分角元拾佰仟万拾佰仟亿拾佰仟” Rmbda = “零壹贰叁肆伍陆柒捌玖” Ntyp = 0 Trmb = Replace(CStr(Format(Rmb, “0.00”)), “.”, “”) If Left(Trmb, 1) = “-”  [...]

将查询结果的某列按指定的符号连接起来 SQL函数 返回字符串

–将查询结果的某列按指定的符号连接起来 –AUTHOR:Mender.Z.J ALTER procedure dbo.getColWithMerg (  @preSymbol   varchar(256),  @tailSymbol   varchar(256),  @colName   varchar(50),  @queryStr   varchar(1024),  @retStr  varchar(8000) output )   as BEGIN  declare @count as decimal; declare @sqlStr as varchar(1000); declare @i as decimal; –declare @retStr as varchar(8000); declare @tt as varchar(255); set @i=1; set @sqlStr=’select ‘+ @colName +’ from (‘+@queryStr+’) as t1′ ; &n [...]

将查询结果的某列按指定的符号连接起来的 sql函数 返回表格

--将查询结果的某列按指定的符号连接起来 --AUTHOR:Mender.Z.J ALTER procedure dbo.getColWithMergForTable ( @preSymbol varchar(256), @tailSymbol varchar(256), @colName varchar(50), @queryStr varchar(1024) ) as BEGIN declare @count as decimal; declare @sqlStr as varchar(1000); declare @i as decimal; declare @retStr as varchar(8000); declare @tt as varchar(255); set @i=1; set @sqlStr='select '+ @colName +' from ('+@queryStr+') as t1' ; if exists(select * from dbo.sysobjects where xtype='U' and name=N'tempAbcdbcad') begin drop table tempAbcdbca [...]

判断是否为工作日的sql函数

-- ============================================= -- Author: 扎俊 -- Create date: 2018-07-18 -- Description: 判断是否为工作日的函数 -- ============================================= ALTER FUNCTION isWeekend ( @Day datetime ) RETURNS bit AS BEGIN -- Declare the return variable here DECLARE @ResultVar bit if datediff(d,'1900-01-01',@Day) % 7 >4 set @ResultVar=1 else set @ResultVar=0 RETURN @ResultVar END