You can translate the question and the replies:

Parameters for function

on my linux Denodo 8.0 with the spatial extension I can't figure out how to substitute parameters into a function (at least I think that is the problem). When I run this query it works just like I would expect SELECT mbr_wkt FROM p_f_generatedxml_1 AS p_f_generatedxml_1 WHERE st_intersects(mbr_wkt, 'POLYGON(( 121.365431 9.801057299999918, 121.606481 9.801057299999918, 121.606481 9.898790399999918,121.365431 9.898790399999918, 121.365431 9.801057299999918))') But when I have set up parameters ullng ullat lrlng lrlat and specify the the where clause: st_intersects(p_f_generatedxml_1.mbr_wkt, 'POLYGON((@ullng @lrlat, @lrlng @lrlat, @lrlng @ullat, @ullng @ullat, @ullng @lrlat))') Then the query: SELECT mbr_wkt FROM p_p_f_generatedxml_1 AS p_p_f_generatedxml_1 WHERE (((lrlng = 121.606481 AND ullat = 9.898790399999918) AND lrlat = 9.801057299999918) AND ullng = 121.365431) I get no results and in the vdp-admin.log I get: ERROR 2023-04-11T10:12:46.731 com.denodo.vdb.admin.util.exceptionhandler.VDPEDTExceptionHandler [] - Uncaught error in thread AWT-EventQueue-0 java.lang.IllegalArgumentException: Width and height must be >= 0 at javax.swing.plaf.basic.BasicHTML.getHTMLBaseline( ~[?:?] at javax.swing.plaf.metal.MetalToolTipUI.paint( ~[?:?] at javax.swing.plaf.ComponentUI.update( ~[?:?] ... What am I doing wrong?
11-04-2023 10:29:20 -0400

2 Answers

Hi, I've tried the query and it works fine.  I have set up the parameters in Denodo Scheduler.  When creating the job, you need to have 12 `different` parameters in the parameterized query from the Extraction Section in order for the query to work. For example you can look at this: `st_intersects(p_f_generatedxml_1.mbr_wkt, 'POLYGON((@p1 @p2, @p3 @p4, @p5 @p6, @p7 @p8, @p9 @p10,@p11 @p12))')` The next step would be to add values for those parameters. If you have a valid support user, you may want to contact [Denodo Support]( which will be able to better assist you. I hope this helps!
Denodo Team
14-04-2023 08:39:05 -0400
Thank you for your answer. I made it work using the concat function to create the 'POLYGON' string needed by the st_interesects function. st_intersects(p_f_generatedxml_1.mbr_wkt, concat('POLYGON(( ', ullng, ' ', ullat, ', ', ullng, ' ', lrlat, ', ', lrlng, ' ', lrlat, ', ', lrlng, ' ', ullat, ', ', ullng, ' ', ullat, '))')) This will substitute my parameters (ullng, ullat, lrlng, lrlat) in the concat() function, create a string which is then properly used in the st_intersects() function.
 Edited on: 11-10-2023 14:31:35 -0400
You must sign in to add an answer. If you do not have an account, you can register here