scriptscribe
MIS
Hi,
I'm running the following subquery:
The subquery itself runs fine if I run it by itself. All I want to do is put the results of the subquery into a temp table "#SumDaysTemp" to do some date math and I'm getting the following error:
Any help would be greatly appreciated.
Thanks,
Mike
I'm running the following subquery:
Code:
select *
into #SumDaysTemp
from (select * from #SumDays
join (Select Max(Acctnum) as AcctNumID,a.AcctNum, a.firstname, a.lastname, a.dob
From #Sumdays a
group by a.AcctNum, a.firstname, a.lastname, a.dob
Having (Count(AcctNum) > 1)) B on
c.AcctNum = B.AcctNum)
The subquery itself runs fine if I run it by itself. All I want to do is put the results of the subquery into a temp table "#SumDaysTemp" to do some date math and I'm getting the following error:
Line 11: Incorrect syntax near ')'.
Any help would be greatly appreciated.
Thanks,
Mike