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?
Share
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.
yes and no.
You can’t do:
but you can do
What does that get you if you don’t already have the data in a table? Well, you could craft a Select statement composed of a lot of unions of Selects with hard coded results.
Note: I also have to include a some form of a dummy table (e.g., onerow) to fool access into allowing the union (it must have at least one row in it), and you need the ‘top 1’ to ensure you don’t get repeats for a table with more than one row
But then again, it would probably be easier just to do three separate insert statements, especially if you are already building things up in a loop (unless of course the cost of doing the inserts is greater than the cost of your time to code it).