原文:03. 行列转换写法小结行列转换,通常有2种方法,一是CASE WHEN/UNION;一是PIVOT/UNPIVOT。对于行值或列数不固定的情况,需要用动态SQL。一. 行转列--drop table RowToColcreate table RowToCol(ID int,Code varc...
分类:
其他好文 时间:
2014-06-25 23:47:41
阅读次数:
308
For a period before the recent nationwide gold industry shutdown, Duration was Zimbabwe’s second largest gold producer. Up until that point, it had en...
分类:
其他好文 时间:
2014-06-25 23:20:27
阅读次数:
274
DATA:gv_1TYPEc.DATA:gv_2TYPEi.gv_2=60.IFgv_2>=0ANDgv_2=60ANDgv_2=70ANDgv_2=80ANDgv_2=90ANDgv_2<=100.gv_1='E'.else.gv_1='F'.ENDIF.CASEgv_1.WHEN'A'.*MES...
分类:
其他好文 时间:
2014-06-25 21:53:04
阅读次数:
1789
NULLIF()函数接受两个参数。如果它们相等,那么返回空值;否则,返回第一个参数。等价于下面的表达式:case when expression1=expression2 then nullelse expression1end通常使用NULLIF()函数可以防止除零错误。如果变量b为0,则下面的表...
分类:
其他好文 时间:
2014-06-24 12:11:19
阅读次数:
173
Bonding is aggregation multiple links to single link in order to increase throughput and achieve redundancy in case one of links fails. At least, offi...
分类:
其他好文 时间:
2014-06-24 10:28:42
阅读次数:
211
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:
其他好文 时间:
2014-06-24 10:22:48
阅读次数:
214
最近看了异步框架的文章,
这个有个bad case, 我不知道采用什么方案解决.
钱有100,两口子之前有约定要剩下90. 老公看到有100,花10元,花完以后因为事件异步,数据不一致,此时老婆刷新页面也看到100,再花10元. 最终所有异步事件都处理完之后最终是80元. 不符合用户的预期.
这个问题如何解决?...
分类:
其他好文 时间:
2014-06-22 19:01:04
阅读次数:
209
leetcode:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last...
分类:
其他好文 时间:
2014-06-22 13:41:07
阅读次数:
154
altertriggerUserInfo_update--触发器(每次修改则触发)
onUserInfoforupdate
as
declare@aint
set@a=(selectUserJifenfrominserted)
updateUserInfosetUserTouXian=
case
when@a<100then‘贫民Θ1.gif‘
when@a<100and@a<500then‘平民Θ2.gif‘
when@a>499and@a<..
分类:
其他好文 时间:
2014-06-22 10:19:39
阅读次数:
214
One of the most important use-case in any cloud is provisioning a VM . In this article we shall do a walk through about an instance(VM) being provisio...
分类:
其他好文 时间:
2014-06-21 16:59:43
阅读次数:
376