At 4:54 +0200 9/10/02, Jan Broermann wrote:
>Hi,
>I'm missing an answer to a topic which came up a couple of days /weeks ago.
>For a database i'm administrating I would like to find out, which numbers
>(of invoices)
>are missing in our database. Is there a way to get this result set thru SQL?
>Or do I have to do it with for example Java?
>I think somebody else asked a question similar to my probleme, but I can't
>find
>an answer in my mails. I think it must be a construction of something like
>not in between [max]max(tab.invoice) and [min] min (tab,invoice) ????????


You need a reference table that lists all the invoice IDs in the range
that you want to check.  Then you can perform a left join of this table
against your invoice table to find non-matching records.

If you have no such reference, then you can select the IDs that do happen
to lie within the range, and apply some programming logic to figure out
which ones aren't there.

>
>thx from Germany
>Jan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to