Subject Re: [firebird-support] SQL Help
Author Tanz Anthrox
I could not understand the problem But, I wrote 2 SQL for you
First
SELECT [DISTINCT] DOCUMENT_TYPE,DOCUMENT_ID,DOCUMENT_SID,SUM(VALUE) TOPLAM
FROM COMMON_TABLE
GROUP BY BA
HAVING BA ='B'

Second,
SELECT [DISTINCT] DOCUMENT_TYPE,DOCUMENT_ID,DOCUMENT_SID,SUM(VALUE) TOPLAM
FROM COMMON_TABLE
GROUP BY BA
HAVING BA ='A'

Let say Compare them But I think the algorithm is wrong.
Maybe, you can explain more and give us an example

Kolay gelsin.

----- Original Message -----
From: "Burak ÖZLER" <burak.ozler@...>
Newsgroups: egroups.ib-support
To: <firebird-support@yahoogroups.com>
Sent: Tuesday, April 13, 2004 8:39 AM
Subject: [firebird-support] SQL Help


> Hi all,
>
> I have a table at my application that all the modules(Documents at my
> app) inserts records to this table. The documents have three filed to
> determine the document at that common used table.
>