Databases :: MySql :: Fixed length Data file import |
|||
| By: Squibi |
Date: 14/10/2004 00:00:00 |
Points: 50 | Status: Answered Quality : Excellent |
|
Hi all, I have a fixed width data file that I need to import into MySQL. Here is a sample line. 920 lines wide: 0000000868RReader Turntable SE-14 READER TURNTABLE SE-14 NN Hyun, Peter E Park, Dong-Il I Apple Publishing 041981 TCB 0017000000007000 ZN ZK NON000000Non-Classifiable NANANANA NA 00124 010000448015940131000146N VUCOYNNENGABKFS 000001700GNRGSEGEN000000 000004593N000164975001163794000000000 I do have a paper that tells which information is located in which part, but I have no idea how to go about importing it into mysql. |
|||
| By: VGR | Date: 14/10/2004 16:13:00 | Type : Answer |
|
| well, the thing I can think of : 1) either export as delimited format :D or 2) import as a big TEXT field, and then split it easily into individual fields using MID() or SUBSTR(). A script will do it easily. it's some work but it's the most logical |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








