I need this kind of query to hana, i used the same query on SQL SERVER;
IF NOT EXISTS (SELECT * FROM "@MyUserTable" WHERE "Code" = 'xxx')
THEN (INSERT INTO "@MyUserTable"("Code","Name")
VALUES((Select IFNULL(MAX(TO_INT("Code")), 0)+1 FROM "@MyUserTable")
,'valueName'
)
)
ELSE (UPDATE "@MyUserTable"
SET "Name" = 'valueName'
WHERE "Cade" = 'xxx')
On hana studio this query returned error.
Maybe you may help me to find a solution.