Page 1 of 1

Posted: Thu Aug 21, 2003 10:39 am
by spracht
Substring operations can be performed using square brackets [start,length].
As a derivation for your stage var you could use:

stagevar=sourcecolumn[4,1].


For other interesting forms to use [] please refer to the documentation.

Regards

Stephan

Posted: Thu Aug 21, 2003 5:43 pm
by ray.wurlod
A substring based approach only works in bytes if a single-byte character set is in use. Since the OP is in the USA this is a fair, but by no means guaranteed, assumption.
All the substring functions actually work with characters which, in multi-byte character sets, is not the same thing as bytes. Stephan's answer gives you the fourth character from a string. There do exist functions such as BYTE, BYTELEN, BYTETYPE and so on for extracting and identifying specific bytes from a string in a multi-byte character set, but these are largely meaningless for all practical purposes.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518