I need some advice on how to import the following kind of
text data into mysql: ( it's a long list, but bear with me)
**
IB 1859060196
BI PAPERBACK
AU SHINE, NORMAN
BC VXFN
CO UK
PD 19990923
NP 128
RP 9.99
RI 9.99
RE 9.99
PU CONNECTIONS BOOK PUBLISHING
YP 1999
TI NUMEROLOGY
TI YOUR CHARACTER AND FUTURE REVEALED IN NUMBERS
EA 9781859060193
RF R
SG 2
GC M01
DE A unique step-by-step visual approach to numerology, how to assess
DE characters and compatibility from names and birth dates.
**
IB 1898295395
BI SPIRAL BOUND
AU PRICE, ROBIN
BC ELX
CO UK
PD 19961231
RP 15.75
RI 15.75
RE 15.75
PU ENGLISH EXPERIENCE
YP 1996
SR BRAIN FRIENDLY RESOURCES
TI CONVERSATION 2: STUDENT TALK
EA 9781898295396
RF R
GC C01
**
IB 071483503X
BI PAPERBACK
AU IVRY, BENJAMIN
BC CVF
CO UK
PD 19961030
NP 240
RP 14.95
RI 14.95
RE 14.95
PU PHAIDON PRESS LTD
YP 1996
SR 20TH-CENTURY COMPOSERS
TI FRANCIS POULENC
EA 9780714835037
RF R
SG 1
GC Q00
As you can see, every row begins with ** and all the fields
are preceded with a special tag. Furthermore, not every book has the same number of fields, only a number books have DE descriptions, for example.
I know how to import a standard CSV text file using LOAD DATA INFILE, but with this tagged format I'm lost. Please help. My supplier wont offer the data in any other format!
Simo Savonen
sipesa@utu.fi
text data into mysql: ( it's a long list, but bear with me)
**
IB 1859060196
BI PAPERBACK
AU SHINE, NORMAN
BC VXFN
CO UK
PD 19990923
NP 128
RP 9.99
RI 9.99
RE 9.99
PU CONNECTIONS BOOK PUBLISHING
YP 1999
TI NUMEROLOGY
TI YOUR CHARACTER AND FUTURE REVEALED IN NUMBERS
EA 9781859060193
RF R
SG 2
GC M01
DE A unique step-by-step visual approach to numerology, how to assess
DE characters and compatibility from names and birth dates.
**
IB 1898295395
BI SPIRAL BOUND
AU PRICE, ROBIN
BC ELX
CO UK
PD 19961231
RP 15.75
RI 15.75
RE 15.75
PU ENGLISH EXPERIENCE
YP 1996
SR BRAIN FRIENDLY RESOURCES
TI CONVERSATION 2: STUDENT TALK
EA 9781898295396
RF R
GC C01
**
IB 071483503X
BI PAPERBACK
AU IVRY, BENJAMIN
BC CVF
CO UK
PD 19961030
NP 240
RP 14.95
RI 14.95
RE 14.95
PU PHAIDON PRESS LTD
YP 1996
SR 20TH-CENTURY COMPOSERS
TI FRANCIS POULENC
EA 9780714835037
RF R
SG 1
GC Q00
As you can see, every row begins with ** and all the fields
are preceded with a special tag. Furthermore, not every book has the same number of fields, only a number books have DE descriptions, for example.
I know how to import a standard CSV text file using LOAD DATA INFILE, but with this tagged format I'm lost. Please help. My supplier wont offer the data in any other format!
Simo Savonen
sipesa@utu.fi