Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Insert/Append Queries....

Author  Topic 

konquistador
Starting Member

4 Posts

Posted - 2007-11-27 : 05:33:01
Hi guys, I am very new to SQL Server, Please excuse my novice questions.
I need to run some Insert Queries which import data from Excel spreadsheet Into a SQL Server database. What is the best way to acheive this?
If i define my spreadsheet as a Linked server....Is the following syntax correct? to Insert values into the database....

INSERT INTO SQLtablename1 (Col1, Col2, Col3)
SELECT ExcelCol1, ExcelCol2, ExcelCol3
FROM
EXCELLINKNAME...[sheetname$]

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2007-11-27 : 05:52:31
Check the following link to import from Excel - export to Excel

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926&whichpage=2
Go to Top of Page
   

- Advertisement -