0 - 15 of 15 tags for varchar
--create table 
CREATE SET TABLE database.table,
 NO FALLBACK ,
 NO BEFORE JOURNAL,
 NO AFTER JOURNAL,
 CHECKSUM = DEFAULT,
 DEFAULT MERGEBLOCKRATIO
 (
        some columns...,
 unique_number_10_digits CHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL
 )
PRIMARY INDEX( unique_number_10_digits );

--inserts

Consider two tables ,one has COLUMN_A defined as a VARCHAR(100) and the other has COLUMN_A defined as an INTEGER. When joining these two tables via COLUMN_A what does the optimizer have to do in order to accomplish the join?Convert VARCHAR to INTEGER  or convert INTEGER to VARCHAR? thanks.

Hello,
I am attempting to load a tab delimited file into a table, and I am receiving the following errors:
 
Row number 6,812 had an error.
Cause = Unexpected number of parameters

Row number 26,237 had an error.
Cause = Unexpected number of parameters

Hi experts
I am  developing a table operator UDF using C/C++ . Teradata release is 15.0.0.8 .

Hello,
Could someone please answer:
1. REGARDING VARCHAR:
I have a table with one of the columns defined as VARCHAR(255) even though the char length would never exceed 15 characters.
Is there any performance impact in defining a column as VARCHAR(255) against defining it as VARCHAR(15).

Hi ,
When adding MVC  to VARCHARs is there any space benefit realised from NULL valued columns,
I don't beleive there is  (as Null valued varchars take up no space anyway ) but couldn't find anything specifically in the manuals .
Thanks
Nick
 

I need to store the value in the DataParcel column(which is of VARBYTE datatype) in the first error table of FASTLOAD into a permanent teradata table but with a proper format(The ddl of this table will be exactly the same as the target table, except that all datatypes are varchar)
I know this as a potential solution/*From teradata manual*/:

Hi, I am trying to import data from a text file using a SQLAssitant. But it is giving me an error as the string contains ",".
I am using this below syntax for inserting:
 

CREATE VOLATILE TABLE kumar_test (a INTEGER, b VARCHAR(100))

PRIMARY INDEX  ( a );

 

INSERT INTO kumar_test(?,?)

 

Is there a way to convert string data into varbinary data type. I want to use the BYTE/BIT manipulation functions on a string column, but they can recieve only BYTEINT,INT, BIGINT and VARBYTE data types as arguments.
I tried this kind of cast:

I have strange problem. Consider below Teradata Stored Procedure:

Hello,

My table tbl has a column col which has the below definition:-
COL VARCHAR(250) CHARACTER SET UNICODE NOT CASESPECIFIC TITLE 'COL'

I am trying to trim spaces on the data in the this col. I used TRIM and what I see in the result is that it trims leading spaces but not the trailing spaces. I have tried various combinations in the query below:-

SEL COL,CHARACTER_LENGTH(COL),COL||'-',
TRIM(COL) a,CHARACTER_LENGTH(a),A||'-',
TRIM(TRAILING' ' FROM COL) B,charACTER_length(B),B||'-',
TRIM(TRAILING' ' FROM CAST(COL AS VARCHAR(2000))) C,CHARACTER_length(C),C||'-',

I have created a table with a column that is varchar(5). When I insert a string of 6 characters the string is truncated to 5 characters rather than throwing an exception. Is there a way to force a strict mode so this will result in an error?

Jesse

Hi All!

I'm use Teradata ODBC driver ver. 13.10.00.01-1. I need to bind variables but I've got a problems with VARCHAR variables (the INTEGER or DOUBLE variables are OK)

The source:

SQLBindParameter(v_stmt->stmt,
i,SQL_PARAM_INPUT_OUTPUT,col->obtype,col->dbtype,
col->dblen,scale,v_col->data,col->dblen,
v_col->len)

col->dbtype=SQL_VARCHAR;
col->obtype=SQL_C_CHAR;
col->dblen=255;
scale=0;
v_col->data; //pointer to data
v_col->len; //pointer to data's length

When creating tables in Teradata is there an advantage to placing the column(s) that will be used for the Primary Index at the top of the column list?