zwei1121

博客园 首页 新随笔 联系 订阅 管理

insert into HelpClass
( ClassID,ClassName,ParrentClassID,RootID,ClassOrder,ClassState)
(select (select IsNUll(max(classid),0)+1 as b from helpclass),'66',0,0,0,1)






SELECT Province as Province,City as City,ZoneCode,count(*) Total FROM dbo.PV_CallBackLog_20070619 LEFT OUTER JOIN dbo.S_PhoneArea on dbo.ResetNum(CallingNumber) = Number   group by dbo.S_PhoneArea.Province,dbo.S_PhoneArea.City,ZoneCode


SELECT Province as Province,City as City,ZoneCode,count(*) Total
FROM dbo.call_bill_400 LEFT OUTER JOIN dbo.S_PhoneArea on dbo.ResetNum(Caller) = Number 
where SynDate between '2007-06-21' and '2007-06-22'
group by dbo.S_PhoneArea.Province,dbo.S_PhoneArea.City,ZoneCode

posted on 2007-06-29 17:08  zwei  阅读(168)  评论(0编辑  收藏  举报