Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Distinct not giving distinct values
Message
From
18/01/2008 18:14:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01283146
Message ID:
01283154
Views:
15
In addition to Craig's reply: You can GROUP BY, to specify which columns should be unique. For each group of related records (i.e., same key fields according to GROUP BY), a single summary record is created.

>I am trying to get distinct values on one of the character type column that has numerical values. The field is called e_pic.
>
>
>SELECT DISTINCT e_pic as imageid, e_dob as dob, e_empstatus as extrahelp, e_flg13 as eyes, e_id as eid,;
>		e_flg14 as wt, e_flg15 as ht, e_flg16 as pmt, e_fname as firstname, e_lname as lastname, ;
>		e_mi as mi, e_phq as division,  e_unit as unit, e_class as pos_class ;
>				from rv_employee_tbl_c_drive INTO CURSOR crs_data ORDER BY imageid
>BROWSE
>
>
>the result is still returning duplicate values. What am I doing wrong here?
>thanks in advance..
>
>nick
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform