Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I load a file from a 3rd party, that has several columns, all named except 3. The 3 come through as a full stop. For example:
field1, field2,.,field3,.,field4
I thought this would be ok, because of the positional nature of the bad fields. ie:
LOAD
field1 as FieldOne,
field2 as FieldTwo,
[.] as Field_Fstop1,
field3 as FieldThree,
[.] as Field_Fstop2,
field4 as FieldFour
FROM
(txt, codepage is 1252, embedded labels, delimiter is ',');
However, I am finding the data messed up between these fields, especially if some of them come through blank.
Is this a bug, should I expect QV to handle these fields in the file based on their position? How do I work around it?
any ideas?
Philip
Hello Phillip,
I haven't tested but you may try loading fields as
LOAD @1 as FieldOne, @2 as FieldTwo, @3 as Field_Fstop1, //rest of script here
so you don't have to specify the name of the field and fields are taken between the delimiter character you have specified.
Hope that helps.
Hello Phillip,
I haven't tested but you may try loading fields as
LOAD @1 as FieldOne, @2 as FieldTwo, @3 as Field_Fstop1, //rest of script here
so you don't have to specify the name of the field and fields are taken between the delimiter character you have specified.
Hope that helps.
Thanks Miguel
Thats what I have decided to do. Its a pain, becuase I have 156 fields to do, and there are some complex transformations in there too, but its the right way to do it. Thanks
Phillip