ms access query - find unmatched

Posted on 2014-01-20
Last Modified: 2014-01-24
I have 2 linked .dbf tables that I want to check for unmatched entries on 2 fields. Field#1 is a text field in both tables. field#2 is a text field in table#1 which contains a date in the format yyyymmdd. field#2 is a date field in table#2 in the format mm/dd/yyyy.

I need a query that will detect an unmatched entry based on the 2 fields. Don't know how to specify/convert field#2 in table#1 so that I don't get a "type mismatch" error on the 2 date fields.

Source tables cannot be changed.
Question by:jsgould
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 total points
ID: 39795175
part 1: converting text vs date values:
Cdate(field2)   for the text field
Format( field, "mm/dd/yyyy")  for the date field

part 2: non-matched entries - you can do with the wizard:

Author Comment

ID: 39795320
how do I construct the query so that the dates are in the correct form when running?
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39795338
as posted above, use the format function as needed...
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.


Author Comment

ID: 39795360
I mean where do I put the functions in the access query ? i.e. Field name, table,criteria, etc..
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39796361
are you working in a SQL Query Window, or pure sql?
the table names remain as they are, instead of the field name, you put the expression having the function(fieldname) instead of just fieldname

Author Closing Comment

ID: 39807459
Thank You.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

635 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