icedearth
10-15-2008, 04:59 AM
In the form i have here there 4 columns the first one i have to count and group by branch_number. I have put group by and count in those coilums and take to long. the coulmn branch number has this criteria CDbl(Right([DBA_INC_LOAN_BANK]![BRANCH_NUMBER],3)) how i can put this because i want to know how many accounts i have in a branch.
MSAccessRookie
10-15-2008, 05:19 AM
In the form i have here there 4 columns the first one i have to count and group by branch_number. I have put group by and count in those coilums and take to long. the coulmn branch number has this criteria CDbl(Right([DBA_INC_LOAN_BANK]![BRANCH_NUMBER],3)) how i can put this because i want to know how many accounts i have in a branch.
Unless you have an unusually large number of records to process, this should not take so long to process that is creates issues. Can you show the SQL Code that is running so slowly?
icedearth
10-15-2008, 05:26 AM
is a very large number of records
MSAccessRookie
10-15-2008, 05:46 AM
is a very large number of records
How many records are we talking about? That style of query should be able to handle a relatively large number of rows and still not slow down too much, but if the problem is in the query instead of the recordcount, then even smaller numbers could create problems. That is why I asked to see the query, because I am trying to imagine why a query like that would have such issues.
icedearth
10-15-2008, 05:52 AM
is a very large number of records
This is the query
Rabbie
10-15-2008, 06:15 AM
There doesnt seem to be any connection shown between "Nombres sucursales" and your other tables this means that Your query will generate a huge number of records depending on how many records you have in each table.
MSAccessRookie
10-15-2008, 06:19 AM
This is the query
The table [Nombre Sucursales] is not related to any other table in this image, therefore accessing the field [BRANCH NUMBER] will create a Cartesian Join (also known as a FULL JOIN), which is usually VERY Slow.
Relate the table to something (I suspect relating [Nombre Sucursales].[BRANCH NUMBER] to [DBA_INC_LOAN_BANK].[BRANCH NUMBER] might work). You will need to decide if that is correct.