|
kifeda
Posting Yak Master
136 Posts |
Posted - 2009-02-17 : 18:25:49
|
| Hello All,I'm working in asp and I have two different connections strings, one to an excel file and one to a ms sql server database. what I want to do is copy the data from the excel file to the ms sql server. In order to do so I have to upload the excel file and then read the data from it. I've got that part figured out, but how would I copy data from the excel file to the ms sql server database? Any ideas would be greatly appreciated. already constructed the sql statement. it looks like this:INSERT INTO tblleadmanagement(strfirstName, strlastname, straddress1, strcity, strstate, intzipCode, strphone1, strworkPhone, strhouseType, intCurrentValue, intloanAmount, intfirstBalance, intrate, strfixAjustable, strbehind, strcredt, stryearlyIncome, strbestTimetoCall, strloanDesired, str1stmortageLender, int1stmortgagePayment, intmonthsBehind, strnoticeOfDefault, dtforeclosureDate, stremailAddress, dtdate, strcomments)SELECT Name, [Last Name], Address, City, St, Zip, [Home Phone], [Work Phone], [House Type], [Current Value], [Loan Amount], [1st Balance], Rate, [Fix/Adj], Behind, Credit, [Yearly Inc], [Best Time to Call], [Loan Desired], [1st Mortgage Lender], [1st Mortgage Payment], [Months Behind], [Notice of Default], [Foreclosure Date], [Email Address], [Date], CommentsFROM exceltable |
|