Re: Query in a gnucash table
Date: Thu, 19 Oct 2017 13:03:55 +0200
Message-ID: <2112283.NG923GbCHz_at_PointedEars.de>
Joseph Hesse wrote:
> Each of the four parts above are in separate rows. If a row has name
> "gas" then in order to find "ford" you have to look at the parent_guid
> in that row, locate the row where guid matches parent_guid and look at
> that name, which should be "ford". This process is repeated until all
> the parent items of "gas" are found.
>
> My questions is the following. I would like to add an additional column
> to the table called full_name which gives all of the items in the
> hierarchy above the value in the name column. Referring to the above
> example, if the row contains "gas", the full_name column should be
> "expenses:auto:ford:gas".
Bad idea as that would violate normalization form 1.
> Is there a query that can accomplish what I want?
Yes.
> I'm sure I could use some scripting language like PHP to accomplish what
> I want.
That would be most efficient, and appears to be the only way, but it is off-topic here.
-- PointedEars Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn> Twitter: _at_PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.Received on Thu Oct 19 2017 - 13:03:55 CEST