Subject | Re: [firebird-support] Batch Insert from external table |
---|---|
Author | Milan Babuskov |
Post date | 2005-05-24T09:01:35Z |
m_apessos wrote:
select nullif(cast(rtrim(column1) as varchar(255),'')
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> The problem is with the columns of type char or varchar. I noticedJust cast RTRIM result as varchar and you're done:
> that
> in MYTABLE all the similar typed columns where right-padded with
> spaces
> to the full length of each column as declared in the external table.
>
> To solve that I used the rtrim UDF from ib_udf.dll and my statement
> became like this:
>
> INSERT INTO MYTABLE (COLUMN1, COLUMN2, ...)
> SELECT NULLIF(RTRIM(COLUMN1),''), NULLIF(RTRIM(COLUMN2),''), ...
> FROM MYEXTERNALTABLE
>
> The results where the same!!
>
> Does anyone have an idea how to overcome tha problem?
select nullif(cast(rtrim(column1) as varchar(255),'')
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org