Subject Re: IB_WISQL Datapump
Author paulhope@allcomm.co.uk
Jason

> > Helen replied that the dstSQL must be an INSERT statement. As it
> > almost worked with a select statement is this true? Obviously if
> > you're moving all the columns of a table select * is a lot more
> > convenient then typing out all the field and param names!
>
> It is possible to have a SELECT statement in both the src and dst
> statements. The datapump just figures out the INSERT statement for
you based
> on the SELECT statement if it can.

Excellent :-)

>
> > So (assuming a select statement in the dstSQL was OK)why do
columns
> > with BASE: come out as null after the transfer?
>
> Without knowing more details of your situation I am not sure I can
figure
> this out. One thing that could happen, that I think I already have
taken
> care of, is if the source columns are NOT NULL and the dst columns
are
> NULLable then there could be a way that the NULLable columns could
get
> messed up if direct binding is used. It could be the other way
around too.
> By using BASE I avoid the possibility of an incompatibility in the
handling
> of the DIRECT binding in buffers.
>
> If you can please tell me how exactly your tables are structured
and I'll
> try it myself to see.
>

Here's the structure from the browse window of IB_WISQL, both src and
dst are identical

CREATE TABLE LP (
RECORD_NO INTEGER NOT NULL
, AC_NO INTEGER
, COMPANY VARCHAR( 1 )
, F1 VARCHAR( 1 )
, F2 VARCHAR( 1 )
, F3 VARCHAR( 1 )
, TYPE VARCHAR( 2 )
, D1 DATE
, D2 DATE
, D3 DATE
, INV_NO VARCHAR( 12 )
, INV_NO_2 VARCHAR( 12 )
, NETT NUMERIC ( 15, 2 ) /* Defaulted */
, VAT NUMERIC ( 15, 2 ) /* Defaulted */
, DISC NUMERIC ( 15, 2 ) /* Defaulted */
, OI NUMERIC ( 15, 2 ) /* Defaulted */
, F4 VARCHAR( 1 )
, BANK SMALLINT
, TEMP NUMERIC ( 15, 2 )
, CONSTRAINT INTEG_82
PRIMARY KEY ( RECORD_NO )
)

and ItemActions

RECORD_NO=DIRECT
AC_NO=DIRECT
F1=DIRECT
F2=DIRECT
F3=DIRECT
TYPE=DIRECT
D1=DIRECT
D2=DIRECT
D3=DIRECT
INV_NO=DIRECT
INV_NO_2=DIRECT
NETT=DIRECT
VAT=DIRECT
DISC=DIRECT
OI=DIRECT
F4=DIRECT
BANK=DIRECT
TEMP=DIRECT
COMPANY=Base:

Regards
Paul