I'm not sure if this is a feature of "generic" SQL or not, but Microsoft's SQL Server allows criteria in a WHERE clause to be specified using the keywork LIKE and wildcards. Is there a way to do this with HQL?
For example, with Transact-SQL, I could write:
Code:
SELECT * FROM PEOPLE WHERE FIRST_NAME LIKE 'J%'
which would retrieve a list of records from the PEOPLE table where the first name started with the letter J. SQL Server uses the % as the wildcard character - again, not sure how this compares with other dialects of SQL.
Anyone know of a comparable technique using HQL? I'm trying to find records in a long list where I only part of an alphanumeric identifier, so I'd like to be able to allow the user to supply a fragment of the identifier and return partial matches.
Thanks in advance.