[GNC] Export-import GnuCash historical prices

David H hellvee at gmail.com
Tue Nov 25 15:06:23 EST 2025


David C,

It might be easier for you to export your txns since the last backup you
have available with intact price history.  Then open the backup in Gnucash
and import the txns to that and save it as your normal gnucash data file ?

Cheers David H.

On Wed, 26 Nov 2025 at 05:15, David Carlson <david.carlson.417 at gmail.com>
wrote:

> I have no idea what to do with that paragraph
>
>
> On Tue, Nov 25, 2025 at 1:01 PM sunfish62 at yahoo.com <sunfish62 at yahoo.com>
> wrote:
>
> > I don't know if this will help, but try it and see what you get. I
> believe
> > it also gives the number of shares owned, but it's been a while.
> >
> > SELECT c.mnemonic, c.guid,
> >   ROUND(SUM((s.quantity_num*1.0/s.quantity_denom)),
> > LENGTH(REPLACE(c.fraction, '1', ''))),
> >   MIN(t.post_date), MAX(t.post_date)
> >   FROM accounts as a, commodities as c, splits as s, transactions as t
> >   WHERE (a.account_type='MUTUAL' OR a.account_type='STOCK')
> >   AND a.guid=s.account_guid AND s.tx_guid=t.guid AND
> > a.commodity_guid=c.guid
> >   GROUP BY c.mnemonic
> >
> > ⁣David T.​
> >
> > On Nov 25, 2025, 7:48 PM, at 7:48 PM, David Carlson <
> > david.carlson.417 at gmail.com> wrote:
> > >I recently lost most of the historical prices out of my main data file.
> > > I
> > >have backups with the old price data intact.  I want to export them
> > >from a
> > >backup and import them into my current file.  I have saved the backup
> > >in
> > >mysql format and found the price table but it is using guid's instead
> > >of
> > >currency names and commodity names.  I don't know how to create a
> > >proper
> > >csv file to import the prices into my current data file.  Has anyone
> > >done
> > >something similar in the past?
> > >
> > >--
> > >David Carlson
> > >_______________________________________________
> > >gnucash-user mailing list
> > >gnucash-user at gnucash.org
> > >To update your subscription preferences or to unsubscribe:
> > >https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > >-----
> > >Please remember to CC this list on all your replies.
> > >You can do this by using Reply-To-List or Reply-All.
> >
> >
>
> --
> David Carlson
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list