Synonym function similar to in hql

Hello all!

Please help me make a request to HQL.
you need to get a list of all the values ​​of the starting with 0 or without it

The following values ​​are suitable:
07776, 0007776, 7776,
The following are not:
1007776, 97776

In PostgreSQL, this performs the Select * from Table What Value Similar to ‘[0] * 7776’; But there is no such function in HQL

Hello, @eugene.excilife

You can achieve this in HQL by using the LIKE clause with a pattern that matches your criteria. Here’s how you can do it:

SELECT * 
FROM Table 
WHERE value LIKE '0%7776'
   OR value LIKE '%7776';

This query will return all records where the value starts with a ‘0’ followed by ‘7776’ or just ‘7776’.

I hope this will be helpful for you
Best regards
Chris Wright