About substring

1-10 of 17Refresh
Manual
141

Strings in JPQL and Criteria Queries

('China') is evaluated to 5. LOCATE - Locating Substrings The LOCATE(str, substr [, start]) function searches a substring and returns its position. For example: LOCATE('India', 'a') is evaluated to 5 ... of the first character is 1. Zero (0) is returned if the substring is not found. The third argument
JPA Doc
85

substring(x, from)

Method javax.persistence.criteria.CriteriaBuilder Expression substring(   Expression x,   int from ) Create an expression for substring extraction. Extracts a substring starting ... expression from - start position Returns: expression corresponding to substring extraction Since: JPA 2.0
JPA Doc
85

substring(x, from)

Method javax.persistence.criteria.CriteriaBuilder Expression substring(   Expression x,   Expression from ) Create an expression for substring extraction. Extracts a substring starting at the specified position through to end of the string. First position is 1. Parameters
JPA Doc
85

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression substring(   Expression x,   Expression from,   Expression len ) Create an expression for substring extraction. Extracts a substring of given length starting at the specified position. First position is 1. Parameters: x
JPA Doc
85

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression substring(   Expression x,   int from,   int len ) Create an expression for substring extraction. Extracts a substring ... expression from - start position len - length Returns: expression corresponding to substring extraction Since: JPA 2.0
JPA Doc
85

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression substring(   Expression x,   Expression from,   Expression len ) Create an expression for substring extraction. Extracts a substring of given length starting at the specified position. First position is 1
Manual
51

GROUP BY and HAVING clauses

(no Aggregates) The following query groups all the countries by their first letter: SELECT SUBSTRING(c.name, 1, 1) FROM Country c GROUP BY SUBSTRING(c.name, 1, 1); The FROM clause defines iteration ... (which does not use aggregates) is equivalent to the following query: SELECT DISTINCT SUBSTRING(c.name, 1
JPA Doc
30

javax.persistence.criteria.CriteriaBuilder

Returns: square root Since: JPA 2.0 Expression substring( Expression x, int from) Create an expression for substring extraction. Create an expression for substring extraction. Extracts a substring starting at the specified position through to end of the string. First position is 1
Forum
26

substring works with string but not with char

i want to select all entities whose name starts with a specific letter, i can use this query with a string parameter select f from Foo f where substring(f.name, 1, 1) = ?1 but when i use a char, the query does not return anything. i think it should also be possible to use char/Character types
Manual
23

FROM clause (JPQL / Criteria API)

, SUBSTRING, SUM, THEN,TRAILING, TRIM, TRUE, TYPE, UNKNOWN, UPDATE, UPPER, VALUE, WHEN, WHERE. JPQL