johnson1
asked on
invalid object name
Hello,
I get this error: Invalid object name: 'dbo.temp_ETS'.
At the beginning of my stored procedure I have
IF OBJECT_ID('dbo.temp_ETS') IS NOT NULL
DROP TABLE dbo.temp_ETS
I also have the same at the end of the query.
Do you know why this happens?
I get this error: Invalid object name: 'dbo.temp_ETS'.
At the beginning of my stored procedure I have
IF OBJECT_ID('dbo.temp_ETS') IS NOT NULL
DROP TABLE dbo.temp_ETS
I also have the same at the end of the query.
Do you know why this happens?
ASKER
I tried both temp_ETS and dbo.temp_ETS and I got the error Invalid object name
This basically means that there is no table. Are you connected to proper database?
ASKER
yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had drop table after select statement in the query. When I removed it then it did work.
there are few possibilities for this error:
1. Is there a table temp_ETS?
2. Is it in the dbo schema?
3. is the database case sensitive? i.e. maybe there is typo in the table name?
In order to test number 1 can you run this query:
Open in new window