Solved

Excel Table Import into SQL Server 2008

Posted on 2014-07-27
5
716 Views
Last Modified: 2014-07-28
I created a new database called Temp, I used Task/Import to import a table from excel. The table is there and I can query the table and see it's contents. When I try to do a join on the table I get the error below.

Msg 7202, Level 11, State 2, Line 1
Could not find server 'Temp' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
0
Comment
Question by:imnee
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Ess Kay
ID: 40223039
save it as a comma delimited  file,  and create an sql to read through the file and insert them
0
 
LVL 15

Expert Comment

by:Ess Kay
ID: 40223044
0
 
LVL 13

Accepted Solution

by:
Russell Fox earned 500 total points
ID: 40223301
The problem isn't with the server, it with the query - can you post some or all of the query so we can troubleshoot it? It sounds like you're using an incorrect name: server.database.schema.object. My guess is that the join should be "JOIN dbo.Temp ON..."
0
 

Author Closing Comment

by:imnee
ID: 40223974
Correct. I have the column name CompanyPartMasterId as part of the reference to my table.

INNER JOIN Company.dbo.Plating.CompanyPartMasterId spm1 on spm1.CompanyPartMasterId = spm.Company_Part_Master_ID
0
 
LVL 13

Expert Comment

by:Russell Fox
ID: 40224526
So you took out the column in the join?
INNER JOIN Company.dbo.Plating spm1
    ON spm1.CompanyPartMasterId = spm.Company_Part_Master_ID
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

708 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

17 Experts available now in Live!

Get 1:1 Help Now