psmittyy14
asked on
Deleting Characters from sql column
Hi I need to do a script in which will take characters off of a string for example:
if i have 1234-56/protrac i need to keep the 1234-56 and just delete the /protrac. so how can I do a script in which will constantly just remove the last 8 characters???
Your help is much appreciated. I know how to make it take off the last characters like this:
update ssfields
set
Field1 = SUBSTRING(field1, 1, 7)
but i am unsure that it will always be a 7 character number. So I need something that will automatically remove the / and the characters after it.
if i have 1234-56/protrac i need to keep the 1234-56 and just delete the /protrac. so how can I do a script in which will constantly just remove the last 8 characters???
Your help is much appreciated. I know how to make it take off the last characters like this:
update ssfields
set
Field1 = SUBSTRING(field1, 1, 7)
but i am unsure that it will always be a 7 character number. So I need something that will automatically remove the / and the characters after it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER