473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

query to include an entry only once (omit second occurance)

emandel
65
I have a query which is giving me [first name] [last name] and [e-mail]
This is a Union Query and therefor some records are repeated. In addition some households have differant members wusing the same e-mail. How do I make a second query to show me all of the data from the first query but to OMIT the second entry when an e-mail is repeated?
Thak you!
Nov 7 '07 #1
3 2076
MikeTheBike
639 Expert 512MB
I have a query which is giving me [first name] [last name] and [e-mail]
This is a Union Query and therefor some records are repeated. In addition some households have differant members wusing the same e-mail. How do I make a second query to show me all of the data from the first query but to OMIT the second entry when an e-mail is repeated?
Thak you!
Hi
As I understand it, if all the fields selected in the query are IDENTICAL in two or more records of a Union query, then only one record is returned, unless you use the ALL keyword ??

MTB
Nov 7 '07 #2
emandel
65
Hi
As I understand it, if all the fields selected in the query are IDENTICAL in two or more records of a Union query, then only one record is returned, unless you use the ALL keyword ??

MTB
I am interested in it returning only one record even if it's only the e-mail that is identical. I only want to send one e-mail out even if there are 2 unique people listed sharing that e-mail. Thanx
Nov 8 '07 #3
MikeTheBike
639 Expert 512MB
I am interested in it returning only one record even if it's only the e-mail that is identical. I only want to send one e-mail out even if there are 2 unique people listed sharing that e-mail. Thanx
If the email addresses are identical, why are the other fields different, surley an email address applies to one person !!
If not how are you going to decide which record with this addess to return/eliminate?

MTB
Nov 8 '07 #4

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

Similar topics

13
by: aaron | last post by:
I have a question about (i think) joining. If I have a table in a database that has this info: key - name - favorite 1 - john - 2 2 - judy - 3 3 - joe - 1 the favorite icecream...
2
by: Mike Poe | last post by:
Hi, Consider the following: <? $username = "foo"; $password = "bar"; $host = "db";
4
by: Spark | last post by:
Hi, Situation: Need a query to return number of ticket records by month of open in a log table where the ticket open record is older than 24 hours then the ticket pending or ticket closed...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
1
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some...
2
by: news.uow.edu.au | last post by:
Any suggestions for the following would be gratefully accepted. I have a table which includes name and interest fields e.g., contact interest smith carpentry jones gardening...
7
by: Scott Frankel | last post by:
Still too new to SQL to have run across this yet ... How does one return the latest row from a table, given multiple entries of varying data? i.e.: given a table that looks like this: color...
2
by: redcuda69 | last post by:
Access 2000 on windows XP Below are examples of 2 tables I am trying to run the following query on. In the query, I only want one line item for each PartNumber. If the PartNumber has a...
5
by: Just_a_fan | last post by:
I tried to put an "on error" statement in a routine and got the message that I cannot user "on error" and a lamda or query expression in the same routine. Help does not list anything useful for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.