It was possible in 11.0.1 but is not valid as of 12.0.0. It was a useful shortcut, is there a simple rationale behind the decision?

asked 25 Jul '13, 08:16

henginy's gravatar image

henginy
406151827
accept rate: 0%


Are you sure it actually existed in SA 11? I checked the source code history and the best that I can tell the code never supported it. I see that the documentation makes references to it (in the Remarks section) but the syntax on that same page does not (which AFAICT is correct). I think it must have been a documentation error in v11.0.1?

permanent link

answered 25 Jul '13, 09:12

Mark%20Culp's gravatar image

Mark Culp
22.7k9129266
accept rate: 40%

FWIW it looks like the IQ Help still uses the one-big-DROP-Help-Topic, and DROP DBSPACES is the only one that does not support IF EXISTS.

I suspect the V11.0.1 Help accidentally included that sentence in the DROP DBSPACE topic when they were split apart from the one-big-DROP-Help-Topic in V10.

(25 Jul '13, 11:22) Breck Carter
Replies hidden

Yep, I think there was a copy-and-paste error when preparing the v11.0.1 docs.

(25 Jul '13, 11:32) Mark Culp

Right, the question was regarding the docs; I never tried it on v11.0.1 actually. Thanks.

(26 Jul '13, 01:49) henginy

Here is a technique that might help:

BEGIN
   DROP DBSPACE whatever;
   EXCEPTION WHEN OTHERS THEN
END;

If the DBSPACE does not exist, the empty EXCEPTION handler hides the symptom. This works for all kinds of DROP statements.

It doesn't work properly if there is some other reason the DROP fails (security, etc).

permanent link

answered 25 Jul '13, 13:33

Breck%20Carter's gravatar image

Breck Carter
27.3k424585836
accept rate: 21%

edited 25 Jul '13, 13:34

Thanks for the alternative and the remark!

(26 Jul '13, 01:49) henginy

I've added a comment on the 11.0.1 docs (DCX) to clarify the fact that IF EXISTS is not supported on the DROP DBSPACE topic. Sorry for the confusion, and thank you for alerting us!

permanent link

answered 26 Jul '13, 11:22

Laura%20Nevin's gravatar image

Laura Nevin
1.1k2713
accept rate: 66%

Thanks for the time.

(31 Jul '13, 10:25) henginy
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×17
×4

question asked: 25 Jul '13, 08:16

question was seen: 737 times

last updated: 31 Jul '13, 10:25