Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

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
accept rate: 41%

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:

   DROP DBSPACE whatever;

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
accept rate: 20%

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
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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 25 Jul '13, 08:16

question was seen: 2,477 times

last updated: 31 Jul '13, 10:25