How to pass string parameter without quotes?

0

Hi!

I have a very simple query in my report which has an ORDER BY at the end with one parameter:

ORDER BY  $P{form_item_order}

My problem is very simple. The ORDER BY is not wokring. The query looks like this:

product_data.`NAME` AS PRODUCT_NAME,
 
product_data.`ITEM_NR` AS ITEM_NR,
 
product_data.`EAN` AS EAN,

... if I give the parameter in, in the preview and if I execute it in my app, it's not working, because it's a string and it gets quotes. If I enter my query in MySQLWorkbench end execute it without any quote like this: ORDER BY PRODUCT_NAME it's working... I don't know why. But it looks like I need to pass a string without quotes. Is it possible?

VORiAND's picture
10
Joined: Nov 15 2018 - 7:26am
Last seen: 1 month 1 day ago

1 Answer:

0

Use

ORDER BY  $P!{form_item_order}

hozawa's picture
41974
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 hours 1 min ago
Feedback
randomness