Hi,
I have a text file where are variable length columns.
for example
first two characters is id
next 10 characters is name
next 20 characters is address
etc
How to import such data in to the table definitions?
I see there only option of fixed width columns and delimited ones?
None of them is correct in my case
Any help would be much appreciated.
Marcin
Variable length of columns in text file
Moderators: chulett, rschirm, roy
then your file is of fixed width format.
do this, while importing the meta data, choose the fixed width option and in the columns, specify the column name and in the length specify the ( for ID specify 2, for name specify 10 and so on...).
this should work, provided your file is truely fixed width.
when i say truely fixed width, i mean, even if the name is of length 5, the rest of the remaining 5 positions should be empty spaces)
do this, while importing the meta data, choose the fixed width option and in the columns, specify the column name and in the length specify the ( for ID specify 2, for name specify 10 and so on...).
this should work, provided your file is truely fixed width.
when i say truely fixed width, i mean, even if the name is of length 5, the rest of the remaining 5 positions should be empty spaces)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.