I need help with a complicated set of queries. I have 4 tables, each have a start and end date and they have either 8 fields or 12 fields for an amount. If the start date <=Date() and the end date >=Date() then I need to pull some of the amount fields and insert them into a temp table. The amount must be >0. Currently this is done by queries but this takes up too much space because there is a query for each amount field. To the best of my knowledge, there can only be one field that appends to another field in append queries. So if I need to insert fields amt1, amt2, and amt3 from table1 into the amount field of the temp table (along with the other corresponding information in table1), I have to use three different queries. Then this is repeated for the other 3 tables and their fields.
What I would like to do is write an SQL or series of SQL statements in a module that will take the place of the queries. Is there any way to consolidate some of the SQL statements and make this process more efficient?
I appreciate the help!
What I would like to do is write an SQL or series of SQL statements in a module that will take the place of the queries. Is there any way to consolidate some of the SQL statements and make this process more efficient?
I appreciate the help!