rowid in Teradata

Database
Enthusiast

rowid in Teradata



I want to use rowid to update a table .

sel rowid,emp_id,e_name from test;

*******************************************************************
result set--->

********************************************************************
ROWID EMP_Id E_NAME
0000C500B17E00000100 1203 RAVI
0000540D424200000100 1201 RAVI
000099930AA400000100 1200 dk
00004042C1A200000100 1111 Hello, world!
0000B9C9639300000100 1640 Santosh
0000FE4F2CF500000100 1639 upendra
000040CF7B1300000100 1945 raman

********************************************************************
Then I tried the following Query.

sel e_name from test where rowid='0000C500B17E00000100';

AND It is giving the following error......................................

3640:comparing BYTE data in column in column ROWID with other data types is illegal

can anyone Plz tell why this error is throwing.
Is there any other way to use rowid to update or simply select from a table.
4 REPLIES
Enthusiast

Re: rowid in Teradata

Byte data must be suffixed with 'xb'. Try the following.

sel e_name from test where rowid='0000C500B17E00000100'xb;

-Foxbat
Enthusiast

Re: rowid in Teradata


By giving xb sufix ,it works.

Thanks for the information.
Enthusiast

Re: rowid in Teradata

can this be done in V2R5?

I tried it and it says
3706: syntax error: ROWID not allowed.

Re: rowid in Teradata

ROWID is a reserved word and cannot be referenced in the WHERE clause in R5. It is allowed in JOIN INDEX creation.

In R5.0.x you can enable the "use" of ROWID, for backward compatibility purposes, with a INTERNAL flag setting in DBSCONTROL; but technical issues are not supportable as it is explicitly stated that ROWID is not supported in SQL query syntax in R5.

After R5.0.x, NCR has disabled the DBSCONTROL setup option. So in the Teradata RDBMS newer than R5.0.x, ROWID is not allowed to be queried by using SQL.