This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
dev:sql:functions:rj [2009/12/07 14:47] tdo created |
dev:sql:functions:rj [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> | ||
| - | ====== Omnidex SQL Function: $RJ ====== | ||
| {{page>:sql_bar&nofooter&noeditbtn}} | {{page>:sql_bar&nofooter&noeditbtn}} | ||
| + | ====== Omnidex SQL Function: $RJ ====== | ||
| ===== Description ===== | ===== Description ===== | ||
| - | The $RJ function will right-justify a string by eliminating the trailing white space and inserting leading spaces as needed. | + | Right-justify the character expression. |
| + | |||
| + | This function returns a STRING datatype. | ||
| - | The return data type is C STRING. | ||
| ===== Syntax ===== | ===== Syntax ===== | ||
| - | $RJ(string) | ||
| - | string | + | $RJ( character_expression ) |
| - | Required. The string that is to be right justified. This can be a string literal or other scalar_expression resulting in a string. | + | |
| - | ===== Example ===== | + | == character_expression == |
| - | ==== Example 1 ==== | + | |
| + | 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. | ||
| + | |||
| + | |||
| + | ===== Examples ===== | ||
| + | ==== Example: Column ==== | ||
| + | <code> | ||
| + | > select $rj(name) nme from individuals; | ||
| + | |||
| + | 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 ====== | ||
| - | select $LJ(company), $RJ(company) from customers where company='systems' | + | See also: |
| + | {{page>dev:sql:functions:see_also_string&nofooter&noeditbtn&noheader}} | ||
| - | Dynamic Information Systems Corporation | ||
| - | Dynamic Information Systems Corporation | ||
| + | |||
| {{page>:bottom_add&nofooter&noeditbtn}} | {{page>:bottom_add&nofooter&noeditbtn}} | ||