sybase 有没有类似oracle decode(字段,值1,翻译值1,值2,翻译值2,缺省翻译值)的函数呢???如果我往一个大表中灌入数据最后又的用update 修改那样的话,特别消耗时间,而且服务器容易死
by 新手上路samson - Sybase - 2004-02-27 18:40:30 阅读(1982) 回复(5)
做报表,需要把数字对应为文字 if(i==1){ select '数字一' }else if(i==2){ select '数字二' }else if(i==3){ select '数字三' } 不想使用两个表联合查询,
In unix command mode, I type this ps command searched for oracle default process then got 10 process, listed below. ora_pmon_mydb ora_dbw0_mydb ora_lgwr_mydb ora_ckpt_mydb ora_smon_mydb ora_reco_mydb ora_cj90_mydb ora_qmn0_mydb ora_s000_mydb ora_d000_mydb can someone tell me what does it count ? thanks
insert into t_1 ( c_date ) values ( :dtOneDay ); 希望如果 dtOneDay >; 0 时插入原值, dtOneDay <= 0 时插入 NULL 谢谢!
我的数据是以日期和部门条件作主键存储的,也就是说: 某1部门在一个月中每天都有一条销售数据,每天的数据是一条记录,然后我要通过一个SQL语句把该月中每天的数据查询出来在一行中进行显示,请问大家这有没有什么好的办法呀? 部门1,2005.08.01,10000.00 部门1,2005.08.02,80000.00 部门1,2005.08.31,45000.00 我要显示的方式是: 部门1, 10000.00,80000.00,...45000.00
用decode写一个判断语句: 如果字段A=1,字段B!=2,则C就是它的本身值,否则C=0 高手指教。 网上找了一些都是简单的例如: decode('A','1',C,0) 可如何同时满足A和B两个条件就不会了。 先谢了
InnoDB Row counting using Indexes This is always mentioned that InnoDB is slower in giving results for count(*) as compared to MyISAM. But as Peter points out in his blog that this fact only applies to count(*) queries without WHERE clause. This text is from Peter's blog only - "If you have query like SELECT count(*) FROM IMAGE WHERE USER_ID=5 this query will be executed same way both for M...