I am having an issue with scrubbing some data that I am pulling in from a CSV file from a bar code scanner. I am working on a little event attendee management tool. The scanner records a Session ID and then scans the Name Badge IDs from the people coming into the class. The problem is the low end (i.e. cheap) bar code scanner basically saves only 3 items: (1) Date stamp, (2) Time stamp and (3) Bar Code.
So, what I get is data that looks like this:
3/1/2012,11:00:00,Session1
3/1/2012,11:00:00,10125
3/1/2012,11:00:00,10126
What I want is data that looks like this:
3/1/2012,11:00:00,10125,Session1
3/1/2012,11:00:00,10126,Session1
I figure I should be able to loop through the data, find a field that begins with "Session" and then assign it to a variable and add it to a new field value for the rows following...until it hits another field that begins with "Session". And I would need to delete the row with just the Session ID on it.
But I don't know how to do it!!! Argh....can anyone help?
Thanks,
Lance
So, what I get is data that looks like this:
3/1/2012,11:00:00,Session1
3/1/2012,11:00:00,10125
3/1/2012,11:00:00,10126
What I want is data that looks like this:
3/1/2012,11:00:00,10125,Session1
3/1/2012,11:00:00,10126,Session1
I figure I should be able to loop through the data, find a field that begins with "Session" and then assign it to a variable and add it to a new field value for the rows following...until it hits another field that begins with "Session". And I would need to delete the row with just the Session ID on it.
But I don't know how to do it!!! Argh....can anyone help?
Thanks,
Lance