Use of DISTINCT in SELECT close

Stanley Roche Busk maxprog at mac.com
Tue Dec 1 06:51:30 CST 2015


Perfect, that is what I was looking for,

thanks!
Stan

> On Dec 1, 2015, at 11:58 AM, François Van Lerberghe <frvanlerberghe at gmail.com> wrote:
> 
> Yes.
> "b" doesn't exist in the fields list of the cursor. The second field is "GROUP_CONCAT(b)", not "b". If you want use this second field by name, you must assign an alias name as this
> 	SELECT a, GROUP_CONCAT(b) myAliasName FROM c GROUP BY a
> Later you can say :
> 	 aCursor.ULongField( "myAliasName" )
> If you don't use alias name, you must use the position of this field in the fields list : aCursor.ULongField( 2 )
> 
> François Van Lerberghe
> Thier Monty, 15 A
> 4570 Marchin (Belgium)
> +32 (0) 85 25 08 25
> 
> Le 1 déc. 2015 à 10:48, Stanley Roche Busk a écrit :
> 
>> Merci François,
>> but, Ivan,  with 'SELECT a, GROUP_CONCAT(b) FROM c GROUP BY a’ how do you access ‘b' later from the cursor?
>> In this case ‘b' is a ULongField field and aCursor.ULongField( “b" ).Value causes a nil object exception.
>> Is there a special command?
> 
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list