The left() function returns a substring of a given string, containing a specified number of leftmost characters.
left(str, length)
| Argument | Type | Description |
|---|---|---|
str | String | The string to extract substring from |
length | Integer > 0 | The number of characters in the substring |
Return type: String
UQLreturn left("a database", 6)
Result: a data
Extract the first 4 characters of the certificate numbers.
UQLfind().nodes({@certificate}) as cert return left(cert.no, 4)