Subject Re: [IBO] Re: IB_WISQL Datapump
Author Jason Wharton
> 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.

> 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.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <paulhope@...>
To: <IBObjects@egroups.com>
Sent: Sunday, December 31, 2000 7:59 AM
Subject: [IBO] Re: IB_WISQL Datapump


> Jason
>
> > > I have just been trying the datapump facility for the first time
> and
> > > have had mixed success.
> > > With very simple src SQL like 'select * from table where
> field=value'
> > > and dst SQL 'select * from table' it seems to be missing out some
> > > columns.
> > >
> > > If I look at ItemActions and click prepare then all the included
> > > columns have ColumnName=DIRECT and the excluded have
> ColumnName=BASE:
>
> In this instance the ColumnName was a simple char(1) and happended to
> be the column used in the where clause of the srcSQL. The data was
> transfered but the corresponding destination column was null.
>
> > >
> > > What does BASE: mean? Why is it there? Is it what causes the
> column
> > > to be excluded? Is the SQL is the right form?
>
>
>
> >
> > Base simply means that it wasn't possible for the source or
> destination
> > buffer pointers to be swapped over to the other's buffer so that
> there is no
> > need to move the data from one to the other.
> >
>
> Are we talking buffer pointers to any type of data or pointers to
> blob data? and presubably we are only talking about moving stuff
> within the same DB?
>
> > IOW. If they are all direct is all that is necessary to do is call
> the API
> > to fetch, then execute, fetch then execute and so on. No need to
> fetch, move
> > data to dest, then execute. This makes it as fast as is absolutely
> possible.
> >
> > Base just means it has to move the data...
>
>
> Regards
> Paul
>
>
>
>
>