`
onlier
  • 浏览: 2349 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
ceiling函数返回大于或等于所给数字表达式的最小整数。 floor函数返回小于或等于所给数字表达式的最大整数。 比如 celling(12.1) 结果为 13 floor(12.1)结果为 12
create table #abc (num decimal(14,6) null) insert into #abc (num) select 123.211432 union select 123.219103 union select 123.210921 select  * , case when '0' = substring( cast ( num as varchar) , charindex ( '.' ,cast ( num as varchar) )  +3 ,1) then cast ( num as decimal (12,2 ) )  else cast( ce ...
charindex函数返回字符或字符串在另一个字符串中的起始位置。charindex函数调用方法如下:   charindex ( expression1 , expression2 [ , start_location ] )   expression1是要到expression2中寻找的字符中,start_location是charindex函数开始在expression2中找expression1的位置。 patindex函数返回字符或字符串在另一个字符串或表达式中的起始位置,patindex函数支持搜索字符串中使用通配符,这使patindex函数对于变化的搜索字符串非常有价值。pa ...
Global site tag (gtag.js) - Google Analytics