Date_Insert_error

Database
Enthusiast

Date_Insert_error

Hi am getting following error while inserting data into table.please help me on this.

This is my tables syntax

create table k.test (eventdate timestamp);

insert into k.test (eventdate) values(to_timestamp('07-FEB-14 07.37.38.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));

am getiing following error

name require 30 bytes in latin iternal form.

Am new to this blog where to post i dn't knw srry for anything wrong

Please any bdy help me on this

8 REPLIES
Senior Apprentice

Re: Date_Insert_error

That's an error indicating a column or table name longer than the maximum of 30 characters.

Based on your DDL and Insert this error should not be returned, it must be caused by something else.

What's your TD release and which client do you use?

Enthusiast

Re: Date_Insert_error

Hi dieter ,can you see my DDL query in above post...and am using 13.0.0.0 version of TD..

Senior Apprentice

Re: Date_Insert_error

Plus 13.0.0.0 sounds like an ancient TD Express, you should install a newer version.

Are you shure there's a TO_TIMESTAMP function? This was introduded in TD14, soy you must have an self-developed UDF.

Enthusiast

Re: Date_Insert_error

Thnk you Dieter..And how can i move my oracel datbase tables to TD..

Senior Apprentice

Re: Date_Insert_error

It's like any other switch in database technology:

Doing it on your own might be a big task, especially if you don't have expertise in the new DBMS.

There's 3rd party software like SwisSQL or Teradata's professional services to help migrating from your_favourite_DBMS_here to Teradata.

Enthusiast

Re: Date_Insert_error

Hi Dieter,

Can you give me a example for how to insert TIMESTAMP into table

Enthusiast

Re: Date_Insert_error

I need to insert 07-FEB-14 07.37.38.000000000 PM this date into table please can you give me the insert statement..

Senior Apprentice

Re: Date_Insert_error

There are two issues with that timestamp (only Oracle calls a timestamp a date) string:

  • 9 digits for fractional seconds, Teradata allows only up to 6. You need to strip of the additional fractional seconds before the cast using SUBSTRING
  • a two digit year,, there's no RR format in Teradata. There is a global flag to control if it belongs to 20th or 21th century, General Field 14, Century Break, in dbscontrol. a value less than that is in 21st century, otherwise it's 21st. You should test on your system, it's usually set to a value other than the default 0 (always 19xx). 

Or you (your DBA) install the Oracle UDFs including TO_DATE and TO_TIMESTAMP, availabe for download on DevEx, but you better ask your TD PS people for the latest version.

On TD14 those functions are built-in and you can use them as-is.