20130427

select * from sf_bt where YEAR='2012' and cost != 0  and section=cost order by housecode; --42


select a.housecode from sf_bt a,(select housecode from sf_detail where chargemonth='2012') b
where a.;

select housecode from sf_detail having count(housecode) > 1 and chargemonth='2012' group by housecode,chargemonth ;
select * from sf_bt where housecode = '0000-007-00-00-00';
select * from sf_detail where housecode = '0000-007-00-00-00';

select b.housecode from sf_detail a,sf_bt b
where a.housecode = b.housecode
and a.clustercoding = b.clustercoding
and a.chargemonth = '2012'
and b.year = '2012'
and a.putincbk != b.cost
order by b.housecode;

--一户一笔财拨    36
select distinct b.id,a.housecode,a.putincbk,b.cost from sf_detail a,sf_bt b
where a.housecode = b.housecode
and a.clustercoding = b.clustercoding
--and a.putincbk = b.cost
and b.year='2012'
and a.chargemonth = '2012'
and b.housecode = '0000-066-00-00-00';

select id,housecode,section,cost from sf_bt where housecode in  ('0000-066-00-00-00',
'0000-078-00-00-00',
'0000-080-00-00-00',
'0000-080-00-00-00',
'0000-081-00-00-05',
'0000-081-00-00-05',
'0000-081-00-00-05'
) and year = '2012' order by housecode;

select housecode,putincbk from sf_detail where housecode in ('0000-066-00-00-00',
'0000-078-00-00-00',
'0000-080-00-00-00',
'0000-080-00-00-00',
'0000-081-00-00-05',
'0000-081-00-00-05',
'0000-081-00-00-05'
) and chargemonth = '2012' order by housecode;

select * from sf_detail where housecode='0000-080-00-00-00';

select housecode,nowaccount from sf_imprest where housecode in  ('0000-066-00-00-00',
'0000-078-00-00-00',
'0000-080-00-00-00',
'0000-080-00-00-00',
'0000-081-00-00-05',
'0000-081-00-00-05',
'0000-081-00-00-05'
) order by housecode;
select housecode,balance from sf_bill where housecode in  ('0000-066-00-00-00',
'0000-078-00-00-00',
'0000-080-00-00-00',
'0000-080-00-00-00',
'0000-081-00-00-05',
'0000-081-00-00-05',
'0000-081-00-00-05'
) order by housecode;

--一户多笔财拨
select distinct b.id,a.housecode,a.putincbk,b.b.cost,count(b.housecode) from sf_detail a,sf_bt b
where a.housecode(+) = b.housecode
and a.clustercoding(+) = b.clustercoding
--and a.putincbk = b.cost
group by b.id, a.housecode, a.putincbk, b.b.cost;

select * from sf_bt where housecode='6011-001-X0-02-36';

select * from sf_bill aa,sf_bt bb
where aa.housecode = bb.housecode
and aa.clustercoding = bb.clustercoding
and aa.balance = bb.cost;

select * from sf_imprest;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值