Retrieving varbyte column into a file


Retrieving varbyte column into a file

Hi ,

What is the process of retrieving the column value whose datatype is varbyte in bteq script.

For example I have a table

ABC having a column bcd as varbyte(64000).
In this column one .dat file is stored which contains some records.
Now I want to retrieve the same column value into a file using the select query

select bcd from abc;

Teradata Employee

Re: Retrieving varbyte column into a file

You might want to investigate DATA export mode.

The syntax is something like:

.EXPORT DATA FILE = filename

If I recall correcting, the resulting row in the export file starts with 2 byte row length field and the row ends with 0A or 0D byte . VarByte data type also starts with a two byte field length. Therefore the VarByte field starts at offset 4.