In reply to Leonid Batkhan.

Thanks, I saw IFN when I dug deeper into IFC. IFC worked well for setting a true/false condition based on finding certain characters in a string, a SQL query in this case.

is_select_distinct = ifc(index(upcase(compress(sql_qry, " "), "SELECTDISTINCT")) > 0, "T", "F");