怎么获取金额那些是正数,那些是负数
请问表中的金额字段怎么获取那些是正数,那些是负数。
谢谢
[解决办法]
declare @T table (col money)insert into @Tselect 3.23 union allselect 4.54 union allselect -1.9 union allselect 9.8 union allselect -1.3select * from @T where col>0select * from @T where sign(col)=1/*col---------------------3.234.549.80*/select * from @T where col<0select * from @T where sign(col)=-1/*col----------------------1.90-1.30*/