Subject | Re: [firebird-support] Best way to import from a TextFile |
---|---|
Author | Lucas Franzen |
Post date | 2006-10-10T17:36:31Z |
lec_sas schrieb:
External tables will work only with fixed length.
If you need to import dynamic textfiles with varying structures you
should think about writing some objects than can handle these various
file structures and importing destinations and let these objects handle
the import (in this case think about storing these definitions within
the database, too).
If you have just one file structure and one destination, I think you
should write a little code (no sarkasm!) to parse and import the file(s).
Use prepared DSQL (insert into) statements and it work pretty fast.
Luc.
> Hi, I am jsut wondering what the best way to import data from a textLots, depending on your needs.
> file is. I know there is import tools out there, but I do not wish to
> use them. I am using the embeded dll. Is there any alternatives other
> than using an external table?
External tables will work only with fixed length.
If you need to import dynamic textfiles with varying structures you
should think about writing some objects than can handle these various
file structures and importing destinations and let these objects handle
the import (in this case think about storing these definitions within
the database, too).
If you have just one file structure and one destination, I think you
should write a little code (no sarkasm!) to parse and import the file(s).
Use prepared DSQL (insert into) statements and it work pretty fast.
Luc.