The following code fails when writing out records to a Microsoft Access
database. You would need to create a table called ‘result’ with a numeric
field called ‘Day’ to run the below (as well as change the name/path of the
database)
param odbc_driver symbolic := 'DRIVER={Microsoft Access Driver (*.mdb,
*.accdb)};dbq=.\data.accdb';
table PUT_RESULTS_1 {d in 1..10} OUT 'ODBC'
odbc_driver
'DELETE FROM result; ' # NOTE THE SPACE AFTER THE ;
'result' :
d ~ Day
;
The issue is the space after the ‘;’ in the DELETE statement. If you took it
out, it works. That is, the following works:
param odbc_driver symbolic := 'DRIVER={Microsoft Access Driver (*.mdb,
*.accdb)};dbq=.\data.accdb';
table PUT_RESULTS_1 {d in 1..10} OUT 'ODBC'
odbc_driver
'DELETE FROM result;' # NOTE THE LACK OF A SPACE
# BETWEEN THE ; and the end-quote
'result' :
d ~ Day
;
Marc Meketon
Oliver Wyman Digital
[Company Logo]
1 University Square, Suite 100 | Princeton, 08540
Direct: +1 (609) 520-2188
Mobile: +1 (732) 558-8931
[email protected]<mailto:[email protected]>
www.oliverwyman.com<http://www.oliverwyman.com>
ASSISTANT
Jane Volz | [email protected] <mailto:[email protected]>