Solved

Playing with databases...

Posted on 1998-06-30
1
162 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 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