Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2013

    Question Unanswered: Is anonymous SPL possible?

    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 in advance for any answers/ideas/feedback.

  2. #2
    Join Date
    Sep 2011
    Pont l'Abbé, Brittany, France
    Provided Answers: 1

    would'nt "SELECT ... CASE" or "ORDER ... CASE" be a beginning of a solution ?

  3. #3
    Join Date
    Oct 2013
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts