This shows you the differences between two versions of the page.
dev:sql:functions:column_length [2016/06/28 22:38] |
dev:sql:functions:column_length [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page>:top_add&nofooter&noeditbtn}} | ||
+ | {{page>:sql_bar&nofooter&noeditbtn}} | ||
+ | |||
+ | ====== Omnidex SQL Function: $COLUMN_LENGTH ====== | ||
+ | ===== Description ===== | ||
+ | The $COLUMN_LENGTH function returns the number of the column in bytes. | ||
+ | |||
+ | $COLUMN_LENGTH should not be confused with $DATA_LENGTH and CHARACTER_LENGTH. CHARACTER_LENGTH returns the number of character in a string column, not including trailing spaces. $DATA_LENGTH returns the number of characters plus the null-terminator for STRING datatypes. | ||
+ | |||
+ | This function returns an INTEGER datatype. | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | $COLUMN_LENGTH ( column ) | ||
+ | |||
+ | == column == | ||
+ | Required. The name of a column, qualified by the table and database as needed. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | ==== Example 1: Column ==== | ||
+ | <code> | ||
+ | > select name, $col_length(name) len from individuals; | ||
+ | |||
+ | NAME LEN | ||
+ | -------------------------------------------------- ----------- | ||
+ | MS. MARY LEWIS 50 | ||
+ | MRS. ALICE R TOLLIVER 50 | ||
+ | MR. SIDNEY K TOLLIVER 50 | ||
+ | MRS. JENNIFER J HOPKINS 50 | ||
+ | MR. CHARLIE HOPKINS 50 | ||
+ | MS. KIMBERLY BLUE 50 | ||
+ | KATHLEEN TUCKER 50 | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ====== Additional Resources ====== | ||
+ | |||
+ | See also: | ||
+ | {{page>dev:sql:functions:see_also_utility&nofooter&noeditbtn&noheader}} | ||
+ | |||
+ | {{page>:bottom_add&nofooter&noeditbtn}} |