Amour22015
asked on
MS Access - Query syntax to look up condition
Hi Experts,
I have a field for company name:
The Great Company
The Microsoft Company
The Book Store
I need to write a simple query in Access like:
CompanyName: Iif(Left,3 = The) then
put at end the word The
So it would be like:
Great Company, The
Microsoft Company, The
Book Store, The
Thanks for any help
I have a field for company name:
The Great Company
The Microsoft Company
The Book Store
I need to write a simple query in Access like:
CompanyName: Iif(Left,3 = The) then
put at end the word The
So it would be like:
Great Company, The
Microsoft Company, The
Book Store, The
Thanks for any help
ASKER
It looks like I don't understand and am knew to all this.
I have a field:
CompanyName
In that field I could have some Company names that start with "The" it could also have " The" (with a blank in front of the word "The".
So:
The Great Company
The Microsoft Company
The Book Store
I am using MS Access 2010
I am doing this in a simple query:
CompanyName: Iif(Left((CompanyName),3)= "The" then (Left((CompanyName),-4) & ", The")
I am looking for something like above. Seems the link pointed out above is too complex for what I am looking for?
Thanks for any help
I have a field:
CompanyName
In that field I could have some Company names that start with "The" it could also have " The" (with a blank in front of the word "The".
So:
The Great Company
The Microsoft Company
The Book Store
I am using MS Access 2010
I am doing this in a simple query:
CompanyName: Iif(Left((CompanyName),3)=
I am looking for something like above. Seems the link pointed out above is too complex for what I am looking for?
Thanks for any help
use this
CompanyName:iif(Left([comp anyfield], 3)="The",[ companyfie ld] & ", The",[companyfield])
CompanyName:iif(Left([comp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks that looks like it
https://www.experts-exchange.com/questions/28671903/Reducing-Access-table-SQL-code-required.html