Append Queries

G

Guest

Hi,

I have a databases that have linked tables to dbase III files; I need to
write an append query that will do something along the lines of
IF ((create_date & create_time) or (modify_date & modify_time))>[the most
recent addition to the database]; the records that meet this criteria will
then be added to a table in the database.
HELP!!
Thanks,
Chris
 
G

Guest

you need first to make a copy of the table qith an alias
then go to querys, and append the query ,( input the criteria)
then you will have a new table with the criteria you specified
 
J

John Vinson

Hi,

I have a databases that have linked tables to dbase III files; I need to
write an append query that will do something along the lines of
IF ((create_date & create_time) or (modify_date & modify_time))>[the most
recent addition to the database]; the records that meet this criteria will
then be added to a table in the database.
HELP!!
Thanks,
Chris

You'll need to use Criteria in the APpend query, on your date and time
fields. You will need to have the date and time of the most recent
addition stored somewhere; Access doesn't keep track of that for you!
I haven't worked much with dBase - does Access treat the dBase date
and time fields as true Date/Time values, or as text strings? Either
way, try creating a Query based on the linked table with a calculated
field:

CreateDateTime: CDate([create_date]) + CDate([create_time])

and similarly for the modify date and time. Put a criterion on each of
these
[MostRecentAdditionDate]

where that's the name of the field where you have that information
stored. If you're doing it manually, use
#1/07/2004 11:32am#

if that's when you last extracted the data. Put the two criteria on
SEPARATE lines of the query grid so it will select the record if
either date is newer.

Note that an Append query will JUST append new or changed records - if
a record has changed, you'll get two copies, the old one and the new
one. An Update query would be needed to do otherwise.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top