Use of DISTINCT in SELECT close

Stanley Roche Busk maxprog at mac.com
Mon Nov 30 07:03:42 CST 2015


Ok, actually ‘a' is a string and ‘b' a record number. I try to get all the different versions of ‘a’. ‘a’ may or may not be different, ‘b’ is always different.

SELECT (a), b FROM c GROUP BY a   ??? I am not in front of my working dev. computer right now so I can’t try :-(

Stan


> On Nov 30, 2015, at 1:38 PM, François Van Lerberghe <frvanlerberghe at gmail.com> wrote:
> 
> Hello Stan,
> 
> You must decide what you do for the b column when there is duplicates on column a : you take the first, the last, …
> 
> If you decide to take the first value, your sql query could be this one : SELECT a, FIRST(b) FROM c GROUP BY a
> 
> François Van Lerberghe
> Thier Monty, 15 A
> 4570 Marchin (Belgium)
> +32 (0) 85 25 08 25
> 
> Le 30 nov. 2015 à 13:17, Stanley Roche Busk a écrit :
> 
>> 
>> Ok, so how can I do that?, GROUP BY? I have tried several combinations unsuccessfully so far.
>> 
>> What I want is: SELECT a, b FROM c
>> 
>> where there is no c duplicates but b column is accesible.
> 
> 
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list