O$: How to use $selectdistinct?

Rob Brandt bronto at csd-bes.net
Wed Dec 1 20:44:46 EST 2010


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.

TIA

Rob



More information about the omnisdev-en mailing list