Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557

    Unanswered: No table to drop a tbale

    Someone has create a table that has a double quote in its name i.e.

    tabschema.tab"name

    I have to drop it, but that double quote is messing everything up. I have done it long time back, but now not able to find a solution.

    anyone has a solution?

    Thank you
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  2. #2
    Join Date
    Sep 2003
    Posts
    237
    Enclosing in single quote or using 2 double quotes or using reverse slash before " to negate the special meaning come to mind

    'tab"nm' "tab""nm" tab\"nm
    mota

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by dbamota
    Enclosing in single quote or using 2 double quotes or using reverse slash before " to negate the special meaning come to mind

    'tab"nm' "tab""nm" tab\"nm
    if it does not work, export table, drop all tables with this schema (admin_drop_schema proc), and import to recreate all other tables. Of course it depends on how many other tables are under this schema.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Single quotes are string delimiters. Here we have an identifier and you need to enclose that in double-quotes. So the 2nd option given by dbamota works - the other 2 don't.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •