comparing strings in a query??

  • Thread starter Thread starter Ivan Debono
  • Start date Start date
I

Ivan Debono

Hi,

I need to compare strings in a query.

I have a table where one text field contains, for example: 'package,pkgs.'

My criteria (string to compare) is 'pkg.' (notice the dot after pkg!!)
Although my whole string is not found within the text field, 'pkg' matches
with the first 3 letters of 'pkgs'.

So how will my where clause be, if this is possible???

Thanks,
Ivan
 
Sorry, but comparisons are very literal. As you say, you're telling it to
look for pkg., and those four characters do not appear in what you're
searching, so there's no way you're going to be able to find it.

If you said to look for pkg (without the period), then

WHERE TextField Like "*pkg*"

would work.
 
Hi,
If you want to find records that contain the letters pkgs then:

yourField Like '*pkgs*'
 
Yeah that's my problem. I guess I have to add all possible combinations in
the field then :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top