Hi experts,
In a given table in hana, is it possible to go though cells. My current progress is hampered by the need to specify column names. For example,
SELECT <column name> FROM <table name>;
DECLARE i INT;
DECLARE j INT;
SELECT COUNT(*) INTO j FROM <table name>;
FOR i in 1..j DO
if <table name>. <column name>[i] > 0.05
then .........
END FOR;
But I want to go through all the cells regardless of the columns. Is it possible in hana with static sql?
Thanks
Hello
What is your requirement? I'm sure there will be a more elegant solution than iterating over all rows and columns.
Michael
Yes, it is possible with Static SQL
use this Query:
Select
Case
when clolumn1 > 0.05
then ...
else
end as column1,
Case
when clolumn2 > 0.05
then ...
else
end as column2,
.....
....
....
<like wise for all columns>
From Table.
Happy HANA 😊
Gopinath.
Add a comment