Page 1 of 1

substring in an variable string

Posted: Tue Dec 09, 2003 10:30 am
by nag0143
hi all,

hey i got a column (description) in my flat files.. in that variable column most of the columns have SSP.text1 hidden in the column (text1 might be any thing), i need to take only 3 char after that SSP.
help me with this.........

Posted: Tue Dec 09, 2003 11:23 am
by Peytot
In the Help, function substring\
MyString = Field("###DHHH#KK","#", 4) ;* returns "DHHH"

Pey

Posted: Tue Dec 09, 2003 11:29 am
by chulett
Go to your online help from the Designer. Under the Index tab, type in "BASIC" and then select the "alphabetic list of" entry.

You'll see a list of all BASIC functions by alpha. But, more importantly, there is also a line that says "If you are unsure of the function or statement you need, see BASIC Tasks". From there you can drill down into sub-categories like "Substring Extraction and Formatting" which should help you do what you need to do.

Posted: Tue Dec 09, 2003 5:34 pm
by ray.wurlod
INDEX() to get the location of "SSP." then substringing to extract the particular characters you need. Try it yourself; come back if you're having difficulties.