[#6485] Support SQL Server LEN() function
This commit is contained in:
parent
37f116a86e
commit
051cb2571d
@ -380,7 +380,7 @@ orderBy =
|
||||
offsetFetch =
|
||||
'OFFSET' unsignedInteger
|
||||
[
|
||||
[ 'ROW' | 'ROWS' ] 'FETCH' ( 'FIRST' | 'NEXT' ) unsignedInteger ( 'ROW' | 'ROWS' ) ( 'ONLY' | 'WITH TIES' )
|
||||
[ 'ROW' | 'ROWS' ] 'FETCH' ( 'FIRST' | 'NEXT' ) [ unsignedInteger ] ( 'ROW' | 'ROWS' ) ( 'ONLY' | 'WITH TIES' )
|
||||
| [ 'LIMIT' unsignedInteger [ 'WITH TIES' ] ]
|
||||
]
|
||||
| 'LIMIT' unsignedInteger
|
||||
@ -568,6 +568,7 @@ term =
|
||||
| 'LPAD' '(' field ',' field [ ',' field ] ')'
|
||||
| 'LTRIM' '(' field ')'
|
||||
| 'LEFT' '(' field ',' field ')'
|
||||
| 'LEN' '(' field ')'
|
||||
| 'LENGTH' '(' field ')'
|
||||
| 'LN' '(' sum ')'
|
||||
| 'LOG' '(' sum ',' unsignedInteger ')'
|
||||
|
||||
@ -4585,7 +4585,7 @@ final class ParserImpl implements Parser {
|
||||
}
|
||||
|
||||
private static final Field<?> parseFieldLengthIf(ParserContext ctx) {
|
||||
if (parseFunctionNameIf(ctx, "LENGTH")) {
|
||||
if (parseFunctionNameIf(ctx, "LENGTH") || parseFunctionNameIf(ctx, "LEN")) {
|
||||
parse(ctx, '(');
|
||||
Field<String> f1 = (Field) parseField(ctx, S);
|
||||
parse(ctx, ')');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user