Most recent edit on 2006-02-23 20:23:48 by ArchLineberger
Additions:
CategoryHowTo
Tab-Delimited Import
Magic does not allow the input of the <Tab> character as a delimiter. If your data is not in fixed-size columns or if commas are included in the data itself, you may need to resort to a tab-delimited import file. Using the following method, you can construct a tab-delimited import program in just a few minutes.
Construct database file
Generate an Import program
Modify the Program
Export/Import the Program
Database File
Construct your table in Magic. Use field pictures and storage types as you like. Magic will convert the text to the database types you specify. Be sure to include an index.
Generate Program
When you have the table constructed to suit, highlight it in the Table Repository and press <Ctl+G> to generate a program.
Mode - Generate
Option - Import
Columns - If you want all columns and their sequence matches the import file, leave this parameter as it is. If your table contains more fields or a different sequence of fields, Zoom here and change the sequence of the Column or set missing fields to 0 to remove them from the import program.
Program name - As you like it.
Text file - Leave it as is for now.
Click <OK> to generate the program.
Modify Program
Change to your Program Repository. At the bottom, you will find your newly generated program.
Go to the Record Suffix and select the Input Form operation. Change the Dlm: value from "Column" to "Single".
Go to the I/O Repository <Ctl+I> and zoom on the Exp/Var column. Replace the expression with the fully-qualified path to your import file.
Export/Import the Program
Export your program to the desktop, then open it in your text editor and search for the string "DLMR"
You will find the phrase "DLMR=32" The 32 refers to the <blank> character because we did not specify a delimiter in our program.
Change the 32 to 9, which is the decimal value of a <Tab> character.
Save your changes, open your application and import the program you just modified.
CategoryHowTo
Deletions:
CategoryDataBases CategoryHowTo CategorySecurity CategoryUNIX CategoryWeb
Please delete categories not on topic...
If you don't have time to formate like this. Fee free to use an other. Most important is the information - not the format!
Page Heading
Information about ...
Item 1
Item 2
Item 3
Other Topics
Item 1
Item 2
Item 3
Sub Heading 1
Some text
Sub-Sub Heading
Some more text
CategoryDataBases CategoryHowTo CategorySecurity CategoryUNIX CategoryWeb
Please delete categories not on topic...
clone this page∞
Oldest known version of this page was edited on 2006-02-23 19:13:20 by ArchLineberger [Cloned from SampleLayout]
Page view:
CategoryDataBases CategoryHowTo CategorySecurity CategoryUNIX CategoryWeb
Please delete categories not on topic...
If you don't have time to formate like this. Fee free to use an other. Most important is the information - not the format!
Page Heading
Information about ...
Index
Item 1
Item 2
Item 3
Other Topics
Item 1
Item 2
Item 3
Please edit this page...
Sub Heading 1
Some text
Sub-Sub Heading
Some more text
CategoryDataBases CategoryHowTo CategorySecurity CategoryUNIX CategoryWeb
Please delete categories not on topic...
clone this page∞