Hello:
I have a name column and all I want to do is if the first 2 characters in the name start with "SN", I need to strip the first 2 characters and load the name.
I can say something like this...
If LEN(link.NAME_COLUMN, 2) = "SN" Then ..???? not sure how to strip
Else link.NAME_COLUMN.
Please help.
Thanks!!
How do I strip first 2 characters ....
Moderators: chulett, rschirm, roy
Use the substring operator to check the first two characters. Basically:
Combine that with the length check to get everything but the first two if that's what you need:
Of course, some sanity checks on the total size first may be in order.
Code: Select all
If link.NAME_COLUMN[1,2] = "SN"
Code: Select all
link.NAME_COLUMN[3,Len(link.NAME_COLUMN)-2]
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: