Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 29 Nov 2005 @ 11:03:42 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Export to a text file using OLE-DB
 
From:   Anomy Anom

<-- Anonymously Posted: Monday, November 28, 2005 19:55 -->

In case you really do want to use FastExport or BTEQ to export to a text file via OLE DB, the following is an example of how you can do this:

* In the OleLoad GUI, for "Select a destination", choose the "Microsoft Jet 4.0 OLE DB Provider (Microsoft.Jet.OLEDB.4.0)" entry.

* On the "All" tab of the "Data Link Properties" dialog box, set "Extended Properties" to "text;FMT=Delimited;HDR=Yes" (without the quotes) and set "Data Source" to the name of the folder to contain the output file (i.e. "C:\").

* Note that when you close the Data Link Properties dialog box, you will see an error message saying:

Error occurred while attempting to set the properties you entered. To make changes and try again, click Cancel. To accept this error and continue, click OK. Failed Properties: Persist Security Info (NOT SUPPORTED)

This is normal, just click OK.

* For "Select a source", choose the "NCR Teradata ("Teradata")" entry.

* It is important to exactly follow this step in its entirety. Ensure that the "Selection" radio button in the "Select the desired table and column(s) group" is selected. Find and select the icon for the desired table. Due to an unfortunate issue in the "Microsoft Jet 4.0 OLE DB Provider" regarding quoting, you will see a message saying,

Cannot open the specified table, "`tablename`", because:'`tablename`' is not a valid name.

Make sure that it does not include invalid characters or punctuation and that it is not too long.

Click OK. Now click the "Name" radio button in the "Select the desired table and column(s)" group. Click on Settings and enter the name of the output file in the Table name location without any punctuation or special characters (for example, MyOutfile.txt). This name must end in ".txt".

* When you run the job, the file to receive the output data must already exist and the first line of that file must contain the column names. If you are using BTEQ, to create this file, you can add a command to the BTEQ script prior to the .EXPORT command like ".os echo EmpID,EmpName > C:\MyOutfile.txt" to create the file.

Hoping that it helps you out!



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023