Friday, 5 October 2018

SQL failed with error "column ambiguously defined" in HANA Database

Tags



Symptom
Execution of SQL statement failed with error:

SAP DBTech JDBC: [268]: column ambiguously defined: $rowid$: line col (at pos xxxx)

Environment

    HANA 1.0
    HANA 2.0

Reproducing the Issue

Execute the SQL statement via HANA studio SQL console or hdbsql
Cause

When internal columns such as $rowid$ is used, table name needs to be defined, otherwise, error message "column ambiguously defined" will occure
 
Resolution

If your SQL statement contains

ORDER BY "$rowid$"
And the execution failed with error "column ambiguously defined", you need to modify the statement to include the table name, for example:

ORDER BY ."$rowid$"

More details Refer Snote : 2695943


EmoticonEmoticon

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:o
:>)
(o)
:p
:-?
(p)
:-s
8-)
:-t
:-b
b-(
(y)
x-)
(h)

Note: only a member of this blog may post a comment.