Вопрос

LOV

Trying this conditional query, but getting an error that it should start from 'select'. How am I supposed to use conditions?

Это было полезно?

Решение

You could use a conditional concatenated query:

SELECT name display, name return_value
  FROM ns1
 WHERE "type" = :P5_REC_TYPE_ID
   AND :P5_NS_ID IS NULL
UNION ALL
SELECT name display, name return_value
  FROM ns2
 WHERE "type" = :P5_REC_TYPE_ID
   AND :P5_NS_ID IS NOT NULL

Replace IS NULL/IS NOT NULL with the appropriate logical test.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top