473,320 Members | 1,732 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,320 software developers and data experts.

Display non-distinct records in sql

Hi,
I have a table with many columns but am concerned with only 2 columns - vin_no and address. I have repeating address and different vin nos. , also repeating address and same vin nos.

I want the following:
Display repeating addresses with different vin nos ONLY. It should not display records that have same vin nos.

How is this possible?

Thanks.
Mar 14 '08 #1
5 1760
MindBender77
234 100+
I want the following:
Display repeating addresses with different vin nos ONLY. It should not display records that have same vin nos.

How is this possible?

Thanks.
You could try a find duplicate query. Some like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT Table1.address, Table1.Vin
  2. FROM Table1
  3. WHERE (((Table1.address) In (SELECT [address] FROM [Table1] As Tmp GROUP BY [address] HAVING Count(*)>1 )))
  4. ORDER BY Table1.address;
  5.  
Hope this Helps,
Bender
Mar 14 '08 #2
This helped, I think!!
Thanks a lot!!!
Mar 17 '08 #3
Hi,
I looked at the result but it looks like it is also displaying the duplicate records, meaning same vin_no with same address appears more than once....can we eliminate duplicates?

also we need to add a condition where sender_id = 'GMCA'

Thanks.
Mar 18 '08 #4
please help...it is not displaying the correct result.
Mar 19 '08 #5
MindBender77
234 100+
Hi,
I looked at the result but it looks like it is also displaying the duplicate records, meaning same vin_no with same address appears more than once....can we eliminate duplicates?

also we need to add a condition where sender_id = 'GMCA'

Thanks.
Try this:
Expand|Select|Wrap|Line Numbers
  1. SELECT Table1.address, Table1.Vin
  2. FROM Table1
  3. WHERE (((Table1.address) In (SELECT [address] FROM [Table1] As Tmp GROUP BY [address] HAVING Count(*)=1 )) AND ((Table1.sender_id)="GMCA"))
  4. ORDER BY Table1.address;
  5.  
Bender
Mar 19 '08 #6

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

Similar topics

8
by: Dan Matthews | last post by:
Hey everybody, I have an 2000 Access database that stores job listings from potential employers for a school. I would like to be able to display the date on a webpage the last time the database...
4
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to...
4
by: SB | last post by:
Hi, I'd like to display some non-ascii characters in a DOS window. I'm getting the characters from Windows Character Map, such as the Spade (U+2660) and a few others. However, I can't get it to...
2
by: Stewart | last post by:
Hi Experts. Please put the code sample below into an html document and take a look at in NN6+. One span should be shown while the other is hidden. Clicking the button should reverse this. ...
4
by: bissatch | last post by:
I am trying to use DIV tags and a class to hide the DIV and the HTML within. I will use JavScript to change it from hidden to visible but that will come later. Below is the code I am using ...
1
by: DavidADEW | last post by:
I am writing an application that displays furniture in a 3D model - in a wire frame. The furniture has straight and rounded edges (doesn't need any shading) - a kind of CAD application but for non...
1
by: Brian D | last post by:
Take a look at this page. http://tempsite.texwipe.com/test/ The code is too long to post here so just look at the source. It works flawlessly in IE, but in Firefox not so much. Here is the...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
5
by: CC | last post by:
Hi: I'm building a hex line editor as a first real Python programming exercise. Yesterday I posted about how to print the hex bytes of a string. There are two decent options: ln =...
1
by: Wingot | last post by:
Hey, I have an application codenamed WingFlex. It has a number of aspects to it, but the prudent parts for this problem are all within the "Client" Schema. The Client schema has three tables...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.