orreymalcolm
IS-IT--Management
Hey Everyone,
I have 3 Tables.
<Complete Contract List> - lists all the contracts available (2011 records)
<Member list> - List all member information (657 records)
<Complete List of Members and contracts> - Has a listing of every member and every contract that those members are committed to. (486,000 records)
Ok, here is my code so far, I'm trying to do the entire operation in JetSQL so as to save time and effort.
I have 3 Queries right now.
The first one asks me for a member number, when i put it in, it gives me all the contracts associated with that member number. Query name: SelectContractsFromMember
My second one now checks this list against the full contract list and determines which are not already inside.
Query name: NotListedContracts
Note: This query seems to take a long time to run and eventually freezes the computer. Possibly an error in my code? Or maybe access limitations? I have no idea, I tried running it on a Core Duo 1.86 gHz and a Pentium 1.6gHz...both froze. Contract list has only 2011 contracts in it.
And finally, the one that isn't working, but not the end of the problem lol...this one should, in theory, Append the not listed contracts with those of the listed ones for this member. Query name: AppendNewContracts
Note: Same freezing problem as second query when using the UNION ALL instead of INSERT INTO.
Any Help is appreciated....
Thanks!
I have 3 Tables.
<Complete Contract List> - lists all the contracts available (2011 records)
<Member list> - List all member information (657 records)
<Complete List of Members and contracts> - Has a listing of every member and every contract that those members are committed to. (486,000 records)
Ok, here is my code so far, I'm trying to do the entire operation in JetSQL so as to save time and effort.
I have 3 Queries right now.
The first one asks me for a member number, when i put it in, it gives me all the contracts associated with that member number. Query name: SelectContractsFromMember
Code:
PARAMETERS [Enter Member #] Text ( 255 );
SELECT * FROM <Complete List of Members and Contracts>
WHERE (<Contract Number> IN (SELECT <Contract Number> FROM <Complete Contract List>)) AND (<Member Number> = [Enter Member #])
ORDER BY <Contract Number>;
Query name: NotListedContracts
Note: This query seems to take a long time to run and eventually freezes the computer. Possibly an error in my code? Or maybe access limitations? I have no idea, I tried running it on a Core Duo 1.86 gHz and a Pentium 1.6gHz...both froze. Contract list has only 2011 contracts in it.
Code:
SELECT * FROM <Complete Contract List>
WHERE <Contract Number> NOT IN (SELECT <Contract Number> FROM SelectContractsFromMember);
Note: Same freezing problem as second query when using the UNION ALL instead of INSERT INTO.
Code:
(Incomplete)
INSERT INTO SelectContractsFromMember (<Contract Number>)
SELECT * FROM NotListedContracts;
Thanks!