How to use LIKE in AQL?

hello, I’m trying to use a LIKE in AQL, but it doesn’t work … how do I like to search for any place that has this certain date?

How can I do it?

Hi @luiz_Minelli
would something like this match your question?

So, I do like you and it doesn’t work for me …

I wanted him to catch everyone without the timezone

Am I doing something wrong?

LIKE is only available for String values, I suspect your path …/items[at0075]/value is a DV_DATE_TIME, not a String.

To get the String representation, you need to add a /value to tour path.

Remember operators apply to certain types. I guess the AQL editor is not doing type checking over the paths and operators, that is why you don’t know what the error is.


Hello, Good day, i am also having a similar situation here. I want to have a parameterised search where either a two or three letter input should return all name almost matching the search. How can this be achieved. Thank you

On Better CDR you need to use * as the wildcard

Partial matching with LIKE operator

Allows matching with wildcards * and ?:

  • * stands for any string,
  • ? stands for any character.
SELECT DISTINCT c/archetype_details/template_id/value as templateName
FROM EHR e
CONTAINS COMPOSITION c
WHERE templateName LIKE "Vital*"

WHERE Patient_Name LIKE “McN*” *


so 

WHERE Patient_Name LIKE :PatientMatch

and patientMatch = McN* (the paramterisation adds quotes AFAIK

I wonder if the paramaterisation is adding quotes which get in the way of properly formatting the Like.

worth looking at the executed AQL that will appear in the response