The following query results in error
Warning: Null value is eliminated by an aggregate or other SET operation.
(6 row(s) affected)
However if I only select not an insert it does not give the error but either way I get the correct 6 results?
Anybody have any idea what might throw that error?
With #Temp As(
Select rpid, ttid,
Count(Case When info3 is not null Then 1 End) As CountInfo3,
Min(Case When Info3 is not null Then TSeid End) As MinTseidCount1,
Min(tseid) As MinTSeid
From #UsageTemp
Group By rpid, ttid
),
finalusage as
(
Select T.*
From #Temp
Inner Join #UsageTemp T
On T.TSeid = Case
When CountInfo3 = 1
Then MinTseidCount1
Else MinTSeid
End
)
insert into [TempWil].[dbo].[usage2]
select * from finalusage
Thanks
Simi
Warning: Null value is eliminated by an aggregate or other SET operation.
(6 row(s) affected)
However if I only select not an insert it does not give the error but either way I get the correct 6 results?
Anybody have any idea what might throw that error?
With #Temp As(
Select rpid, ttid,
Count(Case When info3 is not null Then 1 End) As CountInfo3,
Min(Case When Info3 is not null Then TSeid End) As MinTseidCount1,
Min(tseid) As MinTSeid
From #UsageTemp
Group By rpid, ttid
),
finalusage as
(
Select T.*
From #Temp
Inner Join #UsageTemp T
On T.TSeid = Case
When CountInfo3 = 1
Then MinTseidCount1
Else MinTSeid
End
)
insert into [TempWil].[dbo].[usage2]
select * from finalusage
Thanks
Simi