Extracting Characters from the Right Side of a String?!...

kdm3

Registered User.
Local time
Today, 23:08
Joined
Aug 2, 2004
Messages
43
I Hope someone can help...

I need to break a long product code into its constituent parts (all seperated by a "-"). With some effort (my brain hurts) I managed to write queries to extract the first 3 groups comprising the number, but also want the final group.

The length of these code are not all the same, and some have different numbers of groups from others, plus the groups are not all the same length.

I was hoping that someone could tell me if there is a way to remove a variable set of characters from the right side of a string. (The RIGHT function would obviously do this, but would need determine how many characters to extract.)

Any suggestions?
 
I worked it out, use the STRREVERSE() function, flip the string, do standard left side procedure, then flip back.
 
InStrRev() is a simpler method.
 

Users who are viewing this thread

Back
Top Bottom