AN10068: How to use the select statement with a guard