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:abs [2010/07/02 08:11]
tdo
dev:sql:functions:abs [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: ABS ====== 
 {{page>:​sql_bar&​nofooter&​noeditbtn}} {{page>:​sql_bar&​nofooter&​noeditbtn}}
 +====== Omnidex SQL Function: ABS ======
 ===== Description ===== ===== Description =====
-The ABS function returns the absolute value of column.+The ABS function returns the absolute value of column.   
 + 
 +This function returns the same datatype as the passed parameter.
  
 ===== Syntax ===== ===== Syntax =====
-  ​select abs(col1) from trans_table;+ 
 +  ABS( numeric_expression ) 
 + 
 +== numeric_expression == 
 + 
 +Required. ​ Any expression that returns a numeric-class datatype. 
 + 
 +===== Examples ===== 
 + 
 +=== Example 1: Column === 
 + 
 +<​code>​ 
 +select ​longitude, ​abs(longitude) from countries; 
 + 
 +LONGITUDE ​                        ​ABS(LONGITUDE) 
 +-------------------------------- ​ -------------------------------- 
 +-176.199997 ​                      ​176.199997  
 +-175.000000 ​                      ​175.000000  
 +-172.330002 ​                      ​172.330002  
 +-171.750000 ​                      ​171.750000  
 +-170.699997 ​                      ​170.699997  
 +-170.000000 ​                      ​170.000000  
 +-169.860001 ​                      ​169.860001  
 +</​code>​ 
 + 
 +====== Additional Resources ====== 
 + 
 +See also: 
 +{{page>​dev:​sql:​functions:​see_also_math&​noheader&​nofooter&​noeditbtn}}
  
 {{page>:​bottom_add&​nofooter&​noeditbtn}} {{page>:​bottom_add&​nofooter&​noeditbtn}}
 
Back to top
dev/sql/functions/abs.1278058298.txt.gz · Last modified: 2016/06/28 22:38 (external edit)