Easy to Create, Easy to Change - Easy to use!

Function::String

MidW



Parameters


Returns/Result


Examples


Reference

midw

Type

Text Function

Purpose

The midw function extracts a specified number of words from the middle of a text value.

Syntax

midw( TEXT VALUE, m, n)

?where

m is the starting position in the text value and

n is the number of characters to extract.

Returns

A text value n words in length.

Usage

midw(FIELDNAME, m, n) returns n words beginning at word number position m (inclusive). Spaces and punctuation symbols are included.

Examples

midw( "Sapphire International Ltd." , 2, 1)

Returns: International

 

midw( "Club ParaDEASE Catalog" , 2, 2)

Returns: ParaDEASE Catalog

 

midw( STREET, 2, 3)

Returns: Three words beginning at the second word position in the STREET field for every record that is processed. If a record contains the value "540 Avenida de los Delfines" in the STREET field, the function returns "Avenida de los".

See Also


On the forum about MidW

On the blog about MidW