Skip to Content

How to process delete data operation in hana

Aug 08, 2017 at 01:41 AM


avatar image

Hi experts:

I have a problem about calculate view in hana:

now, there are three statements for delete some data in other system, and I need to develop these in hana.the statements like this:

Delete table1 where A <> '1000' and B <> '01'

Delete table1 where C = '1' and D <> '20'

Delete table1 where E = '2' and F <> 'C'

We know,in calculation view, it does not allow delete operation,so I process them throwed to create two projections for first statement and union them, then as the same method, I create another two projections for second statement above first union,and union them,the third statement like this above union. but it gets data slowly and little performance.Like below picture:

Now I want to know how to process this condition in calculation view in hana, thanks.

1.png (34.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Benedict Venmani Felix Aug 10, 2017 at 05:50 PM

Hi Mingjie,

Will a single project with a filter expression work for you?

"(A <> '1000' and B <> '01') OR (C = '1' and D <> '20') OR (E = '2' and F <> 'C')"

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Thank you for your replys. and I have to know this logic transform "OR", but I am not sure these operations weather include one projection? I think it is not. so I used to some projections and union them. but I find out to used union that is lower performance. My question is that may another methods for this logic or not?
Sergio Guerrero Aug 09, 2017 at 07:04 PM


the delete operations cannot happen in the calculation view as you know - the delete operations have to happen on a stored procedure. if you happen to have flags or logic to not include those flags, then you can do so by excluding the records in a projection...but you won't be able to delete unless you do so from a stored procedure.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

yes, as you said,delete operation should be include some stored porcedures, and this condition is ok. but I have to developed through Graphical for calculation view, so I want to find some methods for this logic and improve performance. I will expect your replays. thanks.