This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
dev:sql:functions:cast [2010/07/04 02:18] tdo |
dev:sql:functions:cast [2010/07/04 02:19] tdo |
||
---|---|---|---|
Line 29: | Line 29: | ||
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> | ||