anonymous wrote:
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
Helen Borrie answers:
Here's a "Firebird-support special" for you. I got it from Dmitry 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 (assuming 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".