|
楼主 |
发表于 2004-1-9 14:47
|
显示全部楼层
就是你说的那样!
以下是引用loadhigh在2004-1-8 21:23:00的发言:
请上传你的access文件.不能排序应该是不可能的.而且你的"引入"是什么意思,是否为来自不同的表.
如:
select 表1.a,表2.b ,表1.a+表2.b as c from 表1,表2 where 表1.[id字段]=表2.[id字段]
以下是我设计的查询,由于是门外人,乱了点。你受累。
SELECT [03_xl].id, [03_hh_hm_q].hm, ck_0312![12月全口径时点余额]-ckjs_0312!全口径时点余额 AS 时点新增, IIf([时点新增]>0,IIf([时点新增]/jh_0312!全口径存款时点计划*150>450,450,[时点新增]/jh_0312!全口径存款时点计划*150),0) AS 时点新增得分, ck_0312![12月全口径均值]-ckjs_0312!全口径日均基数 AS 日均新增, IIf([日均新增]>0,IIf([日均新增]/jh_0312!全口径存款日均计划*350>1050,1050,[日均新增]/jh_0312!全口径存款日均计划*350),0) AS 日均新增得分, [wbck-0312].时点比年初合计新增, IIf([wbck-0312]!时点比年初合计新增>0,IIf([wbck-0312]!时点比年初合计新增/(jh_0312!外币个人计划+jh_0312!外币对公计划)*50>100,100,[wbck-0312]!时点比年初合计新增/(jh_0312!外币个人计划+jh_0312!外币对公计划)*50),0) AS 外币新增得分, zjyw_0312.收支净额, IIf(zjyw_0312!收支净额/10000/jh_0312!中间业务计划*200>400,400,zjyw_0312!收支净额/10000/jh_0312!中间业务计划*200) AS 中间业务得分, [0312得分_查询1].国际结算量, [0312得分_查询1].结算量得分, [0312得分_查询1].贷款新增, [0312得分_查询1].贷款新增得分, [0312得分_查询1].不良得分, [0312得分_查询1].个贷加分, [0312得分_查询1].备付加分, [人均新增加分2-0312].人均新增加分, [电子银行-0312].加分总计, [0312得分_查询1].督察扣分, [时点新增得分]+[日均新增得分]+[外币新增得分]+[中间业务得分]+[结算量得分]+[贷款新增得分]+[人均新增得分]+[不良得分]+[个贷加分]+[备付加分]+[加分总计]-[督察扣分] AS 总得分
FROM ((((((((((03_xl INNER JOIN 03_hh_hm_q ON [03_xl].id = [03_hh_hm_q].id) INNER JOIN ck_0312 ON [03_xl].id = ck_0312.id) INNER JOIN ckjs_0312 ON [03_xl].id = ckjs_0312.id) INNER JOIN [dk-0312] ON [03_xl].id = [dk-0312].id) INNER JOIN gjyw_0312 ON [03_xl].id = gjyw_0312.id) INNER JOIN jh_0312 ON [03_xl].id = jh_0312.id) INNER JOIN [wbck-0312] ON [03_xl].id = [wbck-0312].id) INNER JOIN 0312得分_查询1 ON [03_xl].id = [0312得分_查询1].id) INNER JOIN zjyw_0312 ON [03_xl].id = zjyw_0312.id) INNER JOIN [人均新增加分2-0312] ON [03_xl].id = [人均新增加分2-0312].id) INNER JOIN [电子银行-0312] ON [03_xl].id = [电子银行-0312].id
WHERE ((([03_xl].ncxl)<=12))
ORDER BY [时点新增得分]+[日均新增得分]+[外币新增得分]+[中间业务得分]+[结算量得分]+[贷款新增得分]+[人均新增得分]+[不良得分]+[个贷加分]+[备付加分]+[加分总计]-[督察扣分] DESC; |
|