Test if a dynamic query returns 0 results
Hi, what’s the best way to check if your query return 0 records?
If $$$ISOK(sc)
{
Set tResult = sqlStatement.%Execute()
WHILE tResult.%Next()
{
set tRecords = tResult.%ROWCOUNT
}
if (tRecords = "")
{
write "no records"
}
}
Product version: IRIS 2021.2