table names with a period in them

Database

table names with a period in them

I have table names with a period in them.  How do I drop or rename them?

Also, one table name is too long, and I get an error: "RENAME Failed.  [3737] Name requires more than 30 bytes in LATIN internal form."

3 REPLIES
Senior Apprentice

Re: table names with a period in them

How did you create that table with a period in it :-)

Special names must be in double quotes, DROP TABLE "blabla";

Regarding the maximum length of 30 chars: there's no workaround besides upgrading to TD14.10

Re: table names with a period in them

I learned that to drop a table with a period in the name, you put the double quotes around just the table name, not around the database name and table name.  correct is:

   drop table dbname."tblnmwithaperiodinit"

This also worked with the table name that is more than 30 characters.

    drop table dbname."tablenamewithaperiodinitthatismorethan30long"

one of the tables was directly imported from SQL Server with same name as in SQL server.

Thank you Dieter

Teradata Employee

Re: table names with a period in them

If an object name has a PERIOD (U+002E) in it, then it needs to be enclosed in QUOTATION MARKS (U+0022), or the U& Unicode delimited identifier syntax can be used. Naming rules do not change based on the SQL statement (see the following example). As of TD 14.10 with the Extended Object Names feature enabled, names longer than 30 characters can be used .

 BTEQ -- Enter your SQL request or BTEQ command:

show table "doctab.";

 *** Text of DDL statement returned.

 *** Total elapsed time was 1 second.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CREATE SET TABLE "DOC."."doctab." ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      "docchar." CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC)

PRIMARY INDEX ( "docchar." );

 BTEQ -- Enter your SQL request or BTEQ command:

drop TABLE "DOC."."doctab.";

 *** Table has been dropped.

 *** Total elapsed time was 1 second.

-David Craig