By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

match data in two columns

P: 3
This must me easy. I want my query to return results when the data in two text fields match. i.e. when the Manager and Supervisor are the same person. Can you help?
Jan 4 '07 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,186
Too little information for a reliable reply here Noelene (Please refer to POSTING GUIDELINES: Please read carefully before posting to a forum).
However, if you are talking about selecting records from a simple dataset (Table or QueryDef) where two of the fields in that dataset have the same data, then you could do something like :
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM [YourTable]
  3. WHERE [Manager]=[Supervisor]
Jan 4 '07 #2

ADezii
Expert 5K+
P: 8,597
This must me easy. I want my query to return results when the data in two text fields match. i.e. when the Manager and Supervisor are the same person. Can you help?
You can also accomplish this from the Query Design Grid. Assuming that the Manager and Supervisor Fields are in a Table called tblCompany:
1) Create a New Query.
2) Add tblCompany.
3) Add tblCompany again, it will display as tblCompany_1.
4) Create a Join between the Manager Field in tblCompany and the Supervisor Field in tblCompany_1 (called a Self Join).
5) Drop any Fields into the Query Grid.
6) Run the Query, only Records in which the Manager and Supervisor Fields have the same value will be displayed.
Jan 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.