Sybase
zmycoco2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
展开
-
BCP utility in Sybase(Unix Environment)
We can use below command for bcp out a table to *.dat file, $SYB_BIN/bcp hnwreport.dbo.TblHNWCustomer out ${SYB_DATA}/${TABLE}.prod.dat -I/opt/muni/HNWEnv/HNW_interfaces.txt -U hnwuser -P Lip0v123 -S原创 2013-05-28 13:11:12 · 903 阅读 · 0 评论 -
SQL对值取整并且忽略小数点
(select cast(round(sum(port1.market/1000*secr1.moody_rating_no)/ (select sum(port2.market/1000) from TblHNWPort port2,TblHNWSecr secr2 where port2.cusip = secr2.cusip and port2.key_date = secr2.ke原创 2013-06-03 17:13:16 · 3933 阅读 · 0 评论 -
多条件运算时SQL的写法
当需要基于不同条件产生的结果集上运算时,我们可以采用对单一结果集运算后,保持原有结果集,然后统一根据某个字段聚合后来求一些字段的和。 select A.port_no as port_no, (select max(key_date) from dbo.TblHNWDate) as key_date, sum(A.pfd_shares) as tot_pfd_shares, sum(原创 2013-06-04 19:13:21 · 1319 阅读 · 0 评论 -
Create Table DDL sample(TSQL)
Create Table DDL sample(TSQL)原创 2013-07-05 08:43:27 · 1091 阅读 · 0 评论