Can't query table imported from Excel in SQL Server 2008

fieldb1
fieldb1 used Ask the Experts™
on
I have imported a number of tables from Excel into SQL Server 2008. The tables are there, I have verified the data, I can access the data from  a VB Grid Control. However, when I query one of the tables with a SELECT statement I get an error. Even a SELECT * FROM tableName throws the error. Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012

Commented:
Not without more of an explanation.  Such as what is the error message?  Have you tried querying the table in SSMS?  Are you sure you imported the table into the right database?  What code are you using?  And what is the phase of the moon?

Author

Commented:
Error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'FEB11'.

I am using SSMS to query the table.

It is in the correct database.

The error above was thrown after a simple SELECT * FROM FEB11

FEB11 is the table name.

I can view the records by right-clicking the table , then selecting 'Select top 1000 Rows'. I don't know why a query won't work.
Snr. Development Manager
Commented:
What is the scheme of the table & what is your default scheme?

May be you need to enclose tablename in []

try your query like this "SELECT * FROM [FEB11]"

or

"SELECT * FROM dbo.[FEB11]"

or if scheme is different than your default scheme or dbo

"SELECT * FROM <<schemaname>>.[FEB11]"

Author

Commented:
Brackets did it. Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial