G
Guest
The problem I have is very frustrating, because I KNOW that it should work
the way that I'm doing it...it's just that the database is too big!
Ok, here's the situation. I work for a law office that has a database with
all of thier cases and all of the notes made on these cases. They would like
to run a query (and later a report) that lists the LAST THREE NOTES made on
files that are still open. To give you a better understanding there are
8,763 cases and some 100,000 notes on all the files. When I drop that number
down to only open files I have 132 cases, but 4,646 notes.
I have been trying to use the following SQL statement to accomplish this:
SELECT *
FROM b
WHERE (((b.NoteID) In (select top 3 noteid from b s where s.namefile =
b.namefile order by timenote desc)));
b is the name of the query that I'm using to pull the information from.
It will work if I limit the number of notes to under 20, (I limited it to
the files that start with "b") but if I have any more notes than that it
crashes. The IT people in the office have put the database only on my
machine so that I'll stop crashing the network when I try to test this query,
but I still crash my machine everytime.
I assume that I need to divide this query into smaller queries, but I'm not
sure how to go about it.
Any suggestions would be very appreciated!
the way that I'm doing it...it's just that the database is too big!
Ok, here's the situation. I work for a law office that has a database with
all of thier cases and all of the notes made on these cases. They would like
to run a query (and later a report) that lists the LAST THREE NOTES made on
files that are still open. To give you a better understanding there are
8,763 cases and some 100,000 notes on all the files. When I drop that number
down to only open files I have 132 cases, but 4,646 notes.
I have been trying to use the following SQL statement to accomplish this:
SELECT *
FROM b
WHERE (((b.NoteID) In (select top 3 noteid from b s where s.namefile =
b.namefile order by timenote desc)));
b is the name of the query that I'm using to pull the information from.
It will work if I limit the number of notes to under 20, (I limited it to
the files that start with "b") but if I have any more notes than that it
crashes. The IT people in the office have put the database only on my
machine so that I'll stop crashing the network when I try to test this query,
but I still crash my machine everytime.
I assume that I need to divide this query into smaller queries, but I'm not
sure how to go about it.
Any suggestions would be very appreciated!