The problem here is that the Pro*C SQL parser isn't exactly the same as the RDBMS SQL parser, so it doesn't understand all valid SQL.

The solution is to use Dynamic SQL instead and pass the SQL as a string to the database, to be interpreted directly by the database.