If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 CLP conditional ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-04, 15:28
craigmc craigmc is offline
Registered User
 
Join Date: Aug 2003
Location: austin,tx
Posts: 90
DB2 CLP conditional ?

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.
For example,
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?

Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On