cancel
Showing results for 
Search instead for 
Did you mean: 

What is the syntax for mentioning computed column in Database Table file in HANA?

srujan_gannamaneni
Participant
0 Kudos

Hi Everyone,

What is the syntax for mentioning computed column in Database Table file in HANA?

Say, A,B and C are the fields to be present in table where C = A+B

We can achieve this with traditional SQL create statement as well as HANA CDS File.

But How can we achieve the same using Database Table file?

Thanks and Regards

Srujan Gannamaneni

srujan_gannamaneni
Participant
0 Kudos

I meant .hdbtable design time object to create table when I mentioned Database table file as it was mentioned with the same name in selection wizard.

Regards

Srujan Gannamaneni

Accepted Solutions (0)

Answers (1)

Answers (1)

shyam_uthaman
Participant

Hi,

Firstly, the .hdbtable is obsolete. Try using .hdbdd or .hdbcds (if you are on Web IDE for HANA ..which I don't think you are on).

Anyways, write that formula in the view above the table or the stored procedure/logic/ETL that is populating the table.

I am not aware of any method to include that logic in the create statement.

Even if you could, it would make sense to add the logic to a layer where you can easily change it whenever required.

Regards,

Shyam

srujan_gannamaneni
Participant
0 Kudos

Hi Shyam,

Thankyou..
Yes, we are not on WebIDE yet but will be soon moving on to it.

Its good to mention the logic either on top of the table or at ETL.
We are trying to prove and propose the same and I am trying to gather all the drawbacks.

BTW..
The annotations which are working at XSA are not working with XS Classic. Eg: @Comment. This is introduced in HANA 2.0 SPS 02 but it throws an error when I tried to use the same with .hdbdd. Is there any way to include comments for Fields in a table?

Thanks and Regards

Srujan Gannamaneni