Loop query

0

Hi,

I have a simple postgresql query which returns three fields. I want to repeat that query in a loop. My "solution" right now is copy&paste the query several times with union, but this is not flexible. I want to repeat the query the number of times indicated in a parameter by the user. How can I do that?

Thanks in advance!

enol.cordero's picture
Joined: Jul 21 2015 - 5:57am
Last seen: 3 years 11 months ago

1 Answer:

0

You can implement the repetition of the result set for N times in esProc easily, using the following code:

A1=$select f1,f2,f3 from tb

A2=A1*argN

Find more examples from http://blog.raqsoft.com/?p=4744 .

calculate.machine's picture
Joined: Jan 13 2015 - 11:40pm
Last seen: 3 years 7 months ago
Feedback
randomness