Hi,
I have a .sql file which checks the tablespace(user input) info first, and if the check is successful, then create tables on that tablespace. What I want to do is if no tablespace is found, then exit that script file. i.e. don't build tables on that user's default tablespace (since most customer didn't have that set up correctly).
Here is part of my script:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DECLARE
NO_TS EXCEPTION;
BEGIN
SELECT COUNT(*) INTO v_cnt FROM user_tablespaces WHERE tablespace_name = '&xTblSps';
IF v_cnt <1 THEN
RAISE NO_TS;
END IF;
EXCEPTION
WHEN NO_TS THEN
DBMS_OUTPUT.PUT_LINE('No tablespace with that name found. ');
-- ??? what should I put here to exit the whole script file???
END;
/
Table building block .....
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thanks!
EF
Oracle LazyDBA home page