Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Group by query
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00355597
Message ID:
00355730
Views:
15
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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform