开发者

What's wrong with my SQL statement?

SELECT * FROM [makes$] WHERE "Corporate 开发者_如何学PythonName"='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.


SELECT * FROM [makes$] WHERE [Corporate Name]='Champion Enterprises, Inc.'


total guess here but its probably

SELECT * FROM [makes$] WHERE [Corporate Name]="Champion Enterprises, Inc."


Use [] instead of "" for column names with spaces in them:

SELECT * FROM [makes$] WHERE [Corporate Name]='Champion Enterprises, Inc.'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜