Is it possible to issue conditional statements to the CLP in DB2UDB 8.2?
I've seen similar questions here, but I have not really seen a direct answer.
If I want to exectute a script with something like this:
IF (SELECT COUNT(*) FROM SYSIBM.SYSVIEWS WHERE NAME = 'MYVIEW' ) > 0 THEN
DROP VIEW MYVIEW ;
END IF ;
CREATE VIEW SIDS.TESTVIEW AS
SELECT * FROM MYTABLE ;
Can you do any conditionals in scripts that are fed to the CLP? If not, are there any other facilities for doing something similar?