Friday, 21 June 2013

Distinct values in value set

There are multiple ways to define distinct values in custom value set.

Standard:
Setting Allow Parent Values will make values distinct. Con is that it cannot be used in conjunction with ID in table column.



Custom:
Write distinct statement in the field where table name is entered, but this has a limitation to the number of characters that can be entered. so if query is long then you cannot make use of this feature.
Create view based on your query with distinct values and use that view in the value set.
Use of max rowid in where clause field

SELECT ooh.order_number
FROM oe_order_lines_all ool, oe_order_headers_all ooh
WHERE ool.header_id = ooh.header_id
AND ool.rowid= (SELECT max(rowid)
FROM oe_order_lines_all oo11

WHERE oo11.header_id = ooh.header_id);


Ur's
AmarAlam

0 comments:

Post a Comment