cancel
Showing results for 
Search instead for 
Did you mean: 

NXQL query

Nuxeo_User
Confirmed Champ
Confirmed Champ

Hi :) I am making a NXQL and passsing a parameter like this: session.query("SELECT * FROM document_type_name WHERE xpath_name LIKE " +parameter+"%");

But it throws an exception saying Syntax error : Invalid token at offset 50 Any idea?

2 REPLIES 2

Kevin_Leturc
Star Contributor
Star Contributor

Hi,

Stacktrace is always welcomed here. It could help to debug.

In your case, I think your missing the surrounding quotes. See the documentation examples.

In your case it would be:

session.query(“SELECT * FROM document_type_name WHERE xpath_name LIKE '" + parameter + "%'");

Thanks Kevin it worked.But it receives an empty list.The xpath is not wrong .the parameter too.I don't get it

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.