Subject RE: [firebird-support] External file load
Author Rick Debay
> 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

I tried just the SELECT portion and got:
invalid request BLR at offset 2299 Implementation limit exceeded block
size exceeds implementation restriction

I'm going to try to create a stored procedure.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alan McDonald
Sent: Friday, February 20, 2009 2:19 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] External file load

> 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



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org 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




Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.