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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

433 Posts

Posted - 08/21/2006 :  09:57:23  Show Profile  Reply with Quote
I have been given an excel spreadsheet with two columns with data.
There are about 20 records in this excel sheet.
Would like to write an insert query to insert these data.
I am thinking of writing an insert query for the first line iin the excel sheet and then drag it down to the last row of data so that it automatically writes the values of the columns in the insert query and i just copy and paste the script into sql to run.
This is what I have but the values of the cells do not get reflected.
Any thoughts pls?
'insert into TBLData (RE_ID, EMAIL) values (' & c2 & ',' & d2 ')'

Patron Saint of Lost Yaks

30421 Posts

Posted - 08/21/2006 :  10:00:18  Show Profile  Visit SwePeso's Homepage  Reply with Quote
="INSERT TBLData (RE_ID, EMAIL) VALUES ('" & c2 & "', '" & d2 & "')"

Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Constraint Violating Yak Guru

433 Posts

Posted - 08/21/2006 :  10:04:34  Show Profile  Reply with Quote
very good.
Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 08/21/2006 :  11:04:05  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
For every formula you need to start with = in EXCEL
Other approach


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000