Subject RE: [firebird-support] Need some SQL help
Author Riho-Rene Ellermaa
> -----Original Message-----
> From: Helen Borrie [mailto:helebor@...]
> Sent: Friday, September 05, 2003 2:28 PM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Need some SQL help
>
> Because of the possibility of dup records and not knowing
> whether you are
> looking for one or both values missing, I think you'll need
> to get all of
> the columns, not just the date.
>
> select * from statements
> where ob is null or cb is null
>
> heLen
>
>

The data sample (there may be more than one pair of OB/CB, because of different currencies). ROWID starts from 1 after each new date.
In this sample the row 13 (with 'CB' value) of the 1.7.2003 is missing and I want to know it.

ACCOUNT,SDATE,ROWID,OPTYPE,CURRENCY,AMOUNT
10000173743,01.07.2003,1,OB,EUR,14.71
10000173743,01.07.2003,3,OB,LTL,17102.55
10000173743,01.07.2003,4,CB,LTL,17102.55
10000173743,01.07.2003,5,OB,LVL,6.89
10000173743,01.07.2003,6,CB,LVL,6.89
10000173743,01.07.2003,7,OB,USD,0
10000173743,01.07.2003,8,MK,USD,1.79
10000173743,01.07.2003,9,MK,USD,107243.51
10000173743,01.07.2003,10,MK,USD,107245.3
10000173743,01.07.2003,11,K2,USD,107245.3
10000173743,01.07.2003,12,K2,USD,107245.3
10000173743,04.07.2003,1,OB,EUR,14.71
10000173743,04.07.2003,2,CB,EUR,14.71
10000173743,04.07.2003,3,OB,LTL,17099.55
10000173743,04.07.2003,4,CB,LTL,17099.55
10000173743,04.07.2003,5,OB,LVL,6.89
10000173743,04.07.2003,6,CB,LVL,6.89
10000173743,04.07.2003,7,OB,USD,0
10000173743,04.07.2003,8,MK,USD,1.79
10000173743,04.07.2003,9,MK,USD,107248.88
10000173743,04.07.2003,10,CB,USD,0

Riho-Rene Ellermaa
senior programmer