Skip to content
Advertisement

Returning values from a database with a Substring

Let’s say I’ve got 3 product description fields with the values AC-120 XXX, AC-120,CCC and AC-120 BBB.

How would I get that information from a table using only AC-120 as my search argument?

I’ve tried using the subStr function but that won’t return any values either

Advertisement

Answer

LIKE is very appropriate for this comparison. However, MS Access uses different wildcards from standard SQL. So you want:

In standard SQL, this would be:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement