Need a query to find all records with ONE keyword

  • Thread starter Thread starter Tom Ellison
  • Start date Start date
T

Tom Ellison

Dear Phil:

For an MDB, you could use:

SELECT * from Legal WHERE legal_description Like "*SEC*";

For ADPs, use:

SELECT * from Legal WHERE legal_description Like '%SEC%';
 
I need to write a query that will return ALL records from a field that
contain a specific keyword, which in my case is the word SEC. My table name
is Legal. The field name in question is legal_description.
 
Assuming you want an exact match:

SELECT * from Legal WHERE legal_description = 'SEC';

....or a close match:

SELECT * from Legal WHERE legal_description Like 'SEC';


Randall Arnold
 
Hello Randall,

Thanks for your reply, but I'm sorry, but I MAY have misled you.

The thing is that I need to look through ALL of the records from the field
legal_description, and find ANY records that DO contain the text value SEC in
the field contents. An example of the ENTIRE contents of the field is "S LOT
39 E LOT 1 W ROBIN LN IN SEC 40 41 42 T-7S R-4E 870075 (O-38-968)". And in
THAT cell there resides the SEC keyword.

BTW, I DID try to run BOTH of the SQL statements, and neither worked.
 
Tom,

Thanks, your solution worked great!

Tom Ellison said:
Dear Phil:

For an MDB, you could use:

SELECT * from Legal WHERE legal_description Like "*SEC*";

For ADPs, use:

SELECT * from Legal WHERE legal_description Like '%SEC%';
 
Back
Top