Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have this troublesome table which is exported to a .csv file from a very old system.
To make sense out of the data I need to use this "fixed record" option in the wizard. So I make a lot of fixed fields, which the system auto name wiht a "@xx..." syntax. Afterwards I press finish in the wizard, and it the loads the script where I get all these Load "@xx, @xy, ...", if I do a reload or try to do something else, making a table from the fields, it does not work, and there is no table in the table viewer.
Any ideas?
Some of data is just vertical lines, which I of course intent to delete!
Thx for the enthusiasm, I did create a simple dummy .csv (code dos 850) from OO. It is not the exact same issue, where the original file is from an old ERP system. Though I got the same problem, so perhaps it is an issue that QV dont like OO.
It's easy if it's only an empty row before the header. You can use "header is 1 lines":
LOAD ID,
number,
A,
B,
C,
sum
FROM
[Test dummydata.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 1 lines);
- Ralf
-Mikael- написал(а):Thx, I did try that:
1. how can I change/define the field names from there?
Answer to your first question: Change your load statement to something like
LOAD @1:1 as Field1,
@2:11 as Field2,
......
@131:n as AnotherFeldName
FROM
Thx, but I was looking for a way to name the fields within the wizard, so I dont need to rename them in the script.
well, thx in this case it works well, from the real table I need to do fixed separator in OO, so the first line get mixed up anyway.
But that is a minor problem, can you load and reload my CSV file without any issues? Do you have Excel?