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
I will have do something like this soon. Look at ltree. I don't have much
experience with it yet, but it seems that this ext addresses those issues.
Regards
A1 präsentiert BlackBerry® von Vodafone
-Original Message-
From: Samuel Gendler
Sender: pgsql-sql-owner@postgresql.orgDate: Thu, 11
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
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 this for about a week now and need to figure out a solution. Hec