Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Unanswered: how to declare global temporary table in UDB8

    I tested the following statement in UDB7.1 successfully, but failed at UDB8.0 at same OS(win2k).

    String str_max ="declare global temporary table ttt2 like log_load_delivery_tbyd_tbl on commit preserve rows not logged with replace in tempok1";
    Statement stmt_max = con.createStatement();
    ResultSet rs_max = stmt_max.executeQuery(str_max);

    The exception message is "[IBM][JDBC driver]CLI0637E query cannot be found"

    Under UDB8's command prompt, the same SQL statement works well, but it failes when I invoke it from my java code.

    Anyone could help me with this problem? Why the same statement works well in my old UDB7.1 but failed at udb8?

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: how to declare global temporary table in UDB8

    Originally posted by chunbo
    I tested the following statement in UDB7.1 successfully, but failed at UDB8.0 at same OS(win2k).

    String str_max ="declare global temporary table ttt2 like log_load_delivery_tbyd_tbl on commit preserve rows not logged with replace in tempok1";
    Statement stmt_max = con.createStatement();
    ResultSet rs_max = stmt_max.executeQuery(str_max);

    The exception message is "[IBM][JDBC driver]CLI0637E query cannot be found"

    Try using execute() or executeUpdate() instead of executeQuery(). This isn't a query, after all.

  3. #3
    Join Date
    Aug 2003
    Posts
    3
    Great answer. That resolves my problem. Thanks a bunch.

Posting Permissions

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