using sql-expressions in certificate templates