var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to check if a view does exist ?
I need some IF THEN construct to drop some views at beginning of the scheduled job.
For example I want to see if view exists and delete it before proceeding.
Anything in DB2 SQL that may allow me to drop view ABC.
IF EXIST VIEW ABC THEN
DROP VIEW ABC
If I try straight then schedule will be terminated when view does not exit.
Any Idea will be appreciated
Certified DB2 9 DBA / Application Developer
You can use something like this:
select 1 from sysibm.sysviews
where name = '<<view name>>'
and creator = '<<view creator>>'
fetch first row only
if sqlcode = 0
drop view <<view name>>
This is great idea , SELECTing won't find anything and sqlcode will be non-zero.
So I can use it in Stored Procedure.
Can you suggest me how can I use it in Command Script box of Task Center.