Board index » delphi » How to Save DataSet returned by Query

How to Save DataSet returned by Query

Currently, a Query such as

select count(*) as jobs, am158.week_planned, am158.trade, am158.Plan_defect
from am158
group by am158.week_planned, am158.trade, am158.Plan_defect
order by am158.week_planned, am158.trade, am158.Plan_defect

returns a data set which can be displayed.  However how, can I get this
dataset saved as a paradox file.  Please note that the above query is
attached to a ODBC driver which is very slow, and so I wish to extraxt
result sets to locally held paradox files for quick processing, prior to
resubmitting the changes.

Any help would be apprectiated.

Rob Edgar
+44 1284 713 945

 

Re:How to Save DataSet returned by Query


Try the INSERT INTO statement.

Something like this:

INSERT INTO "am158bis.db"
(am158.week_planned, am158.trade, am158.Plan_defect)

SELECT am158.week_planned, am158.trade, am158.Plan_defect

FROM "am158.db"

Christophe.

Robert Edgar <robert.ed...@wsh-tr.anglox.nhs.uk> schreef in berichtnieuws
3b7be3b1_1@dnews...

Quote
> Currently, a Query such as

> select count(*) as jobs, am158.week_planned, am158.trade,
am158.Plan_defect
> from am158
> group by am158.week_planned, am158.trade, am158.Plan_defect
> order by am158.week_planned, am158.trade, am158.Plan_defect

> returns a data set which can be displayed.  However how, can I get this
> dataset saved as a paradox file.  Please note that the above query is
> attached to a ODBC driver which is very slow, and so I wish to extraxt
> result sets to locally held paradox files for quick processing, prior to
> resubmitting the changes.

> Any help would be apprectiated.

> Rob Edgar
> +44 1284 713 945

Re:How to Save DataSet returned by Query


Sadly this gives an error, as the source of the query and the output file
are of 2 different types, one (the source) is DataFlex via an ODBC driver,
the latter (the recipient) is paradox.  The BDE gets confused when having an
SQL statement with differing aliases and datafile types.

Thanks for you assistance to date, Christophe, but sadly this problem still
stands.

Quote
christophe <christo...@s-dv.com> wrote in message news:3b7be752_2@dnews...
> Try the INSERT INTO statement.

> Something like this:

> INSERT INTO "am158bis.db"
> (am158.week_planned, am158.trade, am158.Plan_defect)

> SELECT am158.week_planned, am158.trade, am158.Plan_defect

> FROM "am158.db"

> Christophe.

> Robert Edgar <robert.ed...@wsh-tr.anglox.nhs.uk> schreef in berichtnieuws
> 3b7be3b1_1@dnews...
> > Currently, a Query such as

> > select count(*) as jobs, am158.week_planned, am158.trade,
> am158.Plan_defect
> > from am158
> > group by am158.week_planned, am158.trade, am158.Plan_defect
> > order by am158.week_planned, am158.trade, am158.Plan_defect

> > returns a data set which can be displayed.  However how, can I get this
> > dataset saved as a paradox file.  Please note that the above query is
> > attached to a ODBC driver which is very slow, and so I wish to extraxt
> > result sets to locally held paradox files for quick processing, prior to
> > resubmitting the changes.

> > Any help would be apprectiated.

> > Rob Edgar
> > +44 1284 713 945

Re:How to Save DataSet returned by Query


Use a BatchMove component to move the results to a Paradox table.

--
Bill
(TeamB cannot answer questions received via email)

Other Threads