Skip to main content

Celonis Product Documentation

HANA SQL

The Intelligent Business Cloud offers several predefined statements and functions which can be used in your transformations. Additionally, there are some differences to HANA Studio.

Separating queries

When writing SQL code for HANA databases, semicolons are not allowed. Please use "go" on a separate line to execute queries individually.

Example:

DROP TABLE ABC
go
CREATE COLUMN TABLE ABC(id INT)
Deleting objects if they exist
DROP_TABLE_IF_EXISTS stored procedure

Using the stored procedure "DROP_TABLE_IF_EXISTS" you can delete a table and if it does not exist you will not receive an error.

Example:

CALL DROP_TABLE_IF_EXISTS('ABC')
DROP_VIEW_IF_EXISTS stored procedure

Using the stored procedure "DROP_VIEW_IF_EXISTS" you can delete a view and if it does not exist you will not receive an error.

Example:

CALL DROP_VIEW_IF_EXISTS('XYZ')