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

 

 

$COLUMN_LENGTH | $COL_LEN

 

The $COL_LEN and $COLUMN_LENGTH functions return the defined length of a column. The return datatype is a 4-byte INTEGER. Both functions are identical.

These functions differ from the CHAR_LENGTH and CHARACTER_LENGTH functions:

  • $COL_LEN and $COLUMN_LENGTH return the length defined for the column in the Omnidex Environment Catalog.
  • CHAR_LENGTH and CHARACTER_LENGTH return the actual length of the data contained in the column for that record.

Syntax

Example

SQL Reference

Commands

Functions

 

Syntax

$COL_LEN(column) | $COLUMN_LENGTH(column)

$COL_LEN | $COLUMN_LENGTH

Required. Both return the same results.

(column)

Required. An unambiguous column name.

  • If this function is used in a SQL SELECT, INSERT, or UPDATE statement, then the column parameter must be from one of the tables referenced in the statement.
  • If this function is used in a COLUMN statement within an environment file, then column must be the column being declared.

top

 

Example

select company,

$col_len(company),

char_length(company)
from customers
where company='national computer'

Company: National Computer Systems
$COLUMN_LEN: 40
CHARACTER_L: 25

 

 

top

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

DISC | Documentation Home