Batchmove between query and table 
Author Message
 Batchmove between query and table

Does anyone know of a way to perform the equivalent of a batchmove
between a TQuery and a TTable?

I have a process for which the data is best selected using SQL, but once
I have selected the record set, I need to move it to a temporary table
for use in a subsequent query (since nested sub-queries are not
supported).  But the documentation on TBatchMove specifies that doth
source and destination must be tables.

Does anyone know of a way around this problem?



Wed, 18 Jun 1902 08:00:00 GMT  
 Batchmove between query and table

You can use either a TQuery or a TTable as the source dataset. What you
are trying to do can be accomplished using the BatchMove method of the
destination table (i.e. Table1.Batchmove(Query1, batAppend). I do it all
the time. If you use batCopy instead of batAppend, the table is created
for you on the fly.

Quote:

> Does anyone know of a way to perform the equivalent of a batchmove
> between a TQuery and a TTable?

> I have a process for which the data is best selected using SQL, but once
> I have selected the record set, I need to move it to a temporary table
> for use in a subsequent query (since nested sub-queries are not
> supported).  But the documentation on TBatchMove specifies that doth
> source and destination must be tables.

> Does anyone know of a way around this problem?

--
Gabriel Beccar-Varela



Wed, 18 Jun 1902 08:00:00 GMT  
 Batchmove between query and table

Quote:

> Does anyone know of a way to perform the equivalent of a batchmove
> between a TQuery and a TTable?

> I have a process for which the data is best selected using SQL, but once
> I have selected the record set, I need to move it to a temporary table
> for use in a subsequent query (since nested sub-queries are not
> supported).  But the documentation on TBatchMove specifies that doth
> source and destination must be tables.

> Does anyone know of a way around this problem?

I don't think so use tquery as source and ttable as destination, it
works fine for me, just make sure the query is still open prior to
batch move.

Scott



Wed, 18 Jun 1902 08:00:00 GMT  
 Batchmove between query and table

insert into Table_Dest
(Field1, field2, ...,Fieldn)
select
Field1, field2,...,Fieldn
From Table_Origin
Where ...

is possible to transfert selected enreg from Table_Origin( or Query because
it's a select) to Table_Dest
take attention that any error cancel all
Select * is possible if only 1 field
May be an other syntax but..


Quote:

> > Does anyone know of a way to perform the equivalent of a batchmove
> > between a TQuery and a TTable?

> > I have a process for which the data is best selected using SQL, but
once
> > I have selected the record set, I need to move it to a temporary table
> > for use in a subsequent query (since nested sub-queries are not
> > supported).  But the documentation on TBatchMove specifies that doth
> > source and destination must be tables.

> > Does anyone know of a way around this problem?

> I don't think so use tquery as source and ttable as destination, it
> works fine for me, just make sure the query is still open prior to
> batch move.

> Scott



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Query and Batchmove

2. batchmove - sql query to dbf

3. BatchMove and Dbase tables

4. Problem with BatchMove to an Access Table

5. BatchMove KeyViolTable not creating a table - Why?

6. BatchMove and Table.Modified problems

7. Batchmove (batCopy-table) problem !!!

8. Executing a Query on a Table or Query

9. joining a paradox table to an MSAccess table in an SQL query

10. Database table and query into html table

11. Problems fixed with tables/queries

12. Querying in-memory tables

 

 
Powered by phpBB® Forum Software