Search code examples
javasqlhibernatehql

Binary value in WHERE clause (Hibernate)


I want to select rows with a binary value in the WHERE clause. The binary value is in HEX: "07F4"

The following HQL Statement doesn't work ("unexpected token X").

from Agprfw where prfdatk1 = X'07F4'

Solution

  • I found the solution:

    from Agprfw where HEX(prfdatk1) = '07F4'