Subject Re: DataModule and Distinct
From Tim Ward <tim@goldengrovenurserydotcodotuk>
Date Mon, 17 Sep 2018 20:35:56 +0100
Newsgroups dbase.getting-started

On 17/09/2018 17:12, edward racht wrote:
> Greetings,
>
> I have worked the datamodule and realized that the canGetRow is not providing unique ORP = 'O' values.  I have another value in there - 'R' that keeps coming through.
>
Hi Ed,
        It's hard to see what's going on without an idea of what data is in the
table. Do you want only values in the combobox from field ORP that begin
with 'O'? It looks like you're filtering on another field 'OW' too. Do
the contents of this field affect the values you wish to show in the
combobox?

as an example if you type:
select distinct Color from ":dbasesamples:parts"
in the command window and browse, the table will show one value for each
colour in the parts table

select distinct Color from ":dbasesamples:parts" Where Color is not null
and Color <> ''
will remove the blank as Mervyn showed and

select distinct Color from ":dbasesamples:parts" Where Color like "G%"
will list only colours starting with 'G'

The sql statment you posted doesn't look right but I'm not sure what
data you're trying to display in the combobox.

Tim