473,406 Members | 2,894 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,406 software developers and data experts.

Q: Query property 'Unique records'

I do not quite understand this property. Everything is seems clear to
me, when I read the corresponding help text.

But in practice I have a question: Why are there 3 identical records
in the following query (with property 'Unique records' = Yes)?

SELECT DISTINCTROW tblCustomer.[Customer ID], tblCustomer.[Company
Name], tblCustomer.[Locatiion Code], tblOrders.[Customer ID],
tblOrders.[Order ID], tblOrders.Artikel FROM tblCustomer INNER JOIN
tblOrders ON tblCustomer.[Customer ID] = tblOrders.[Customer ID];

Can you help me? Thanks.

Beat Scheidiger
Nov 12 '05 #1
3 8979
Beat Scheidiger previously wrote:
I do not quite understand this property. Everything is seems clear to
me, when I read the corresponding help text.

But in practice I have a question: Why are there 3 identical records
in the following query (with property 'Unique records' = Yes)?

SELECT DISTINCTROW tblCustomer.[Customer ID], tblCustomer.[Company
Name], tblCustomer.[Locatiion Code], tblOrders.[Customer ID],
tblOrders.[Order ID], tblOrders.Artikel FROM tblCustomer INNER JOIN
tblOrders ON tblCustomer.[Customer ID] = tblOrders.[Customer ID];

Can you help me? Thanks.

Beat Scheidiger

Online Help is truly perplexing for Distinctrow,I think.

I prefer this definition:

'DISTINCTROW requests that Access return only rows in which the
concatenation of the primary keys from all tables supplying output columns
is unique.'

So it's looking at the values produced by concatenating primary keys and
is nothing to do with any other data. And the second part of the
definition is crucial. It's looking at such concatenations for all tables
contributing to the output.

So in your case the query behaves as if you had included the primary key
in your output whether you specified it or not.

This leads to the conclusion that Distinctrow only has any effect if one
or more tables in your query do not contribute fields to the output.

If you want to explain what you are trying to show in your query I dare
say someone here will help.

Regards

Peter Russell


Nov 12 '05 #2
"Beat Scheidiger" <be*************@swisscom.com> wrote in message
news:88**************************@posting.google.c om...
I do not quite understand this property. Everything is seems clear to
me, when I read the corresponding help text.

But in practice I have a question: Why are there 3 identical records
in the following query (with property 'Unique records' = Yes)?

SELECT DISTINCTROW tblCustomer.[Customer ID], tblCustomer.[Company
Name], tblCustomer.[Locatiion Code], tblOrders.[Customer ID],
tblOrders.[Order ID], tblOrders.Artikel FROM tblCustomer INNER JOIN
tblOrders ON tblCustomer.[Customer ID] = tblOrders.[Customer ID];


Unique Records means that the same "Record" will not be repeated in the
output. It doesn't mean you won't see rows with the same values. For that
you use Unique Values. In SQL the difference is that one uses DISTINCT
while the other uses DISTINCTROW.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #3
DISTINCTROW will remove any records that are duplicates in ALL fields in the
underlying table(s), not just the fields being output by the query. DISTINCT
will remove duplicates in the fields being output by the query. In the query
design grid, if you right click the background where the tables are and
choose Properties, these 2 items correspond with "Unique Records" and
"Unique Values" respectively.

--
Wayne Morgan
"Beat Scheidiger" <be*************@swisscom.com> wrote in message
news:88**************************@posting.google.c om...
I do not quite understand this property. Everything is seems clear to
me, when I read the corresponding help text.

But in practice I have a question: Why are there 3 identical records
in the following query (with property 'Unique records' = Yes)?

SELECT DISTINCTROW tblCustomer.[Customer ID], tblCustomer.[Company
Name], tblCustomer.[Locatiion Code], tblOrders.[Customer ID],
tblOrders.[Order ID], tblOrders.Artikel FROM tblCustomer INNER JOIN
tblOrders ON tblCustomer.[Customer ID] = tblOrders.[Customer ID];

Can you help me? Thanks.

Beat Scheidiger

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Willem | last post by:
Hi there, I'm sort of new with doing much record manipulation with queries. Up till now I've been programming VBA and doing record looping to get my results. This works fine but tends to get...
1
by: Guido | last post by:
How to cope with query output which provides all possible values based on a one to many relationship between two tables. I'm only interested in one answer per primary key in the 'one' table. I've...
4
by: suffrinmick | last post by:
Hi everyone! I (Along with the help of some of you guys!) have managed to get a query working which takes multiple values (types of organisation) from a list box. The query returns a list of...
1
by: strauss.sean | last post by:
To all: Hi! I am trying to use an append queries on a table where the key field is numeric, formatted as 00-00-000. The query collects the information corectly, and there are no records...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
3
by: turtle | last post by:
I have Two tables (Table1 and Table2). Both tables have a common field called part number. Table 1 contains an extra field that i would like to update table 2 to match if the part number matches....
2
by: Jimmy Stewart | last post by:
Ok, I'm trying to write a query that is starting to wear me down. What I'm trying to do is create a year end report that gets sent to all of my customers who meet two criteria. One they are...
3
by: shorti | last post by:
db2 v 8.2 on AIX 5.3 I will try to explain as brief as I can what it is I need. I am building a function that will be called multiple times where I will need to return x amount of records each...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.