Solved

invalid object name

Posted on 2014-10-04
6
104 Views
Last Modified: 2014-10-04
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?
0
Comment
Question by:johnson1
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40361317
Hello,

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:
select top 1 * from temp_ETS?

Open in new window

0
 

Author Comment

by:johnson1
ID: 40361332
I tried both temp_ETS and dbo.temp_ETS and I got the error Invalid object name
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40361336
This  basically means that there is no table. Are you connected to proper database?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:johnson1
ID: 40361355
yes
0
 
LVL 15

Accepted Solution

by:
Haris Djulic earned 500 total points
ID: 40361359
Can you browse database and confirm that the table is there?

 Can you try to create the new table with same name?
0
 

Author Closing Comment

by:johnson1
ID: 40361364
I had drop table after select statement in the query. When I removed it then it did work.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now