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
 General SQL Server Forums
 New to SQL Server Programming
 Export Excel data to SQL database table.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2009-01-20 : 05:43:04
Dear All,

I tried following queary but it gives error. I don't understad what's error is that. What is missing in that. Can anybody plz tell me ? I am trying one column data of Excel copy to one column of SQL database.

Queary:

Update CRD7 T1 Set T1.TaxId0 = T2.TaxId0 from
(Select * FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Book1.xls;HDR=YES',
'SELECT * FROM [Sheet1]'))T2 Where
T1.CardCode = T2.CardCode

Error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'T1'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'T2'.

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-01-20 : 06:51:25
duplicate post
Go to Top of Page

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-01-20 : 06:57:03
u Just Posted that...
Cross Post....in Same Forum..

Yy U postin Duplicate?

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-20 : 08:47:20
Don't post everywhere:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=118188
Go to Top of Page

guruchi_20
Starting Member

24 Posts

Posted - 2009-02-04 : 19:51:50
used import export query

select export
Go to Top of Page
   

- Advertisement -