criterion "question mark" in a new-builded query to show noise-records

M

Medioman

Hi everybody,

I have encountered a problem:
A couple of records in my database contain some noise.
They are represented by the following text: ? and ?????.
I want to filter out these noise (i.e. both question mark records) in a
separated query.
Therefore I filled the following criterion rule in the design window: Or
Like "[?]" Or Like "[??????]".
Instead of filtering out both concerning records, the query only shows the
record with one question mark, i.e. ?.
How can I realize that the record with ????? is also showed?

Medioman
 
T

Tom Ellison

Dear Medio:

How about:

LIKE "[?][?][?][?][?][?]"

(or NOT LIKE . . .)

Now, when you say:

LIKE "[??????]"

that is not nearly the same thing. Indeed it is identical to:

LIKE "[?]"

The list inside the brackets is a "set" of characters to seek. Repeating a
character already in the set does nothing.

But, fundamentally, why use LIKE at all?

Why not

= "?" OR ="??????"

Please count your question marks carefully. In you post you use 5 at first,
then 6, then 5 again.

Tom Ellison
 
M

Medioman

Thanks Tom, problem solved!
Yep, your last statement is right. I had to counter the question marks more
carefully... Sorry for the confusion!

Medioman

Tom Ellison said:
Dear Medio:

How about:

LIKE "[?][?][?][?][?][?]"

(or NOT LIKE . . .)

Now, when you say:

LIKE "[??????]"

that is not nearly the same thing. Indeed it is identical to:

LIKE "[?]"

The list inside the brackets is a "set" of characters to seek. Repeating
a character already in the set does nothing.

But, fundamentally, why use LIKE at all?

Why not

= "?" OR ="??????"

Please count your question marks carefully. In you post you use 5 at
first, then 6, then 5 again.

Tom Ellison


Medioman said:
Hi everybody,

I have encountered a problem:
A couple of records in my database contain some noise.
They are represented by the following text: ? and ?????.
I want to filter out these noise (i.e. both question mark records) in a
separated query.
Therefore I filled the following criterion rule in the design window: Or
Like "[?]" Or Like "[??????]".
Instead of filtering out both concerning records, the query only shows
the record with one question mark, i.e. ?.
How can I realize that the record with ????? is also showed?

Medioman
 
V

Van T. Dinh

If you don't use "?" in the valid Field values, then you can use:

Like "*[?]*"

or if the question mark is always at the start then you can narrow down even
more:

Like "[?]*"

--
HTH
Van T. Dinh
MVP (Access)



Medioman said:
Thanks Tom, problem solved!
Yep, your last statement is right. I had to counter the question marks
more carefully... Sorry for the confusion!

Medioman

Tom Ellison said:
Dear Medio:

How about:

LIKE "[?][?][?][?][?][?]"

(or NOT LIKE . . .)

Now, when you say:

LIKE "[??????]"

that is not nearly the same thing. Indeed it is identical to:

LIKE "[?]"

The list inside the brackets is a "set" of characters to seek. Repeating
a character already in the set does nothing.

But, fundamentally, why use LIKE at all?

Why not

= "?" OR ="??????"

Please count your question marks carefully. In you post you use 5 at
first, then 6, then 5 again.

Tom Ellison


Medioman said:
Hi everybody,

I have encountered a problem:
A couple of records in my database contain some noise.
They are represented by the following text: ? and ?????.
I want to filter out these noise (i.e. both question mark records) in a
separated query.
Therefore I filled the following criterion rule in the design window: Or
Like "[?]" Or Like "[??????]".
Instead of filtering out both concerning records, the query only shows
the record with one question mark, i.e. ?.
How can I realize that the record with ????? is also showed?

Medioman
 

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

Top