This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
dev:sql:functions:lj [2009/12/07 15:27] tdo created |
dev:sql:functions:lj [2016/06/28 22:38] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
| - | <html><div align="center"><span style="color:red">DRAFT</span></div></html> | + | {{page>:sql_bar&nofooter&noeditbtn}} |
| ====== Omnidex SQL Function: $LJ ====== | ====== Omnidex SQL Function: $LJ ====== | ||
| - | {{page>:sql_bar&nofooter&noeditbtn}} | ||
| ===== Description ===== | ===== Description ===== | ||
| - | The $LJ function will left-justify a string by eliminating the leading white space. | + | Left-justify the character expression. |
| - | The return data type is C STRING. | + | This function return a STRING datatype. |
| - | The return length is: | ||
| - | |||
| - | the length of the string if the string is a C STRING column | ||
| - | the length of the string +1 if the string is a CHAR column or a literal. | ||
| ===== Syntax ===== | ===== Syntax ===== | ||
| - | $LJ( < column_spec | 'string' > ) | ||
| - | |||
| - | == < column_spec | 'string' > == | ||
| - | |||
| - | Required. The string that is to be left. This can be a string literal or other scalar_expression resulting in a string. | ||
| - | |||
| - | ===== Example ===== | ||
| - | |||
| - | ==== Example 1 ==== | ||
| - | select $LJ(company), $RJ(company) from customers where company='systems' | ||
| - | |||
| - | $LJ(CUSTOMERS.COMPANY) | ||
| - | ---------------------------------------------- | ||
| - | |||
| - | $RJ(CUSTOMERS.COMPANY) | ||
| - | ---------------------------------------------- | ||
| - | Dynamic Information Systems Corporation | + | $LJ( character_expression ) |
| - | Dynamic Information Systems Corporation | + | == character_expression == |
| - | Camco Systems | + | Required. Any expression that returns a character-class datatype. Examples of expressions are columns, concatenations of columns, literal strings and functions that return a character datatype. |
| - | Camco Systems | ||
| - | ASK Computer Systems, Inc. | + | ===== Examples ===== |
| + | ==== Example: Column ==== | ||
| + | <code> | ||
| + | > select $lj(name) nme from individuals; | ||
| - | ASK Computer Systems, Inc. | + | NME |
| + | -------------------------------------------------- | ||
| + | MS. MARY LEWIS | ||
| + | MRS. ALICE R TOLLIVER | ||
| + | MR. SIDNEY K TOLLIVER | ||
| + | MRS. JENNIFER J HOPKINS | ||
| + | MR. CHARLIE HOPKINS | ||
| + | MS. KIMBERLY BLUE | ||
| + | KATHLEEN TUCKER | ||
| + | </code> | ||
| - | ... | + | ====== Additional Resources ====== |
| + | See also: | ||
| + | {{page>dev:sql:functions:see_also_string&nofooter&noeditbtn&noheader}} | ||
| {{page>:bottom_add&nofooter&noeditbtn}} | {{page>:bottom_add&nofooter&noeditbtn}} | ||