Larry, thanks for your reply.
I also need records , where there may be only one blank fld2 entry, so I dont think below will work.
I got another reply on this thread which suggested using Max(fld2) whicj I think may work.. I'll give it a try.
Regards,
Gerard
>Hi Gerard,
>Try the following:
>
select * from myfile ;
> where fld1 in (select distinct fld1 from myfile) ;
> and !empty(fld2)
>
>>I have a file as follows:
>>
>>Fld1 Fld2
>>_____________________________
>>AA Widgets
>>AA
>>AA
>>AA
>>BB Spark Plugs
>>BB
>>BB
>>CC
>>CC Emeralds
>>DD
>>
>>
>>______________________________
>>
>>I want to do following
>>Select * from MyFile Group by Fld1 into Cursor temp
>>
>>.. but I want to ensure that I always get the description, if there is one in the result i.e. I need the following:
>>(I will only have spaces or the same value)
>>
>>AA Widgets
>>BB Spark Plugs
>>CC Emeralds
>>
>>I'm wondering is there a SQL way of doing this, or maybe some other way ?
>>
>>Regards,
>>
>>Gerard