涛
涛涛小财主
Unregistered / Unconfirmed
GUEST, unregistred user!
'select *
from (select ATM网点名,穿墙或大堂,网点名称,d14022.终端号,sum(业务量) as 业务量,sum(吐钞量) as 吐钞量
from (select * from atmmx right outer join d14022 on atmmx.终端号= d14022.终端号 where d14022.日期>=#'+FormatDateTime('yyyy-mm-dd',RzDateTimePicker1.DateTime)+'# and d14022.日期<=#'+FormatDateTime('yyyy-mm-dd',RzDateTimePicker2.DateTime)+'# and d14022.终端号<> '+''''+'总 计'+''''+ 'order by d14022.日期)
group by 网点名称,d14022.终端号,ATM网点名,穿墙或大堂)
order by 业务量 desc'
以上代码在使用ACCESS数据库时正常,SQL server下如何写??
from (select ATM网点名,穿墙或大堂,网点名称,d14022.终端号,sum(业务量) as 业务量,sum(吐钞量) as 吐钞量
from (select * from atmmx right outer join d14022 on atmmx.终端号= d14022.终端号 where d14022.日期>=#'+FormatDateTime('yyyy-mm-dd',RzDateTimePicker1.DateTime)+'# and d14022.日期<=#'+FormatDateTime('yyyy-mm-dd',RzDateTimePicker2.DateTime)+'# and d14022.终端号<> '+''''+'总 计'+''''+ 'order by d14022.日期)
group by 网点名称,d14022.终端号,ATM网点名,穿墙或大堂)
order by 业务量 desc'
以上代码在使用ACCESS数据库时正常,SQL server下如何写??