Problems querying an accdb database

  • Thread starter Thread starter IT Admin
  • Start date Start date
I

IT Admin

I have an accdb file with the table Accomodations

First 3 columns in the table are

Property Name: Address: City
I can see that Column under Property name contains

Cobb Ridge Recreation Area

But in access if I do a

select * from Accomodations where 'Property Name:' like 'Cobb%'

Against the database, I get no results.

WHY!!!!
 
I have an accdb file with the table Accomodations

First 3 columns in the table are

Property Name: Address: City
I can see that Column under Property name contains

Cobb Ridge Recreation Area

But in access if I do a

select * from Accomodations where 'Property Name:' like 'Cobb%'

Against the database, I get no results.

WHY!!!!

% is the wildcard character for SQL/Server compatibility mode... which is NOT
the default. Also delimiting your fieldnames with ' characters is incorrect
syntax for Access! The colon after Name is also suspicious.

Try

SELECT * FROM Accommodations WHERE [Property Name] LIKE "Cobb*";
 
Back
Top