Removing Characters

  • I am trying to come up with a way to remove anything after a 'space' from our Part ID's. Using the example below, I want to remove 'REP' and 'OVR'. Any ideas on how I can accomplish this?

    1134200-7 REP

    5-AS350-19 OVR

  • Assuming there's only one occurance of a white space you can use something like this:

    SELECT LEFT(Part_ID, CHARINDEX(CHAR(32), Part_ID))

    [font="Verdana"]Markus Bohse[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply