Query must filter out records beginning with text "192"

  • Thread starter Thread starter Rene Wennekes
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top