Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Excel-to-DB in a batch file

Status
Not open for further replies.

papillonNpig

Computer
Oct 6, 2005
2
0
0
US
I have a select statement that works in Query Analyzer.

SELECT * INTO TableName FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=drive:\DirName\FileName.xls', [SheetName$])

Can I put it in a batch file? Just tried the isql command,

isql -S"Servername" -d DBname -E /Q "<The select statement>"

didn't work. Any suggestions?

 
Replies continue below

Recommended for you

Status
Not open for further replies.
Back
Top