Vote count: 0
I'm trying to find two different tracelogs within a certain time fram of each other. I tried the below Datediff hoping it would work but it returns the following error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
It seems like it's not happy that it has reached multiple instances within the subquery but I don't know how to fix that. The code I am trying is:
SELECT[LogTimeStamp]
,[MachineName]
,[LogMessage]
FROM [Abel].[dbo].[TraceLog]
where LogTimeStamp >'2016-12-05 13:15:21.377'
and
DATEDIFF(hour,
(SELECT [LogTimeStamp] FROM [Abel].[dbo].[TraceLog] where LogMessage like '%Pos:416 F34Lab Procedure Code #%99111%'),
(SELECT [LogTimeStamp] FROM [Abel].[dbo].[TraceLog] where LogMessage like '%DELETION METHOD CALLED%')) < 1
order by LogTimeStamp asc
asked 4 secs ago
Trying to find two tracelogs within a certain time span
Aucun commentaire:
Enregistrer un commentaire