ALTER PROCEDURE getContCollecinfo
@plnCode varchar(10)
AS
DECLARE @ssn varchar(12)
SELECT a.ssn, a.lname,a.fname, a.cont, a.comp
into #tempa from cont_collec_payroll_info a
JOIN contMessages b ON
a.SSN = b.SSN
JOIN cont_Collec_MessageType c ON
b.messCode = c.messCode
where a.plnCode=@plnCode and c.IsError = 1
alter table #tempa
add Errors int
update #tempa
SET Errors = count(d.isError) from cont_collec_messagetype d
join contmessages e on
d.messCode = e.messCode
join #tempa f on
e.ssn = f.ssn
where d.isError = 1 and f.ssn = e.ssn
select * from #tempa
drop table #tempa
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE