Hi this link to Pinal dev(MVP) 's scirpt bank.
SQL SCRIPT BANK
CREATE PROCEDURE [dbo].[tESTrEP]
AS
BEGIN
select
Jobrequest.jobid,
Jobrequest.jobTitle,
jobrequest.jobstatusid,
CONVERT(VARCHAR(11),RequestDate,103)[RequestDate],
count(jobrequest.jobTitle)[ToBeHire]
from candidate,jobrequest,Department,JobApplication
where
jobrequest.jobid=jobapplication.jobId and
jobapplication.candidateId=candidate.candidateId and
Department.DepartmentId=Jobrequest.DepartmentId and
Candidate.candidatestatustypeid = 5
group by(jobrequest.jobTitle),Jobrequest.jobid,jobrequest.jobstatusid,
CONVERT(VARCHAR(11),RequestDate,103)
compute sum(count(jobrequest.jobTitle))
END
Monday, March 30, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment