Link to home
Start Free TrialLog in
Avatar of Gordon Hughes
Gordon HughesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exclude Data from Query

Hi
I would like to create a query which will exclude data that has an "-" after the first word in a description field
ie:-
BEARING-BALL
OEM-
PUMP-

Gordon
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

So this would be acceptable:

BEARING BALL-

?

/gustav
Avatar of Gordon Hughes

ASKER

Hi

Not quite, I want to exclue the data record where the description starts with a word proceeded with the "-"

Hope this makes sense

Gordon
Then you could use:

.. Where InStr([Description], "-") <= InStr([Description], " ")

/gustav
Hi
Trying you suggestion it comes up with invalid syntex
Gordon
Of course. That what just the criteria part.
Don't know your query. A minimum would be:

Select * From tblYourTable Where InStr([Description], "-") <= InStr([Description], " ")

Replace with your actual table and field name.

/gustav
Hi

I put this as a SQL statement Ok

But it is not excluding where the first work is proceeded with the -
ie OEM-

Gordon
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi

It works
Thanks
Gordon
Thanks
You are welcome!

/gustav