Wednesday, April 20, 2011
Tip of the Day - Using SLOCI Function to Locate the Number of String Instances
Product: R:BASE eXtreme 9.1 (32/64)
Update.: 3
Build..: 9.1.3.10414 or higher http://www.rupdates.com
Section: Functions
Did you know that you can locate the number of instances a string appears in
a TEXT, NOTE, or VARCHAR value using the new SLOCI Function?
Syntax: (SLOCI(TextNoteVarcharValue,string,arg))
New SLOCI function will return the INTEGER value for the number of instances
a string appears in a TEXT, NOTE, or VARCHAR value.
The argument parameter determines whether the search on the string is case
sensitive, where "0" is not case sensitive while "1" is case sensitive.
Example 01:
SET VAR vProduct1 TEXT = (SLOCI('R:BASE Single Seat: Upgrade',':',0))
SHOW VAR
vProduct1 2 INTEGER
Example 02:
SET VAR vProduct2 TEXT = (SLOCI('Single Seat License','S',1))
SHOW VAR
vProduct2 2 INTEGER
Example 03:
SET VAR vProduct3 TEXT = (SLOCI('Single Seat License','S',0))
SHOW VAR
vProduct3 3 INTEGER
Have fun implementing this new Function in your R:BASE eXtreme 9.1
applications!
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================