Link to home
Start Free TrialLog in
Avatar of fieldb1
fieldb1Flag for United States of America

asked on

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

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?
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

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?
Avatar of fieldb1

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of G Trurab Khan
G Trurab Khan
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fieldb1

ASKER

Brackets did it. Thanks.