Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing data into new rows instead of columns

Status
Not open for further replies.

teluser

Technical User
Nov 21, 2002
11
US
I have a file that I need to Parse the last column using the "\" character in the ERRORMSG field. The problem is that I don't need it parsed into a separate column, I need to create another new row in a table copying the same data in the preceding columns. Here is a sample of the data that I have.

IDNUM ORDERNUMBER PURCHNUM OPID ERRORMSG
111 RTYWHD BOGTYS123 YQZSY Error Type:pR \Error Sec.: SE\Error Num.: 010\Error Type: TAN \Error Sec.: SE\Error Num.: 009
Here's what it needs to look like:

IDNUM ORDERNUMBER PURCHNUM OPID ERRORMSG
111 RTYWHD BOGTYS123 YQZSY Error Type:pR \Error Sec.: SE\Error Num.: 010
IDNUM ORDERNUMBER PURCHNUM OPID ERRORMSG
111 RTYWHD BOGTYS123 YQZSY Error Type: TAN \Error Sec.: SE\Error Num.: 009
I have no clue where to even begin to start. Any help would be greatly appreciated. I'm on an NT 4.0 using Access 2000.
 
How is the data added now? By code(sample please), table view?

Patrick
 
All the data is sent to me in an EXCEL spreadsheet. I have no control of the format that it is sent to me presently. Basically the only option I have is to take the EXCEL file and import into access.
Thanks
Brad
 
Also, it might not always be just two items that need to be parsed like in the above example. It could be 3, 4, 5, etc. Its never the same.
Thanks..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top