On Thu, Aug 11, 2011 at 12:48, Edward W. Rouse wrote:
> How about SELECT cat_name, sum(amount) AS "amount" FROM category,
> trans_details WHERE category_cat_id in (select cat_id from category where
> lineage ~ ‘^1’)
>
> ** **
>
> Where the in clause is basically, the cat_id where lineage start
How about SELECT cat_name, sum(amount) AS "amount" FROM category,
trans_details WHERE category_cat_id in (select cat_id from category where
lineage ~ '^1')
Where the in clause is basically, the cat_id where lineage starts with, and
then the lineage you want. 1, 1-2, whatever the lineage is. Not
: Thu, 11 Aug 2011 09:24:41
To: Don Parris
Cc:
Subject: Re: [SQL] Stuck Up In My Own Category Tree
On Thu, Aug 11, 2011 at 8:39 AM, Don Parris wrote:
> Hi all,
>
> Note: I'm happy to read howtos, tutorials, archived messages - I just
> haven't found anything that addresses t
On Thu, Aug 11, 2011 at 8:39 AM, Don Parris wrote:
> Hi all,
>
> Note: I'm happy to read howtos, tutorials, archived messages - I just
> haven't found anything that addresses this yet. I found a related topic on
> the novice list, but my post got no response there. I've been struggling
> with t