Subject | Re: [firebird-support] External table weirdness |
---|---|
Author | Vlad Khorsun |
Post date | 2009-04-10T18:50:53Z |
> What we do is this:Show us DDL for both tables
>
> Step 1. Write down data into a flat file
> Step 2. Map a External table to the flat file in Firebird.
> Step 3. With a select statement, transfer the content of the external table into an internal table.
>
> The problem I see on the new machine says not much:
>
> "
> Fri Apr 10 09:20:48 2009 - *** IBPP::SQLException ***
> Context: Statement::Prepare( INSERT INTO TYPE_4 (id, time_stamp, data)
> SELECT id, rtime, rdata FROM ext4 )
> Message: isc_dsql_prepare failed
>
> SQL Message : -802
> Arithmetic overflow or division by zero has occurred.
>
> Engine Code : 335544321
> Engine Message :
> arithmetic exception, numeric overflow, or string truncation
> "
> I think I may have discovered what the problem is, long file names.No
> So I exited the program and opened up flamerobin and tried the import statement (see below), and it worked.At first statement there was TYPE_4 table, not TYPE_2
>
> So the question is, what magic do Flamerobin do with external tables that apparently I'm missing ?
>
> Here is the import statement:
>
> INSERT INTO TYPE_2 (id, time_stamp, data)
> SELECT id, rtime, rdata FROM ext2Are you trying to assign INT into TIMESTAMP ?
>
> Here is how I define the external table:
>
> CREATE TABLE ext2 EXTERNAL file 'Folder with data\datafile.tmp'
> (
> id int,
> rtime int,
> rdata floatAre you sure you want "float" ?
Regards,
Vlad