문제

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