on 07-24-2006 9:33 PM
Hi all, I was using a recordset with an sql distinct clause, on SAP B1 SP:0
Now we have updated to SP1, and it seems like recordset query doesnt works well with the distinct clause.
It returns all values.
Does anybody tried to use this clause with SP1?
Thanks.
Hi,
DISTINCT is not working in SBO recordsets. You try using GROUP BY clause to achive this.
SELECT DISTINCT <Field_Name> FROM [table]
can be achived using
SELECT <Field_Name> FROM [table] GROUP BY <Field_Name>
HTH
With Regards
B.Ravi Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The DISTINCT clause by itself is NOT working in recordsets. You have to programatically make sure that you have the distinct records. So, if you're adding distinct records to a combo box you can either check if it exists before you add it or you can add a try... catch block around it that just catches the error (without displaying anything) when you add to a combo box.
Hope it helps,
Adele
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.