cigarprofiler
Registered User.
- Local time
- Today, 04:56
- Joined
- Mar 25, 2017
- Messages
- 32
For my project I want to make some complex calculations. One calculation requires six consecutive queries, each one building on the results of the previous. This calculation has to be applied to ten categories, so 60 queries in total.
I have made the six queries using the Access interface. Easy as pie. I have copied the SQL to a text file and could modify the WHERE statements and the category variables, and then create the remaining 54 queries by copy-pasting. Not the most interesting job but quick and painless.
I do have some questions, though:
1. Is it better to write some VBA code for this? With a bit of Select Case and some sub-routines, the whole thing might be somewhat more elegant.
2. Is there a performance difference between VBA and queries? I would think not since it's all just a bunch of SQL queries, but what do I know?
3. There is some clever thinking involved in these queries, if I may say so myself. I'm considering performing the queries server-side as stored procedures, so that they are better secured. My thinking here is that it's probably easier to hack an Access frontend than a Postgresql backend, would that be a correct assumption?
Thanks for your thoughts!
I have made the six queries using the Access interface. Easy as pie. I have copied the SQL to a text file and could modify the WHERE statements and the category variables, and then create the remaining 54 queries by copy-pasting. Not the most interesting job but quick and painless.
I do have some questions, though:
1. Is it better to write some VBA code for this? With a bit of Select Case and some sub-routines, the whole thing might be somewhat more elegant.
2. Is there a performance difference between VBA and queries? I would think not since it's all just a bunch of SQL queries, but what do I know?
3. There is some clever thinking involved in these queries, if I may say so myself. I'm considering performing the queries server-side as stored procedures, so that they are better secured. My thinking here is that it's probably easier to hack an Access frontend than a Postgresql backend, would that be a correct assumption?
Thanks for your thoughts!