Hi Tim,
Below example of the CASE statement in SQL:
select table_name,
CASE owner
WHEN 'SYS' THEN 'dbms_service.blah;'
WHEN 'SYSTEM' THEN 'dbms_service.DUD'
ELSE 'The owner is another value'
END
from all_tables;
1. I don't think we can have more than ONE condition in the WHEN, for example: WHEN 'SYSTEM' and 'TEST'. b/c my second and third condition, are the same so I need to add at least one more condition to differentiate the two, how can I do that?
2. how can I call or write the result on the dbms_service to a file and also use the SQLPLUS to execute the result.
thx