Re: Join syntax?



On Mon, 29 Aug 2005 13:56:36 -0700, DonSQL2222 wrote:

>I'm not sure if this is a join problem or even if it can be done.
>
>The english part of the query will be requesting cagegoires="Cat2"
>and return the matching records in table1, plus return all the other
>categories that belong to the set in table 2.
>
>should return two records..
>1 document1 Cat1 Cat2 Cat3
>2 document2 Cat1 Cat2
(snip)

Hi DonSQL2222,

To get the basic information, but not in the format you specified above:

SELECT t1.ID, t1.DOC, t2.Category
FROM table1 AS t1
INNER JOIN table2 AS t2
ON t2.ID = t1.ID
ORDER BY t1.ID, t2.Category

Modifying the format to your desired form should be done at the front
end. Presentation is not a task for the database in a tiered
architecture.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
.



Relevant Pages

  • RE: Trying to save a many to many relationship in Access
    ... When you have a many to many relationship means your Table1 can have many ... matching records in Table2... ... Keys from both tables (which are your primary keys in both the tables your ...
    (microsoft.public.access.gettingstarted)
  • Re: Join Problem
    ... You are a lot more patient than I. ... I would put the ON clause in the same ... FROM ((TABLE1 ... I'm trying to get all the records in table1 and all matching records in ...
    (microsoft.public.access.queries)
  • Re: Join Problem
    ... The query takes about 30 to 45 seconds now. ... I would put the ON clause in the same order ... FROM ((TABLE1 ... I'm trying to get all the records in table1 and all matching records in ...
    (microsoft.public.access.queries)
  • Re: Find similar records across two tables
    ... An inner join based on a non-equi joining clause might work for you. ... If you wanted to set this up as a delete query, ... > addresses that are to be purged from Table1. ... > searches on Table 2 using a wildcard to find matching records in Table1. ...
    (microsoft.public.access.queries)