Retrieving varbyte column into a file
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Retrieving varbyte column into a file Expand / Collapse
Author
Message
Posted 3/19/2008 3:05:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/19/2008 2:57:28 AM
Posts: 8, Visits: 2
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;

Regards
Sanjay


Regards
Post #10981
Posted 3/20/2008 12:52:15 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 1:59:51 PM
Posts: 125, Visits: 274
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.



Shaw
Post #10991
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 4 ( 4 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 4:13pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 8 queries. Compression Disabled.