Does anyone know of a way to execute custom procedural logic in Informix (IDS 11.70) without having to code it in a stored procedure?
This is the same sort of thing that could be done with an Oracle anonymous PL/SQL block. Primarily I am looking for a way to execute one of two blocks of SQL statements depending on some other evaluated database condition. In other words, an IF-THEN-ELSE statement. But I want to do this in a SQL script that directly contains the logic. The SQL script will be executed using dbaccess. I neither want nor have authority to create stored procedures on the fly.
After searching IBM and various other forums, I am mostly convinced there is no way to do what I want in Informix. But I would love to find out that I am wrong.
Thanks for the response. CASE does work well for conditionalizing expression evaluation. However, expressions are not the same as statements. The difference becomes particularly significant when the desired statements modify data instead of just reading it.