SELECT ALL NCRB_DOCUMENTS.NCRB_NO, NCRB_DOCUMENTS.NCRB_DOC_NO,
NCRB_DOCUMENTS.LOT_NO, NCRB_DOCUMENTS.BY_DOC_SALE, NCRB_DOCUMENTS.DATE_OPEN,
NCRB_DOCUMENTS.STATUS, NCRB_DOCUMENTS.PROBLEM_NO
FROM NCRB_DOCUMENTS
WHERE :CONDITION
AND NCRB_DOCUMENTS.DATE_OPEN BETWEEN :F_DATE AND :T_DATE)
ORDER BY NCRB_DOCUMENTS.DATE_OPEN ASC
select table_name,
CASE owner
WHEN 'SYS' THEN 'The owner is SYS'
WHEN 'SYSTEM' THEN 'The owner is SYSTEM'
ELSE 'The owner is another value'
END
from all_tables;
IF owner = 'SYS' THEN
result := 'The owner is SYS';
ELSIF owner = 'SYSTEM' THEN
result := 'The owner is SYSTEM'';
ELSE
result := 'The owner is another value';
END IF;
Code (SQL)
select table_name,
CASE owner
WHEN 'SYS' THEN 'The owner is SYS'
WHEN 'SYSTEM' THEN 'The owner is SYSTEM'
END
from all_tables;