I am using MS Access 2003. I want to run a lot of insert SQL statements in what is called 'Query' in MS Access. Is there any easy(or indeed any way) to do it?
相关问题
- Importing data from MS Access db to PostgreSQL db
- DoCmd.TransferSpreadsheet is not recognizing works
- Is there a way to apply theme on converted access
- How to programmatically convert Access 1997 .mdb t
- Multiple (left, cross?) JOINs in MS Access
相关文章
- COALESCE, IFNULL, or NZ() function that can be use
- CurrentDb.RecordsAffected returns 0. Why?
- How to embed ms-access forms in C# module?
- Sleep Lib “kernel32” gives 64-bit systems error
- How to destroy an object
- Close all VBE windows (MS Access, VB for Aplicatio
- Compiling an Access 2007 accdb into accde
- MS Access VBA: turn query results into a single st
@Rik Garner: Not sure what you mean by 'batch' but the
construct, although being a single SQL statement, will actually insert each row one at a time (rather than all at once) but in the same transaction: you can test this by adding a relevant constraint e.g.
Assuming the table is empty, the above
INSERT INTO..SELECT..
should work: the fact it doesn't is because the constraint was checked after the first row was inserted rather than the after all three were inserted (a violation of ANSI SQL-92 but that's MS Access for you ); the fact the table remains empty shows that the internal transaction was rolled back.@David W. Fenton: you may have a strong personal preference for DAO but please do not be too hard on someone for choosing an alternative data access technology (in this case ADO), especially for a vanilla
INSERT
and when they qualify their comments with, " Off the top of my head, the code to do it should look something like…" After all, you can't use DAO to create aCHECK
constraint :)