Any help is appreciated, I've been trying to figure this out and nothing I've tried has worked.
Attached is a very small .dat file.
I run this .dat through a qvw that turns it into a qvd, using subfields to separate out the fields in the data.
The subfields separate it out on char3 and char1, since it is delimited that way.
However, the end result has field names as values under other fields.
???
This is what it looks like when exported to Excel.
It should only be up to row 10, and the last 3 rows are extremely odd.
Please view the attached QVW that processes the .dat file, I believe there is nothing wrong with my structure.
I read your logic loosely as:
If QVD doesn't exist then store field names into QVD.
Then read data.
Then concatenate contents of qvd with data and store into qvd.
I don't get the part where you are storing the filed names (inline load) into the qvd.
When I comment out the part that stores the field names and load the data, it looks OK.
Are you trying to do an incremental load?
I read your logic loosely as:
If QVD doesn't exist then store field names into QVD.
Then read data.
Then concatenate contents of qvd with data and store into qvd.
I don't get the part where you are storing the filed names (inline load) into the qvd.
When I comment out the part that stores the field names and load the data, it looks OK.
Are you trying to do an incremental load?
Hmm this is very odd.
I see what you mean, but let me explain what the inline load is for.
This QVW will run each day, and take the current days data in .dat format, process it through those subfields, then add it to the end of the existing qvd. This way, the qvd data is up to date. However, if the qvd does not exist yet, it needs to create it first, so it inline loads all the field names at the very start. Then it processes the .dat, and appends it onto that qvd. Does that make sense?
I tried your method, and it does work, but now I don't have the method to create a qvd if one doesn't exist...I wonder why that part was causing issues
You need logic like this:
If QVD does not exist
Read data and store to qvd
else
Read data
Concatenate data from qvd
store to qvd
endif
Thank you. The issue was actually user error, I put the inline load on multiple lines instead of just one