I have tried the code below:
SELECT * INTO NewTablenNmeHere
FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls','SELECT * FROM [Sheet1$]')
I’m getting error:
[Err] 1327 – Undeclared variable: NewTablenNmeHere
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OPENROWSETseems to be a MS SQL command. I don’t think it has an equivalent in mySQL.The easiest method that comes to mind is
LOAD DATA INFILEto import the file into mySQL.You can also use a graphical mySQL client like HeidiSQL to use a point-and-click dialog to determine which column goes where.