@sql in cache object script , sql explorer resulting different results
Hi Community,
I have below embeded sql query in object script class
resulting 1095 into suspendedCount
but same query executed in SQL explorer
SELECT count(ID) FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5'
resulting 0
but once i changed where condition Status='5' to Status='Suspended'
SELECT count(ID) FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='Suspended'
resulting 1095
same embeded sql query in object script class
&sql(SELECT count(ID) into :suspendedCount FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='Suspended' )
resulting 0 into suspendedCount
What is went wrong?