Board index » delphi » Move data from One Access Table(97) to Another (2K)

Move data from One Access Table(97) to Another (2K)

I have a similar problem.  I am trying to simulate a batchmove (using mode =
batAppendUpdate) and while I know enough SQL to use "INSERT INTO" to add records
from my source table to my destination table, I don't know how to UPDATE records
that are already in the destination table.  Does anyone have any advice on how I can
do this?

Ed

Quote
Brian Bushay TeamB wrote:
> >Anyone know how to do a batchmove in ADO?

> There is no batch move but you can do an Insert Query or an Insert Into query in
> most SQL dialects

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

--
===========================================
 Ed Brainerd
 Director of Computing Services
 The School of Audiology
  and Speech-Language Pathology
 The University of Memphis
 Memphis, Tennessee 38105
 phone: (901) 678-5860
 e-mail: lbrai...@memphis.edu
===========================================
 

Re:Move data from One Access Table(97) to Another (2K)


Quote
>I don't know how to UPDATE records
>that are already in the destination table.  Does anyone have any advice on how I can
>do this?

Are you saying you don't know how to write an update query?  What database are
you using?

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Move data from One Access Table(97) to Another (2K)


I'm using Access.  My source table is being used to update my destination table.  I
basically need to know the easiest way (or any way) to both INSERT records that aren't
already in my destination table and UPDATE records that are already in the table.  I do
know how to write basic UPDATE queries, but I don't know SQL well enough to solve this
problem.  With Paradox and BDE, I had simply used TBatchMove with mode =
batAppendUpdate.  I appreciate your help.

Ed

Quote
Brian Bushay TeamB wrote:
> >I don't know how to UPDATE records
> >that are already in the destination table.  Does anyone have any advice on how I can
> >do this?

> Are you saying you don't know how to write an update query?  What database are
> you using?

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

--
===========================================
 Ed Brainerd
 Director of Computing Services
 The School of Audiology
  and Speech-Language Pathology
 The University of Memphis
 Memphis, Tennessee 38105
 phone: (901) 678-5860
 e-mail: lbrai...@memphis.edu
===========================================

Re:Move data from One Access Table(97) to Another (2K)


Quote
>My source table is being used to update my destination table.  I
>basically need to know the easiest way (or any way) to both INSERT records that aren't
>already in my destination table and UPDATE records that are already in the table.  I do
>know how to write basic UPDATE queries, but I don't know SQL well enough to solve this
>problem.

You are going to have to use two queries to do this.  One Update and one Insert.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Move data from One Access Table(97) to Another (2K)


Thanks, Brian.  I'll try that approach.

Ed

Quote
Brian Bushay TeamB wrote:
> >My source table is being used to update my destination table.  I
> >basically need to know the easiest way (or any way) to both INSERT records that aren't
> >already in my destination table and UPDATE records that are already in the table.  I do
> >know how to write basic UPDATE queries, but I don't know SQL well enough to solve this
> >problem.

> You are going to have to use two queries to do this.  One Update and one Insert.

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

===========================================
 Ed Brainerd
 Director of Computing Services
 The School of Audiology
  and Speech-Language Pathology
 The University of Memphis
 Memphis, Tennessee 38105
 phone: (901) 678-5860
 e-mail: lbrai...@memphis.edu
===========================================

Other Threads