Re: search fields in query combinations



On Thu, 1 Jun 2006 18:06:01 -0700, Immyz
<Immyz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Im sorry im very new o this would it be possible to guide me through how to
do this

Not easily, since I'm not certain what you've changed between your
database and your question. If your table fields are in fact named as
you posted them ([part no], [attribute name], and [attribute]), then
you can simply copy and paste the SQL string

SELECT mytable.[Part No], mytable.[Attribute] AS [Colour],
mytable1.[Attribute] AS [Size]
FROM mytable INNER JOIN mytable AS mytable1
ON mytable1.[Part No] = mytable.[Part No]
WHERE mytable.[Attribute Name] = "Colour"
AND mytable1.[Attribute Name] = "Size";

into the SQL view of a new Query; create a new query, don't select any
tables, select SQL from the View menu item, and paste this in place of
the word SELECT; that Access puts in automatically.

Edit all occurances of mytable to the actual name of your table (which
of course I do not know).

Alternatively, create a new query by adding your table to the query
design window, twice. Select the Part No field from the first
instance, and the other two fields from both instances. Drag the Part
No field from the first instance to the Part No field on the second.
Put a criterion "Colour" under the first [Attribute Name] field, and
"Size" under the second.

John W. Vinson[MVP]
.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Populating a list -- learning Access
    ... It is kinda funny -- I started using databases in the early 80's with dBase and, for years, never knew that I knew SQL! ... If you are on a form or report, the most important property is the NAME, because that is how you refer to it in code. ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)
  • Re: Populating a list -- table structure?
    ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... I have one report complete, ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)