RE: Multiple addition query Issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Jim,

Thanks for your response. Yes thats right ...its relates to an accounting
procedure. On accassions there is a requirement to find historical items
which have no linked field.

I am writing a system for an accountant, who has to deal with many different
data structures presented to him. The only certainty is that there will
always be two tables, one the child of the other, "Payments and Invoices"
.... but not linked by any reference!! (This is data supplied by some of his
clients)

His job is to troll through the invoice tbl adding up the iitems that relate
to a single payment entry in the master tbl (payments)

I realise that the data should never have been input in the first place
in this fashion ...that is with no linked fields, but hey thats a problem
that hes left me to solve!!

Any suggestions that you have are greatly received
..
Cheers


"Jim Burke in Novi" wrote:

Why exactly do you need this functionality? It seems like a bit of an odd
request to me. Are there times where you're supposed to have a bill total
that relates to individual items or something along those lines? i.e. do you
have, for example, a DB that has bills in it, with each bill having a groups
of related 'items', and you need to find a bill that equals that total,
something like that?

"RKM solutions" wrote:

Hi Guys,
Hope that someone out there has a plausible solution and quick.
I have been attempting to query a table via both sql and vb in order to
process every possible addition permutation
To explain:
table data

Gross Amount Required Search :4911.51
23.73
14.87
345.87
4550.77
678.90
etc

The user needs to input a value of the statement and the system queries the
invoice tbl until it finds a sum of multiple value(s) which matches their
query.

It seemed simple when i started today but whichever way I tackle it when the
table size increases the query time gets silly!!

Any help would be much appreciated... Ive tried For/ next statemnts /Looping
code, multiple copies of the table to one query etc , What I need simply put
is a query that produces all mathematical permutations of the table
efficiently

Thanks to anyone you is able to take the challenge on
thanks in advance
R.K.M




.



Relevant Pages

  • Re: Cant execute SQL and get recordset back.
    ... you want to and execute them together. ... William (Bill) Vaughn ... > row from the query. ... In cases where there are multiple resultsets, ...
    (microsoft.public.vb.database.ado)
  • Re: Automatically adding data between two dates.
    ... I have a calendar table in many of my applications with one record for each date for whatever time frame I need. ... FROM CalendarTable as C INNER JOIN Bill as B ... If you feel it is absolutely needed, you can use this query to populate a table that you have created with the needed fields. ... Meter# date $/day ...
    (microsoft.public.access.queries)
  • Re: datetime conversion from UDT/GMT to localtime
    ... William (Bill) Vaughn ... My database has all date/times stored in UDT/GMT in datetime ... the query, the query then returns the correct resultset, but of course, the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: When do selects execute for multiple resultsets
    ... "William (Bill) Vaughn" wrote: ... >> Does this mean that the 2nd query in a batch is not executed by SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Complex RecordSource
    ... FROM Bill ... You need to join your menu table to the query to display their selections. ... her spouses ... as the last name on the name tag of the spouse. ...
    (microsoft.public.access.reports)