开发写的sql看不太懂啊---求教高手指点下
Select sum(nvl(a.amt, 0)) amt1,sum(nvl(b.amt, 0)) amt2,
sum(nvl(a.amt, 0)) - sum(nvl(b.amt, 0)) amt3,
nvl(curbal, 0) amt4,
ORIGINALBAL amt5,
curbal amt6,
endbal amt7,
t.Account,
t.ctrlid,
t.bdglevel,
m.account oriaccount
From t_glbdgctrl t,
t_glrecord a,
t_glrecordbdg b,
(Select Distinct ctrlid, account
From (Select case
when b.amt > 0 then
a.fromctrlid
else
a.toctrlid
end ctrlid,
nvl(b.account, 0) account
From T_PLANMAIN a,
(select * from t_glrecord where dc = -1) b
Where a.billid = b.objectid(+)
And a.vchtypeid = b.vchtypeid(+)
and a.billid = 341923
and a.vchtypeid = 15)) m
Where t.ctrlid = m.ctrlid
And (t.ctrlid = a.ctrlid And a.dc = -1 And a.recid = b.recid(+))
Group By t.Originalbal,
t.Curbal,
t.Endbal,
t.Account,
t.Ctrlid,
t.Bdglevel,
m.Account Select sum(nvl(a.amt, 0)) amt1,
sum(nvl(b.amt, 0)) amt2,
sum(nvl(a.amt, 0)) - sum(nvl(b.amt, 0)) amt3,
nvl(curbal, 0) amt4,
ORIGINALBAL amt5,
curbal amt6,
endbal amt7,
t.Account,
t.ctrlid,
t.bdglevel,
m.account oriaccount
From t_glbdgctrl t,
t_glrecord a,
t_glrecordbdg b,
m
Where t.ctrlid = m.ctrlid
And (t.ctrlid = a.ctrlid And a.dc = -1 And a.recid = b.recid(+))
Group By t.Originalbal,
t.Curbal,
t.Endbal,
t.Account,
t.Ctrlid,
t.Bdglevel,
m.Account
以上是t, a, b, m四个表做连接(join),然后对连接结果进行分组(group by)。
其中,表m是查询出来的,即 m =
(Select Distinct ctrlid, account
From m2)
其中,表m2也是查询出来的,即 m2 =
(Select case
when b.amt > 0 then
a.fromctrlid
else
a.toctrlid
end ctrlid,
nvl(b.account, 0) account
From T_PLANMAIN a,
(select * from t_glrecord where dc = -1) b
Where a.billid = b.objectid(+)
And a.vchtypeid = b.vchtypeid(+)
and a.billid = 341923
and a.vchtypeid = 15))
以上代码表明,m2是表a和表b做连接(join)的结果。其中b也是查询所得,即 b = (select * from t_glrecord where dc = -1)
qtp求教
自己在录制好的QTP脚本中插入一行:“Browser("用户登录").Page("财政管理一体化信息系统(IFMIS)_3").WebTable("序号").ChildItem(3,7,"WebEdit",0).set"0.01"”结果回放的时候报错:
Browser("用户登录").Page("财政管理一体化信息系统(IFMIS)_3").WebTable("序号").ChildItem(3,7,"WebEdit",0).set"0.01"
求教:怎样把插入的代码在对象库中添加
回复 3# 的帖子
楼上QTP 的问题,怎么问道这帖子里面了??回复 3# 的帖子
代码中的几个对象已经在对象库中了吗?可能是对象库中缺少某一个对象导致的。“Browser("用户登录").”
“Page("财政管理一体化信息系统(IFMIS)_3").”
“WebTable("序号").”
“ChildItem(3,7,"WebEdit",0).”
如果没有,可以在resources--object repository 中添加对象到对象库按钮;
选中与添加对象有关联的已经存在对象识别,添加就可以了。
PS:QTP的问题,可以到专门的QTP版本提问,那样你能得到更快速的回复。
谢谢
谢谢各位指点!!!
页:
[1]