Subject Re: [firebird-support] Re: SQL Help
Author Ann W. Harrison
jackmills75 wrote:
>>
>> select distinct d1.Word_No
>> from DownLoad d1
>> join DownLoad d2 on d1.Used = d2.Used
>> where ( abs( d1.Word_No - d2.Word_No ) = 1 ) AND
>> ( d1.Used = 'F' )
>> order by d1.Word_No
>>
>> -steve
>>
>
> Thanks Steve
>
> The query filters out single results = 'F' but allows groups of 2 or
> more, i.e. wont sort for groups of six or more
>

You could expand that to a string of six values but it would
be much less efficient than an equivalent stored procedure.


Regards,

Ann