Re: Join syntax?
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 02 Sep 2005 22:19:47 +0200
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)
.
- Prev by Date: YTD Last Year again
- Next by Date: Re: YTD Last Year again
- Previous by thread: YTD Last Year again
- Next by thread: Re: How to call talbe/SP from Linked server with out database and user
- Index(es):
Relevant Pages
|
|