I am currently attempting to import a CSV data file that lists information in a top down format that I need to convert to a compacted flat file form for further calculations and manipulation, but cannot figure out how to to do so. I believe I'm missing something basic in how I'm doing my select query, or I'm trying to make it do something it's not intended to do.
Examples attached as DumpedData.jpg before, and ConvertedData.jpg after conversion.
The common key is based on [Layout] & [Ring] & [Hole], with [Point Number] being the variable to combine on. And I'm pulling the X,Y, and Z from the second entry and appending it into the first record string, so I have a coordinate start and stop point by which I can generate calculations. Basically there should always be two lines in the data set with the first three fields the same, and the last field being two sequential numbers, though that's not always guaranteed, but one will always be larger than the other for sure. There are some entries in the data set where the first three fields will be the same for 25 records in a row, but that's something I can deal with on a separate select distinct query.
I've found concatenation routines on here, but that won't work for me as I need to maintain numeric integrity, in individual fields, and data separation in order to do calculations.
Any suggestions to point me in the right direction? Am I looking at some do/while loops in VBA, or is this something that I could somehow extract the leading half of the data with one query, the trailing half with a second query, and then union the final results back together in the order I need?
Examples attached as DumpedData.jpg before, and ConvertedData.jpg after conversion.
The common key is based on [Layout] & [Ring] & [Hole], with [Point Number] being the variable to combine on. And I'm pulling the X,Y, and Z from the second entry and appending it into the first record string, so I have a coordinate start and stop point by which I can generate calculations. Basically there should always be two lines in the data set with the first three fields the same, and the last field being two sequential numbers, though that's not always guaranteed, but one will always be larger than the other for sure. There are some entries in the data set where the first three fields will be the same for 25 records in a row, but that's something I can deal with on a separate select distinct query.
I've found concatenation routines on here, but that won't work for me as I need to maintain numeric integrity, in individual fields, and data separation in order to do calculations.
Any suggestions to point me in the right direction? Am I looking at some do/while loops in VBA, or is this something that I could somehow extract the leading half of the data with one query, the trailing half with a second query, and then union the final results back together in the order I need?