Reputation: 1165
SELECT * FROM [makes$] WHERE "Corporate Name"='Champion Enterprises, Inc.'
I'm running this query on an XLS excel file using ADO in VBA. There are about 10-20 records containing this corporate name but it returns EOF.
I'm fairly new to database but I'm certain everything is correct aside from my SQL statement.
If I SELECT * FROM [makes$]
, it returns all the records successfully.
Upvotes: 0
Views: 126
Reputation: 2069
SELECT * FROM [makes$] WHERE [Corporate Name]='Champion Enterprises, Inc.'
Upvotes: 4
Reputation: 25014
Use [] instead of "" for column names with spaces in them:
SELECT * FROM [makes$] WHERE [Corporate Name]='Champion Enterprises, Inc.'
Upvotes: 1
Reputation: 52645
total guess here but its probably
SELECT * FROM [makes$] WHERE [Corporate Name]="Champion Enterprises, Inc."
Upvotes: 2