Forum Discussion
Access Query Expressions not working: Replace, InStr
Works fine for me. This is using Northwind 2 Dev Edition template. Does this work for you as well?
I added a "Last" field to the Companies table, and populated all rows with "Co".
SELECT Companies.CompanyName, Companies.Last, Replace([CompanyName],[Last],"") AS x
FROM Companies;
CompanyName Last x
Adatum Corporation test Co Adatum rporation test
Adventure Works Cycles Co Adventure Works Cycles
Best For You Organics Company Co Best For You Organics mpany
Contoso, Inc. Co ntoso, Inc.
Woodgrove Bank Co Woodgrove Bank
Wide World Importers Co Wide World Importers
Tailwind Traders Co Tailwind Traders
Proseware, Inc. Co Proseware, Inc.
Green Shipping Co Co Green Shipping
Blue Shipping Co Co Blue Shipping
Yellow Vendor Co Co Yellow Vendor
Brown Vendor Co Co Brown Vendor
Northwind Traders Co Northwind Traders
New company added after link to Excel Co New mpany added after link to Excel
- SheriO7043Mar 20, 2024Copper ContributorThank you. I have only tried the query against my database. I'll try creating a new database -- maybe this one (I adopted) is corrupt somehow... I'll get back to you.
- SheriO7043Mar 20, 2024Copper ContributorIt looks like its the database that's bad, not expressions. Thank you so much for the nudge! 🙂