Cursors in LN 10.2
I am trying to find out if I can use a prepare/cursor logic to query data in LN. I am coming from an Informix background using 4gl and very green in LN
Let me give an example of an Informix 4gl cursor logic I would like to use in LN:
let sql = 'SELECT item, price, on_hand FROM table_a '
' WHERE item = ', s.item, 'AND company = ' compr
PREPARE cp_cursor FROM sql
DECLARE cx_cursor FROM cp_cursor
FOREACH cx_cursor INTO p.item, p.price,p.on_hand
I know the FOREACH loop is the selectdo in LN but I would like to build a sql where clause in a string so I can use the input field(s) values to help in getting to the data quicker and more accurate.
Thanks in advance for your response.
You can use Dynamic SQL
|All times are GMT +2. The time now is 01:17.|
©2001-2018 - Baanboard.com - Baanforums.com