Subject RE: [firebird-support] External file load
Author Alan McDonald
> I created an external table DDL to import a fixed width file with 326
> columns. To move that data in to the internal table, I was going to
> select from a view. I want the view to trim trailing blanks and to
> convert the file's various date formats to Firebird dates.
> Without any data conversion the view can be created without any
> problem.
> When I try to trim all text fields that are longer than one character,
> I
> get an error that the table definition, at 65574 bytes, is too large.
> The strange part is that originally I was left and right trimming ALL
> columns. The error gave the same table size; only left trimming
> specific columns didn't reduce the size at all.
>
> I have two questions, what can I do to reduce the size of the metadata,
> and if I can't use a view how should I transform the data when
> importing
> in to the internal table?

you can't just use
INSERT INTO INTERNAL TABLE(FIELD1, FIELD2, ...) VALUES
SELECT
CAST(FIELD2 AS BIGINT),
CAST(FIELD2 AS VARCHAR(30)),
...
FROM EXTERNAL TABLE


?
Alan