如何在 ubuntu 16.04 上安装 Microsoft.ACE.OLEDB.12.0?我已经安装了 SQL Server 2017 Express。
insert into EPI_NDC_Product SELECT PRODUCTID,PRODUCTNDC,PRODUCTTYPENAME,PROPRIETARYNAME,PROPRIETARYNAMESUFFIX,NONPROPRIETARYNAME,DOSAGEFORMNAME,ROUTENAME, cast(STARTMARKETINGDATE as datetime) as STARTMARKETINGDATE ,cast(ENDMARKETINGDATE as datetime) as ENDMARKETINGDATE,MARKETINGCATEGORYNAME,APPLICATIONNUMBER,LABELERNAME,SUBSTANCENAME,ACTIVE_NUMERATOR_STRENGTH,ACTIVE_INGRED_UNIT,PHARM_CLASSES,DEASCHEDULE
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=/var/www/epignosis.digitology.co.uk/public_html/protected/uploads/1513350050_ndc_product.xlsx',
'SELECT * FROM [NDC_Product$]')
信息 :
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.
答案1
作为将 Excel 数据传输到数据库服务器的替代方法,我建议看一下PHPExcel。