Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ms access query - find unmatched

Posted on 2014-01-20
6
Medium Priority
?
274 Views
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.
tks
0
Comment
Question by:jsgould
[X]
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
6 Comments
 
LVL 143

Accepted Solution

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

part 2: non-matched entries - you can do with the wizard:
http://office.microsoft.com/en-us/access-help/compare-two-tables-and-find-records-without-matches-HA010205132.aspx#BM2
0
 

Author Comment

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

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39795338
as posted above, use the format function as needed...
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:jsgould
ID: 39795360
I mean where do I put the functions in the access query ? i.e. Field name, table,criteria, etc..
tks
0
 
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
0
 

Author Closing Comment

by:jsgould
ID: 39807459
Thank You.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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