Use of DISTINCT in SELECT close

François Van Lerberghe frvanlerberghe at gmail.com
Tue Dec 1 04:58:36 CST 2015


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?





More information about the Valentina mailing list