Subject | RE: [firebird-support] External Tables |
---|---|
Author | Louis Werth |
Post date | 2005-06-22T06:51:31Z |
Thanks a million, it works
Louis
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 22 June 2005 08:05 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] External Tables
At 07:39 AM 22/06/2005 +0200, you wrote:
Sibriryakov. I don't know where he got it. :-))
Define a smallint column as the last column in the table:
alter table mytable
add EOL_FIELD smallint default 2573;
commit;
Now, in DSQL, you can do this (assming the file is for use on Windows):
Insert into exp_patient_demo(patient_id, first_name, last_name)
values (whatever....)
That is, if you ignore the EOL character in your insert statement, the
engine will write this 2-byte number automagically. The two bytes are of
course 0D 0A which, in ascii, is ch(13)||ch(10). a.k.a. "CRLF".
./heLen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Louis
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 22 June 2005 08:05 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] External Tables
At 07:39 AM 22/06/2005 +0200, you wrote:
>Thanks, its now workingHere's a "Firebird-support special" for you. I got it from Dmitry
>
>One more question please:
>
>According to the documentation I must add a field at the end of 2Bytes that
>will indicate the "EOL" Character
>
>So if I populate my External table : exp_patient_demo
>
>Insert into exp_patient_demo(patient_id, first_name, last_name, EOL_FIELD)
>select id_patient_master, first_name, last_name, ???
> from patient_master
>
>How do I add the eol character through a SQL qry
Sibriryakov. I don't know where he got it. :-))
Define a smallint column as the last column in the table:
alter table mytable
add EOL_FIELD smallint default 2573;
commit;
Now, in DSQL, you can do this (assming the file is for use on Windows):
Insert into exp_patient_demo(patient_id, first_name, last_name)
values (whatever....)
That is, if you ignore the EOL character in your insert statement, the
engine will write this 2-byte number automagically. The two bytes are of
course 0D 0A which, in ascii, is ch(13)||ch(10). a.k.a. "CRLF".
./heLen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links