O$: How to use $selectdistinct?

George Panagopoulos eyeway1 at otenet.gr
Thu Dec 2 02:05:04 EST 2010

Hi Rob,

Check if a regular $select in the same code gives correct results. 
Normally $select and $selectdistinct work exactly the same.
Also try to catch the SQL text that is issued to the database server( on 
an OK message). Maybe there is some syntax error there.

I hope it helped.


Στις 2/12/2010 3:44 πμ, ο/η Rob Brandt έγραψε:
> I have a need to build a list of distinct values from one column in a 
> table. In plain ol' mysql I can get the results I want with:
> SELECT DISTINCT `RATELOCATION` FROM `newmainclientpayments`
> Where RATELOCATION is the column among 30 columns from the table I need.
> Seems like it should be something like
> Do 
> iRateLocationList.$definefromsqlclass($libs.COMMON.$tables.T_NewMainClientPayments)
> Do iRateLocationList.$selectdistinct('RATELOCATION')
> Do iRateLocationList.$fetch(kFetchAll)
> But it results in an error. I also tried creating a 1 column schema 
> and defining the list with that class, then using $selectdistinct with 
> no parameters, which resulted in no data.
> Rob
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

Kind Regards,

George Panagopoulos
Omnis Programmer

More information about the omnisdev-en mailing list