comparing strings in a query??

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
 
D

Douglas J. Steele

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.
 
D

Dan Artuso

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

yourField Like '*pkgs*'
 
I

Ivan Debono

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