Query must filter out records beginning with text "192"

R

Rene Wennekes

SELECT webstats.Tijd, webstats.Computer
FROM webstats
WHERE (((webstats.Computer)<>"192.168.0.204"));


if i put * after 192 i get a syntax error.
with left and ;3 also.

I want to filter out what begins with192

How do i do that?

Rene
 
A

AlCamp

Rene Wennekes said:
SELECT webstats.Tijd, webstats.Computer
FROM webstats
WHERE (((webstats.Computer)<>"192.168.0.204"));


if i put * after 192 i get a syntax error.
with left and ;3 also.

I want to filter out what begins with192

How do i do that?

Rene
 
E

Ed Robichaud

I think you mean that you want to "filter on" i.e. that your query returns
all records beginning with 192. If so, use the Like function in your
criteria; see Access help for syntax.

Like("192*")

-Ed
 
R

rico

Sorry didn't realise, also <> will not work for a text field, try this

SELECT webstats.Tijd, webstats.computer
FROM webstats
WHERE webstats.computer NOT LIKE "192*";

HTH

rico
 
Top