1
1. 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. (select distinct col_value from table a) b Now b becomes the new table use b.col_value 2. Create a view based on your query and use that view in the value set. 3. Write your query in such a way that it gives you a distinct value. You can make use of ROWID to meet the requirement. For Example: ----------------- 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); allow parent values check pox See MOS Doc 1069797.6 - DFF: DISTINCT CLAUSE DOES NOT WORK IN VALIDATION Please see (Note: 356986.1 - Receiving ORA-00936 Error When Using Distinct Clause In Value Set).

Distinct In Value Set.docx

  • Upload
    hmza6

  • View
    9

  • Download
    0

Embed Size (px)

DESCRIPTION

How to select distinct in oracle value sets

Citation preview

Page 1: Distinct In Value Set.docx

1. 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.

(select distinct col_value from table a) b

 

Now b becomes the new table

 

use b.col_value

2. Create a view based on your query and use that view in the value set.

3. Write your query in such a way that it gives you a distinct value. You can make use of ROWID to meet the requirement.

For Example:-----------------SELECT ooh.order_numberFROM oe_order_lines_all ool, oe_order_headers_all oohWHERE ool.header_id = ooh.header_idAND ool.ROWID = (SELECT MAX(ROWID)FROM oe_order_lines_all oo11WHERE oo11.header_id = ooh.header_id);

allow parent values check pox

See MOS Doc 1069797.6 - DFF: DISTINCT CLAUSE DOES NOT WORK IN VALIDATION

Please see (Note: 356986.1 - Receiving ORA-00936 Error When Using Distinct Clause In Value Set).