O$: How to use $selectdistinct?
Rob Brandt
bronto at csd-bes.net
Thu Dec 2 02:13:26 EST 2010
Yes, $select works just fine. And $selectdistinct without parameters
works too, except it doesn't know what I want to be "distinct", so it
returns most if not all of the data (1300 records). There are really
only 4 distinct values currently in the RATELOCATION COLUMN.
Rob
On 12/1/10 11:05 PM, George Panagopoulos wrote:
> 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.
>
> George
>
> Στις 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.
>>
>> TIA
>>
>> Rob
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>>
>
More information about the omnisdev-en
mailing list