Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Posts
    3

    Unanswered: SQL Update returns -999

    hi, I was wondering if someone could give me some suggestions
    with a problem I'm having with an SQL statement. My statement is
    doing an update to a table that has been locked by my informix program and returns a "STATUS" -999, but also has a "NATERR" of -1767.

    The statement looks something like the following -
    "update table set value = ? where current of lock_cursor"

    Any suggestions? Thanks!

    Andy

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: SQL Update returns -999

    Originally posted by cadderly21
    hi, I was wondering if someone could give me some suggestions
    with a problem I'm having with an SQL statement. My statement is
    doing an update to a table that has been locked by my informix program and returns a "STATUS" -999, but also has a "NATERR" of -1767.

    The statement looks something like the following -
    "update table set value = ? where current of lock_cursor"

    Any suggestions? Thanks!

    Andy
    If that means you are getting the Oracle error ORA-01767, then the problem is that you are trying to update a list of columns like this:

    UPDATE table
    SET (col1, col2) = (123, 'A')
    WHERE ...;

    That is invalid syntax for Oracle. Instead, should say either:

    UPDATE table
    SET col1 = 123, col2 = 'A'
    WHERE ...;

    or

    UPDATE table
    SET (col1, col2) = (SELECT 123, 'A' FROM other_table WHERE...)
    WHERE ...;

  3. #3
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Are you getting this error on Informix or Oracle? What the actual UPDATE SQL?

    Can you post it so I can see the syntax you are using? Not clear from your post.


    Hope that helps,

    clio_usa
    OCP - DBA

Posting Permissions

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