Calc Invoices to Pay?

Kenneth Brody kenbrody at bestweb.net
Tue Mar 4 07:45:43 PST 2008


Quoting Walter Vaughan (Tue, 04 Mar 2008 09:47:34 -0500):

> Fairlight wrote
>
>> I think you missed a critical part.  He's not just matching individual
>> checque amounts, he's matching one sum against multiple cheques.  Please
>> show me the SQL statement that would come even remotely close--because I
>> don't believe it exists even in Oracle, much less fPSQL.
>>
>>
> Select * from invoice
> where
>     customer number is "what it is"
>     and status_flag is "unpaid"
>     and amount between "Low value" and "High value"
> order by
>     date
>
> That should find the invoices that have not been paid that could
> accomodate a range, rather than a specific value.
>
> Me? A selection set or table would be fine, but the reality is that
> there are a million more places to learn how to write a SQL query than
> how to use filePro's native tools. So if they are looking for
> information in ways that the system as configured does not supply, why
> not teach them to use a tool that leverages that pool of talent and
> available training.
>
> It's all about the tools in the toolbox. Some make better hammers and
> some make better pry-bars.

I don't believe SQL has a "select every combination of rows/records that
have a given account number, calculate the sum of the balance dues for
each combination, and return the combinations where the sum is equal to
a given amount".  (I don't think there's even a "return every combination
of rows/records that have a given account number".)

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list