Same sql query return two different result.
First, thanks in advance for your help :-)
I noticed that a query called directly in a method of a class of a business operation does not return the same result as if I apply the same query in the same Caché database from Squirrel !!!
I don't understand why ???
Here is the query :
FROM Ens.MessageHeader Header
INNER JOIN EnsLib_HL7.Message MsgBody on Header.MessageBodyId = MsgBody.ID AND MsgBody.TimeCreated >= '2021-04-12 00:00:00' AND MsgBody.TimeCreated <= '2021-04-12 02:59:59' AND MsgBody.DocType LIKE '%ADT%' AND MsgBody.Name LIKE 'ADT_%'
WHERE ((Header.SourceConfigName = 'Hl7AdtTcpEprOut' OR Header.TargetConfigName = 'Hl7AdtTcpEprOut' )
AND Header.TimeCreated >= '2021-04-12 00:00:00'
AND Header.TimeCreated <= '2021-04-12 02:59:59'
AND Header.IsError = 0)
If I do it on Squirrel, i find 213 rows.
If I search in the intersystems portal, I find 213 result
If I do exactely the same query in my method in business operation, i find 1875 rows ???
Can't you explain or help me to understand why ?