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

 

 

POSITION

 

Find the position of string1 in string2. The POSITION function returns the position of a string (string1) within another string (string2). If string2 is of length zero, the result is 1. If string1 occurs as a substring within string2, the character position where string1 first occurs is returned. If neither of these conditions is true, the result is 0. The return datatype is a 4-byte INTEGER.

String comparisons are case-sensitive. Use the UPPER and LOWER functions around string1 and string2 to produce a case-insensitive search.

Syntax

Example

SQL Reference

Commands

Functions

 

Syntax

POSITION(string1 IN string2)

POSITION()

Required.

string1

Required. Any valid text string. The text to search for.

IN

Required.

string2

Required. Any valid text string. The text in which to search for string1.

top

 

Example

select company,

position(upper('sys') IN upper(customers.company))

from customers where company='systems'

 

Company

Position

Camco Systems

7

SoftSys Corp

5

 

 

 

top

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

DISC | Documentation Home