|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello All,
I need to import the following lines of text into several fields in my database table: I know the field length for each. How can a parse each line to import the file as a delimited text? The example below equates to 16 fields of data in my table. 2002702007011100111070671837000010065RDSSAL00000022304980800010045950 Thanks |
|
#2
|
||||
|
||||
|
Put up a simple loading script in your language of choice or use an ETL tool like Pentaho or KETL
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#3
|
|||
|
|||
|
Hi,
Have you ever looked at "external tables"? If you have access to the server, you can use your ASCII files as if it were a table inside your database, by cutting up each line to individual columns. Next, you can just do SELECT from these tables and insert them into real database tables. This is by far the fastest way to import data in Firebird. There's docs available here: http://www.firebirdsql.org/index.php?op=doc You might want to go down that page and search for the InterBase 6 documentation in order to get a good explanation. Google a bit for examples as well. Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Helop with insert non-delimted text file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|