Help with a query to pull data from within a string

I have an imported table that has 1 data field ('name') with the following records
American Stairs (AMS)
CherryWood (CHW)
DoRay Furnishings (DRN)

In a query, I need to separate the 3 character designation out from between the parenthesis... how can I do that in a query please?

The parenthesis always start 1 space after the name, and the designation is always three characters long (i.e. AMS, CHW)

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Assuming the names are always in brackets and have 3 can do something like this..

Select Mid(Name,instr(1,name,"(")+1,3) AS nme from table1;

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael FowlerSolutions ConsultantCommented:
I think this should do it but cannot test at the moment.

SELECT Mid(name, Instring(name, "(") + 1, Instring(name, ")") + 1)

Open in new window

You may be better to just get the name from the database and then extract the 3 character designation
Rey Obrero (Capricorn1)Commented:
this will handle more than 3 letters in the parentheses

select Trim (Replace(Replace(Mid([Name], InStr([Name], "(")), "(", ""), ")", ""))
from tablex
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Michael FowlerSolutions ConsultantCommented:
And a second look at mine and realised it will not work, should have been

SELECT Mid(name, Instring(name, "(") + 1, 3)

Open in new window

Gustav BrockCIOCommented:
And the minimum code:

NME: Left(Right([FieldName],4),3)

snyperjAuthor Commented:
thanks to all, but this was first and all I needed
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.