Okay - I'm trying to grab the first five letters of a customer name field in GP. In some cases, the Customer name starts with numbers which I need to strip out.
Example - here the data:
I'm trying to use PATINDEX and LEFT to get the first five letters -
Here's my feeble attempt:
select LEFT( PATINDEX('%[A-Z]%', CUSTNAME), 5) as CustomerName from RM00101
This returns -
Obviously, it's just counting where the first letter begins not returning anything.
I originally tried substring - then settled on PATINDEX.
Any help would be greatly appreciated - thanks