-2

I tried dropping a SQL Server CE table using both:

drop invHeader

-and:

drop [invHeader]

...in Query Analyzer, but in both cases, I get the same err msg:

enter image description here

Dropping a table should be drop-dead easy, but this one keeps bouncing back up, like a reverse Humpty Dumpty.

What do I need to do to drop it hard enough for it to really go away - "Nuke invHeader"?

To add insult to injury, after this command failed (both "styles" of designating the table name), Query Analyzer seems to lose its synaptic connections and won't allow me to edit the SQL/DDL statement any longer - I have to warm boot the handheld device before it comes to its synapses again.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • 3
    Erm, did you [look at the documentation](http://technet.microsoft.com/en-us/library/ms173418(v=sql.110).aspx) or try valid syntax, like `DROP TABLE tablename;`? This tells the database engine what type of object you are trying to drop. Would you rather it flip a coin if there was also a user or database with the same name? – Aaron Bertrand Aug 15 '14 at 19:48
  • Good idea; still, though, it seems such a mistake should be easy for Query Analyzer to figure out and give a good clue about what's missing, rather than the cryptic msg given. – B. Clay Shannon-B. Crow Raven Aug 15 '14 at 19:51
  • That's not really a programming issue (and I don't expect the developers of a *deprecated* platform to go back and try to predict every single form of invalid syntax any developer would try to enter, and tell them exactly what's wrong with it). You should be capable of checking the manual in any case. – Aaron Bertrand Aug 15 '14 at 19:51
  • 2
    `DROP [it] LIKE 'IT''S%HOT%';` – swasheck Aug 15 '14 at 19:54

1 Answers1

2

Your syntax is incorrect - in order to drop a table you should use

DROP TABLE invHeader;
Mureinik
  • 297,002
  • 52
  • 306
  • 350