DISC

Contents | What's New | Quick Links

 

SQL Functions

Introduction

Software Installation

Concepts and Design

Designing Applications

Omnidex Environments

SQL Reference

Omnidex API's

Utilities

Interfaces

Performance Guide

Troubleshooting Guide

Appendix

 

 

CAST

 

The CAST function converts expressions to a specified datatype. Column formatting will be the default for the specified datatype.

Due to conflicts in specifications, the main OmniAccess datatypes are not supported here. The $CONVERT function should be used for OmniAccess datatypes and for more specific functions.

CAST(PRODUCTS.CATEGORY AS CHARACTER(16))

Syntax

Example

SQL Reference

Commands

Functions

 

Syntax

CAST(scalar_expression AS datatype[(n)])

CAST

Required

scalar_expression

Required. The item that is to be cast. Column name.

AS

Required

datatype

Required. The supported SQL92 datatype.

n

Length if applicable.

top

 

Example

select amount,

cast(orders.amount as DOUBLE PRECISION)

from orders where status='cncl'

 

select order_date,

cast(substring(order_date from 1 for 2) as INTEGER)

from orders
where status='back'

 

 

top

Dynamic Information Systems Corporation - Omnidex Version 3.8 Build 6 J15.03-Copyright © 2003

DISC | Documentation Home