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
Next revision Both sides next revision
dev:sql:functions:cast [2009/12/04 22:37]
tdo
dev:sql:functions:cast [2010/07/04 02:19]
tdo
Line 26: Line 26:
 <code SQL> <code SQL>
 select amount, ​ select amount, ​
-cast(orders.amount as DOUBLE PRECISION) +   cast(orders.amount as DOUBLE PRECISION) 
-from orders where status='​cncl'​+   ​from orders where status='​cncl'​;
 </​code>​ </​code>​
 ==== Example 2 ==== ==== Example 2 ====
 <code SQL> <code SQL>
 select order_date, select order_date,
-cast(substring(order_date from 1 for 2) as INTEGER) +   cast(substring(order_date from 1 for 2) as INTEGER) 
-from orders  +   ​from orders  
-where status='​back'​+   ​where status='​back'​;
 </​code>​ </​code>​
  
 
Back to top
dev/sql/functions/cast.txt · Last modified: 2016/06/28 22:38 (external edit)