Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:sql:functions:convert [2010/07/27 21:16]
els
dev:sql:functions:convert [2016/06/28 22:38] (current)
Line 1: Line 1:
 {{page>:​top_add&​nofooter&​noeditbtn}} {{page>:​top_add&​nofooter&​noeditbtn}}
 {{page>:​sql_bar&​nofooter&​noeditbtn}} {{page>:​sql_bar&​nofooter&​noeditbtn}}
 +
 ====== Omnidex SQL Function: $CONVERT ====== ====== Omnidex SQL Function: $CONVERT ======
 ===== Description ===== ===== Description =====
Line 28: Line 29:
  
 == options == == options ==
 +
 +Optional. ​ Options can be applied to the data conversion to affect the output. ​ The supported options are:
 +
 +^Option ​ ^Description ​                                  ^
 +|LJ      |Left-justify ​                                 |
 +|RJ      |Right-justify ​                                |
 +|UPS     ​|Upshift ​                                      |
 +|DNS     ​|Downshift ​                                    |
 +|SF      |Space-fill ​                                   |
 +|ZF      |Zero-fill ​                                    |
 +|BWZ     ​|Blank when zero                               |
  
  
Line 47: Line 59:
 </​code>​ </​code>​
  
 +==== Example 2: $CONVERT with options ====
 +
 +<​code>​
 +> select $convert(name,​ '​char(50)',,'​rj dns') name_rj from individuals;​
 +
 +NAME_RJ
 +--------------------------------------------------
 +                                    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 ====== ====== Additional Resources ======
 
Back to top
dev/sql/functions/convert.1280265388.txt.gz ยท Last modified: 2016/06/28 22:38 (external edit)