Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two tables in to one from pervasive.sql to ms.sql

Status
Not open for further replies.

jondel81

Technical User
Jul 27, 2003
71
US
I am trying to create a DTS that will copy the two tables in pervasive into one table in sql. When the DTS runs, it needs to only copy the lines hasn't copied before. The first table is the "header" and the second is "lines". Would like to combine (ticket numbers are the link) both tables and have select fields from each table in the new table. Not really sure were to start, or if a DTS would work.
The pervasive.sql is access by ODBC
Here are the pervasive tables:
"header": "ticketnumber", "customernumber", "ticketdate", "ticketamount", "salesid", "store number"
"line": "ticketnumber", "itemnumber", "qtysold",
Here is the one sql combined table:
"orders": "ticketnumber", "customernumber", "ticketdate", "ticketamount", "salesid", "storenumber", "itemnumber", "stysold".

Any help would be apprentice. The query needs to be an append query that only appends what is not in the orders table. There is well over 40,000,000 lines just in the "line" table.

------
 
My thoughts on this project:
Two querys.
First query, get a list of things not in orders by compared orders and ticket header.
Second query would use the results of the first query and pull both ticket header and ticket line to the orders.

Now how do I make the second query pull the results of the first query?

------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top