Welcome to our developer-centric oasis! Dive into our blog where we unravel complexities, offer insightful tutorials, and share expert tips to help you navigate the ever-evolving world of coding. Whether you're a seasoned developer seeking advanced techniques or a beginner taking your first steps into the vast realm of programming, our articles are tailored to empower and inspire you on your journey.
Pages - Menu
▼
Wednesday, 30 May 2012
Update sql server from excel
update tablename set column=t2.column1 from
(
Select ID,column1,column2 FROM
OPENROWSET
('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\test.xls;HDR=YES', 'SELECT * FROM [SheetName$]'))t2
Where
tablename.ID = t2.ID
No comments:
Post a Comment