All Forums General
lavendar 2 posts Joined 04/13
06 Jun 2013
Using quotes for numeric datatype in Teradata

Hi All,
I would like to know, in Teradata, does it allow single quotes for numeric datatype (int or decimal)?
I have tried TD using quotes. It works. but one of my friend is facing issue when using single quotes.
SQLs:
create table lavendar.alpha(eno integer,salary decimal(12,2));

insert into lavendar.alpha('1','129.22'); -  Worked for me but not for my friend

 

insert into lavenadr.alpha(2,22.33); - it works for both of us

 

Is there any option to set allow single quotes for numeric datatypes?

 

Please do advice.

 

Thanks

Lavendar
 

lavendar 2 posts Joined 04/13
06 Jun 2013

Hi All,
Please advice on the same.
Thanks
Lavendar

dnoeth 4628 posts Joined 11/04
07 Jun 2013

Hi Lavendar,
a "quoted numeric" is not numeric it's a string which is automatically casted by the Parsing Engine to the appropriate data type. Like '2013-06-07' is not a date, it's a string but when inserted into a DATE column it will be automatically casted.
What "issue" did your friend have, was there an error, which error message? 
 
 
Dieter
 

Dieter

You must sign in to leave a comment.