How can we help you today? How can we help you today?

Version 7.0.0.60 issue

Simple update statement on a single table, no joins, etc.

SQL Prompt underlines and refuses to validate columns "Comment", "InventoryID" and "StatusID".
It states, "The column X could not be resolved as a column with that name exists in multiple tables."
Those column names do exist in other tables in the database. First I've seen this error. I just updated from 7.0.0.40 to 7.0.0.60 today.

RHA8z22.png?1
    UPDATE  [InventoryHeader]
    SET     [StatusID] = 3,
            [PostedBy] = @PDSID,
            [PostedDate] = CURRENT_TIMESTAMP,
            [Comment] = ISNULL(@Comment, [Comment])
    FROM    [InventoryHeader]
    WHERE   [StatusID] = 2
            AND [InventoryID] = @InventoryID;
jsreynolds1
0

Comments

5 comments

  • Aaron L
    Hi John,

    Apologies, it looks like this was a knock on from a bug fix we added in 7.0.0.49 to qualify column names if they're ambiguous in an UPDATE statement. However it looks like the logic wasn't correct if the UPDATE statement was updating from the same table as its target.

    We think we've got a fix in the latest build which you can download from here.

    Thanks for reporting this!

    Aaron.
    Aaron L
    0
  • jsreynolds1
    Aaron,

    I can confirm that the new build fixes the issue.

    Best,

    John
    jsreynolds1
    0
  • Aaron L
    Hi John,

    Thanks for the confirmation! I'm glad that fixed it. Please do let us know if you have any other issues.

    Thanks,
    Aaron.
    Aaron L
    0
  • mishaluba
    Hello!

    I have run into a similar problem (and I am on version 7.0.0.62) where the SQL Prompt complains: "... column could not be resolved as a column with that name exists in multiple tables...". Below is my query (slightly revised to protect the innocent):

    UPDATE TableA
    SET Column1 = ( SELECT Column1
    FROM TableB
    )
    WHERE Column1 IS NULL
    AND MyType = 'A';
    mishaluba
    0
  • mishaluba
    Upgrading to the latest version (7.3.0.775) solved this problem for me.
    mishaluba
    0

Add comment

Please sign in to leave a comment.