[TRAFODION-3169] Add *Syntax Descriptions and Examples* for *EXTRACT Function* in *Trafodion SQL Reference Manual*2
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/3ea0617c Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/3ea0617c Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/3ea0617c Branch: refs/heads/master Commit: 3ea0617c04a8c63c0a2589ab760784543151af3e Parents: 776f38c Author: liu.yu <qwerty...@hotmail.com> Authored: Mon Jul 30 11:42:50 2018 +0800 Committer: liu.yu <qwerty...@hotmail.com> Committed: Mon Jul 30 11:42:50 2018 +0800 ---------------------------------------------------------------------- .../_chapters/sql_functions_and_expressions.adoc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/3ea0617c/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---------------------------------------------------------------------- diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc index 3e7c987..7a76d09 100644 --- a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc +++ b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc @@ -4437,9 +4437,12 @@ interval value expression. It returns an exact numeric value. EXTRACT (datetime-field FROM extract-source) ``` -* `_datetime-field_` is: +[[extract_function_syntax]] +=== Syntax Descriptions of Extract Function + +* `_datetime-field_` and `_extract-source_` are: + -.Details of `_datetime-field_` +.Details of `_datetime-field_` and `_extract-source_` [cols="20%,40%,40%"] |=== ^| `_datetime-filed_` @@ -4546,14 +4549,14 @@ a| * `_datetime-expression_` + | WEEK a| * `_datetime-expression_` + -a| Week of year. + +Week of year. + -* The value 1 is returned for a datetime that occurs in the first 7 days of the year if the year begins on Sunday. + +** The value 1 is returned for a datetime that occurs in the first 7 days of the year if the year begins on Sunday. + Otherwise, the value 1 is returned for a datetime that occurs in the partial week before the start of the first Sunday. -* The value *53* is returned for a datetime that occurs in the last full or partial week of the year. +** The value *53* is returned for a datetime that occurs in the last full or partial week of the year. -* The value *54* is returned for a datetime that occurs in the last full or partial week of the leap year if the leap year begins on Saturday. +** The value *54* is returned for a datetime that occurs in the last full or partial week of the leap year if the leap year begins on Saturday. a| * `_datetime-expression_` ** DATE @@ -9707,7 +9710,9 @@ is an expression that gives a datetime value. * `_format-string_` + -.Details of `_format-string_` +is one of the following character string literals: ++ +.Details of `_format-string_` and `_character-expression_` [cols="3*.^"] |=== ^| *Supported* `_character-expression_`