Solved

Playing with databases...

Posted on 1998-06-30
1
160 Views
Last Modified: 2010-05-03
Is there any way to add one database (dBaseIV) to another so that there isn't any dublicates in data?
Here's example:
I've got one database where is datas from 1/1/1998 to 15/6/1998 and another where is datas from 1/6/1998 to 30/6/1998. I wanna kind of update this first database so that there is all datas from 1/1/1998 to 30/6/1998.

Could there be any SQL-clause to do this? If there is could you give me example?

Thanks for advance.
0
Comment
Question by:majala
1 Comment
 
LVL 5

Accepted Solution

by:
dirtdart earned 50 total points
ID: 1464589
When I've had to do this, I've used the following method:

Dim srcRs As Recordset
Dim destRs As Recordset
Dim SQL As String

SQL = "SELECT * FROM MyTable WHERE MyField = '" & srcRs("MyField") & "'"

set destRs = db.OpenRecordset(SQL)
destRs.MoveLast
destRs.MoveFirst
If destRs.Recordcount <> 0
    'Move record from one table to the other because it doesn't exist
End If
destRs.Close

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question