Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Group By
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00733350
Message ID:
00733354
Views:
20
Try something like...
select distinct;
    a.Fld1,;
    a.Fld2,;
    b.Fld3,;
    c.Fld4,;
    c.Fld5;
  From;
    Dodah a,;
    Blah b,;
    Big c;
  where;
        a.KeyFld1 = b.KeyFld1;
    AND a.KeyFld1 = c.KeyFld1;
  order by;
    a.Fld1,;
    b.Fld3,;
    c.Fld4;
  into;
    cursor C_DistinctSampleSet    
Your sample fields / tables illustrated ok to some point, but hopefully, you follow the above SQL. I don't know what your REAL join key columns are, but you SHOULD be able to substitute accordingly.

HTH,

Don
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform