Subject RE: [IBO] Re: External File
Author Kevin Everhart
You could, but then you would have those delimiters in your table just
taking up space. I suppose if the table is small it wouldn't be a problem,
but if it were large this would make it less efficient.

Also keep in mind external tables are fine for small tables. You can't
assign indexes to external tables as far as I know, which will make
retrieving records slow for large tables. Also the NEWLINE field in the
table definition has to be the last thing or all the records will be off.

We use the for moving data from our old Interbase 3.3 database to our
Firebird 1.0 database, this is fine for dumping data from one database to
another where speed isn't a necessity, just has to get done.

You can use any single character delimiter you want, the database is only
looking at the position, I don't know if tab will work. You would then
change my example to the following:

CREATE DOMAIN CIPFIRST AS CHAR(2);
CREATE DOMAIN CIPSECOND AS CHAR(2);
CREATE DOMAIN DESCRIPTION AS CHAR(80);
CREATE DOMAIN DELIMITER AS CHAR(1); //Add this
CREATE DOMAIN NEWLINE AS CHAR(1);

CREATE TABLE EXTCIPTITLES
EXTERNAL FILE '/D/Db/Iccb/ciptitles.data'
CIPFIRST CIPFIRST,
DELIMITER DELIMITER, //Add this
CIPSECOND CIPSECOND,
DELIMITER DELIMITER, //Add this
DESCRIPTION DESCRIPTION,
NEWLINE NEWLINE;




-----Original Message-----
From: Ahmet Elgin [mailto:ahmet.elgin@...]
Sent: Tuesday, June 28, 2005 3:34 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Re: External File


Thanks, by declaring CHAR(1) field between all fields I can assign
which delimiter I want.

Kevin Everhart wrote:

> Ahmet,
>
> Here is an example:
>
> CREATE DOMAIN CIPFIRST AS CHAR(2);
> CREATE DOMAIN CIPSECOND AS CHAR(2);
> CREATE DOMAIN DESCRIPTION AS CHAR(80);
> CREATE DOMAIN NEWLINE AS CHAR(1);
>
> CREATE TABLE EXTCIPTITLES
> EXTERNAL FILE '/D/Db/Iccb/ciptitles.data'
> CIPFIRST CIPFIRST,
> CIPSECOND CIPSECOND,
> DESCRIPTION DESCRIPTION,
> NEWLINE NEWLINE;
>
> The ciptitles.data file only has the three columns of data, no extra
> column
> for the new line, that is defined in the database for the CR.
>
> Hope this helps,
>
> Kevin E.
>
> -----Original Message-----
> From: ahmetel [mailto:ahmet.elgin@...]
> Sent: Thursday, June 23, 2005 7:01 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Re: External File
>
>
> --- In IBObjects@yahoogroups.com, Aage Johansen <aagjohan@o...> wrote:
>
> > In "Using Firebird" I've seen something like:
> > CREATE TABLE EXT_TBL EXTERNAL FILE filespec
> > (columndef [,columndef,...],
> > linedelimiter1 CHAR(1)[, linedelimiter2 CHAR(1)]);
> > (give or take a little...)
> > The linedelimiters are used for CR/LF or LF.
> >
> >
> > --
> > Aage J.
>
> Thanks for your interest,
> I tried the syntax but cant success. Can you give an example?
> are linedelimiters used as column of table?
>
> ahmet,
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "IBObjects
> <http://groups.yahoo.com/group/IBObjects>" on the web.
>
> * To unsubscribe from this group, send an email to:
> IBObjects-unsubscribe@yahoogroups.com
> <mailto:IBObjects-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>


[Non-text portions of this message have been removed]



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links