Salesforce

How Do I Dump Data from a Database Table to a Text File? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Dump Data from a Database Table to a Text File? (Magic xpa 4.x)

It is often useful to dump data from a database table into a text file, to send data to a spreadsheet, to another application, or to convert the data within Magic xpa. Magic xpa provides a utility to do this automatically, the Generate Program utility (Options->Generate Program, or Ctrl+G).

Creating a text export program

  1. In the Data repository, position the cursor on the table you want to view.

  2. Press Ctrl+G (Options->Generate Program).

  3. Select:

    • Mode=Execute to view the data directly with a temporary, or Mode=Generate to create a new program in the Program repository.

    • Option=Export

    • Zoom from the Columns field to select only certain columns, if you want, and to change their order, if you want.

  1. For Text file, enter the name of the text file you will create.

  2. Press Enter or click OK.

If you selected Mode=Execute, the data will be exported into the text file you specified.

If you selected Mode=Generate, then there will be a new program in the Program repository. You can run this program by pressing F7.

Note: A plain text export can be very useful, but has some limitations. The particular problem happens to be memo fields which may contain a CR/LF, or BLOB fields. These sorts of files may require something more involved, such as XML output.

Reference
Attachment 
Attachment