September 22, 2014 at 3:58 am
Hi All,
I'm having string values like mentioned below.
String Values:
George, Matt J
Rambla, Tony G.
Expected Output:
George, Matt
Rambla, Tony
I would need to trim the letters like mentioned above. Can anyone help me with this
September 22, 2014 at 4:10 am
declare @String as varchar(20) = 'Rambla, Tony G.'
select left(@string,len(@string)+1-charindex(' ',reverse(@string)))
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
September 22, 2014 at 5:11 am
Is there any way I can achieve this in MS Access? I tried this and it doesn't recognize charindex.
September 22, 2014 at 5:22 am
There's a function called InstRev that might do it. I've never used Access in my life though so I can't be more helpful than that I'm afraid.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
September 22, 2014 at 5:50 am
BWFC (9/22/2014)
There's a function called InstRev that might do it. I've never used Access in my life though so I can't be more helpful than that I'm afraid.
Someone else answered it in the duplicate post at http://www.sqlservercentral.com/Forums/Topic1618194-131-1.aspx%5B/url%5D.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply