SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 please help me for this Sp
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ramu143
Yak Posting Veteran

64 Posts

Posted - 09/27/2008 :  02:08:37  Show Profile  Reply with Quote
Posted - 09/27/2008 : 00:18:18
--------------------------------------------------------------------------------

i have created one procedure name mohan

i want to job shedule this one out put is 5 columns very rare we are getting out put are we are gettig 0 rows effected

the procedure is like below please modify this one if need and tell me how to job schedule this one.

CREATE procedure MOHAN



as
begin


insert into cdb (machineid,operatorout,devbname,minutes,noofcalls,ACD)

select machineid,operatorout,devbname,minutes,noofcalls,(minutes*1.0/noofcalls) as ACD
from
(

select machineid,operatorout,devbname,sum(talktime)/60 as minutes,count(*) as noofcalls from wholesale.margin.dbo.cdb
where operatorout not like '%_in' and connectflag='1' and devbname like 'dac%' group by machineid,operatorout,devbname
)t
order by machineid,operatorout,devbname


select * from CDB where ACD<1 and noofcalls>30 order by ACD ,noofcalls--- THIS IS THE OUT PUT I NEED TO GET IN JOB SHEDULE>


end


GO

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 09/27/2008 :  02:21:35  Show Profile  Reply with Quote
why are reposting questions again?

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111517
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000