Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    8

    Unanswered: SQL statement empty or blank Error

    I currently have multiple dynamic queries created and everything is working great except in one of my stored procedures. I keep receiving the error "...SQL statement empty or blank...During precompiling, the SQL statement referred to has no text between the EXEC SQL and the ending delimiter..."

    This doesn't make sense because I'm not doing anything different than my other files. I've even tried to copy/paste a statement from a different procedure, which has ran without a problem, and I receive the same error. Any ideas?

    (example)
    DECLARE STMT varchar(1000);
    SET STMT = 'UPDATE '||TableParm||' SET x=?...';
    PREPARE s1 FOR STMT;
    EXECUTE s1 USING PARM1;

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    Can you post error message? Please alo read Must Read before posting for any other tip.

    Grofaty

  3. #3
    Join Date
    Feb 2005
    Posts
    8

    Found the problem...

    One of the variables I was passing to my string was empty. I didn't realize it was being cleared out before being used.

    It would help if the error messages could be more clear and provide a bit more information. I guess I'll know for next time.

    Thank you!

Posting Permissions

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