There is a table in my database projected_daily_tbl and a corresponding Excel file on the server. I want to run SQL code that updates a field in the Excel file from the SQL table, and then updates another field in the SQL table from the Excel file.I'm able to update the table based on the Excel file:update projected_daily_tbl set percent_dispensed=exceltable.percent_dispensed from(select * from OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\Inetpub\wwwroot\bvig\input\projected_daily_tbl.xls','SELECT * FROM [Sheet1$]')) exceltablewhere exceltable.id=projected_daily_tbl.id
However, when trying to do the reverse (updating the atmamount field in the Excel sheet based on the table), I have major problem designing a syntactically correct query. I want to do this as a single update query (no cursor!). Please tell me what I can do!