0

I'm trying to delete a table named DBA.[ in Sybase IQ database. This is a wrong table which is not desired so we need to delete it. I've tried several options but not successful. Please share any workaround to drop the table, if anyone knows.

iqisql -Udba -P*** -Sdwhdb -w500

1> drop table dba.[
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '
' on line 2

1> drop table dba.[[]
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '[[' on line 1

1> drop table 'dba.[ '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near 'dba.[ ' on line 1

1> drop table dba.[
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '\' on line 1

1> drop table 'dba.[ '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near 'dba.[ ' on line 1

1> drop table 'dba.[[ '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near 'dba.[[ ' on line 1

1> drop table 'dba.['
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near 'dba.[' on line 1

1> drop table 'dba.[['
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near 'dba.[[' on line 1

1> drop table dba.[
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '\' on line 1

1> drop table dba.'[ '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '[ ' on line 1

1> drop table dba.'[[ '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '[[ ' on line 1

1> drop table dba.'[[] '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '[[] ' on line 1

1> drop table dba.'[[] '
2> go

Msg 102, Level 15, State 0:
SQL Anywhere Error -131: Syntax error near '[[] ' on line 1

Table Name in Database

  • 1
    Did you try `[dba.[]` or `"dba.["`? –  Sep 14 '18 at 11:44
  • 1
    Double quotes could be used i think: `DROP TABLE dba."["` – Salman A Sep 14 '18 at 11:45
  • Tried these queries but not worked 1> drop table [dba.[] 2> go Msg 2706, Level 11, State 0: SQL Anywhere Error -141: Table 'dba.[' not found 1> drop table [DBA.[] 2> go Msg 2706, Level 11, State 0: SQL Anywhere Error -141: Table 'DBA.[' not found 1> drop table "dba.[" 2> go Msg 102, Level 15, State 0: SQL Anywhere Error -131: Syntax error near 'dba.[' on line 1 1> DROP TABLE dba."[" 2> go Msg 102, Level 15, State 0: SQL Anywhere Error -131: Syntax error near '[' on line 1 1> – Rizwan Rasul Sep 14 '18 at 11:59
  • SQLAnywhere database is used as a front end to manage the IQ system catalog (notice 'SQL Anywhere in error msg) SQLAnywhere 16+ does not allow square brackets in identifiers, and the docs say an attempt to upgrade to 16+ will fail if identifiers include square brackets, net result: I'm having trouble figuring out how the table was created in the first place. I suggest you expand the audience and post to the [SQLAnywhere forum](https://sqlanywhere-forum.sap.com/), mention this is an IQ database, and see if someone has any ideas (eg, update table name in system catalog?) – markp-fuso Sep 16 '18 at 17:52

0 Answers0