Home > Mobile >  Table Column Not Updating
Table Column Not Updating

Time:12-06

update 
    table_1 as q
set 
    q_sequence = (row_number() OVER(
            PARTITION BY
            q.account_uid
            ,q.c_c_uid
            ,q.a_uid
             order by q.a_time ASC) as new

This does not work, I get the following error message:

Query 1: ERROR: syntax error at or near "as" LINE 10: order by q.a_time ASC) as new

Any suggestions?

CodePudding user response:

You are incorrectly using the as keyword here.

as is used for aliasing a table or a column in a select statement: https://www.w3schools.com/mysql/mysql_alias.asp

Removing as new should solve you syntax error.

  • Related