Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to load a flat file with fixed positions to different tables, the simple structure looks like
aaa1 data1 data2 data3
bbb1 xxyy adkdfdk
ccc1 sdkfjeekwekjrejklejreje
aaa2 data4 data4 data4
bbb2 yyxx skddldd
ccc2 data5 data5 data5
records starting with aaa should be stored in table aaa
records starting with bbb should be stored in table bbb
etc,
every table has other type of info with different fields on different fixes positions
hope this examples give an idea what kind of data I would like to load,
thanks for your suggestions.
Something like the following will work
Table_aaa:
LOAD
@1:5 as Field1,
@6:10 as Field2
FROM [File] (fix, codepage is 1252)
Where @1:3='aaa';
Table_bbb:
LOAD
@1:5 as Field3,
@6:10 as Field4
FROM [File] (fix, codepage is 1252)
Where @1:3='bbb';
HIC
Something like the following will work
Table_aaa:
LOAD
@1:5 as Field1,
@6:10 as Field2
FROM [File] (fix, codepage is 1252)
Where @1:3='aaa';
Table_bbb:
LOAD
@1:5 as Field3,
@6:10 as Field4
FROM [File] (fix, codepage is 1252)
Where @1:3='bbb';
HIC
Tx Henric had no experience with this type of input but your answer made it easy!
mark