Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > S

SLOCI

Scroll Prev Top Next More

(SLOCI(TextNoteVarcharValue,string,arg))

 

Returns the INTEGER value for the number of instances a string appears in a TEXT, NOTE, or VARCHAR value.

 

The argument parameter determines whether the string search is case sensitive, where "0" is not case sensitive while "1" is case sensitive.

 

In the following example, the number of instances of a colon is 2.

 

SET VAR vProduct1 INTEGER = (SLOCI('R:BASE Single Seat: Upgrade',':',0))

 

 

In the following example, the number of instances of an upper case S is 2.

 

SET VAR vProduct2 INTEGER = (SLOCI('RBZip Single Seat License: Upgrade','S',1))

 

 

In the following example, the number of instances of an upper case or lower case S is 3.

 

SET VAR vProduct3 INTEGER = (SLOCI('RBZip Single Seat License: Upgrade','S',0))