Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to do a WHILE DO loop on data from a SQL Calculation View

$
0
0

Hi John,

 

Method 2 would give an error for sure as loop's WHILE condition would check whether VAR_2 > 0 and whereas the VAR_2 variable does not hold any value.

 

However, you should get a similar result(as given below) when trying to execute via the method 1

 

I tried to build a similar procedure(just the loop part of it)

Ques2.1.JPG

Output:


Ques2.2.JPGQues2.3.JPG

If the code goes through loop one should get similar kind of display. If you're getting these kind of screens in method 1 then the select statement could be faulty otherwise if you are not getting these screens then the loop itself has an issue.

 

I am not able to see why it is not working. The code seems to be correct.

 

Can you try the same code I have written in your system. Let's see if this piece of code works.

Which version of HANA DB are you using? There might be a slight possibility of bugs with the version you're using. I am on HANA Rev 70.

 

--

Shreepad


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>