Tuples with similar attributes

  • Thread starter Thread starter Ann Glover
  • Start date Start date
A

Ann Glover

I am having trouble deriving pairs of tuples that have an
identical attribute.

(eg Sarah and Jo both have sold 3 computers, i would like
to display "sarah" in one column and "jo" in another.)

Any suggestions.
 
Tough to suggest a solution without knowing your table layout. It might
look like:

SELECT P1.Name, P2.Name
FROM Persons As P1, Persons As P2
WHERE P1.PersonID IN (SELECT ... query to determine persons who sold 3
computers)
AND P2.PersonID IN (SELECT ... same subquery)
AND P1.PersonID <> P2.PersonID

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
 
A tuple is used to define a slice of data from a cube; it is composed of an
ordered collection of one member from one or more dimensions. A tuple is
used to identify specific sections of multidimensional data from a cube; a
tuple composed of one member from each dimension in a cube completely
describes a cell value. Put another way, a tuple is a vector of members;
think of a tuple as one or more records in the underlying database whose
value in these columns falls under these categories. A series of diagrams
presents different types of tuples.

Do you want to use your tuple as described above, as in a cube, or in some
other way?

What is the structure of the data tables that holds the fact that Sarah and
Jo both sold 3 computers?

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Thanks John!
-----Original Message-----
Tough to suggest a solution without knowing your table layout. It might
look like:

SELECT P1.Name, P2.Name
FROM Persons As P1, Persons As P2
WHERE P1.PersonID IN (SELECT ... query to determine persons who sold 3
computers)
AND P2.PersonID IN (SELECT ... same subquery)
AND P1.PersonID <> P2.PersonID

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR? pg=personal&fr_id=1090&px=1434411



.
 
Back
Top