Difference between revisions of "Gnucash mysql tables"

From thelinuxwiki
Jump to: navigation, search
(splits)
(entries)
Line 11: Line 11:
 
== entries ==
 
== entries ==
  
appears to hold invoice data
+
appears to hold invoice data
i_price_num appears to be the line item amount with that last 6 decimal digits being cents
+
i_price_num appears to be the line item amount with that last 6 decimal digits being cents
 
+
  
 
== splits ==
 
== splits ==

Revision as of 01:52, 13 April 2014

command line mysql query for a job report

The job number must be in the description of the "split" on every transaction. This puts it in the "splits" gnucash table in the "memo" field. command line query, all fields *

mysql -p database_name -e "select * from database_name.splits;"|grep 000003

command line query, specific fields

mysql -p database_name -e "SELECT memo, quantity_num FROM database_name.splits;" | grep 000003

mysql query, specific fields (memo, quantity_num) for value that contains search string text

mysql> SELECT memo, quantity_num FROM database_name.splits WHERE memo LIKE "%string_text%"

entries

appears to hold invoice data i_price_num appears to be the line item amount with that last 6 decimal digits being cents

splits

This table appears to store all transaction specifics. quantity_num(value_num*quantity_num) contains the price of the split and the 2 LSD (least significant digits) = cents when value denomination = 100 (us dollers?).

guid tx_guid account_guid memo action reconcile_state reconcile_date value_num value_denom quantity_num quantity_denom lot_guid
37cff5d570b63698493bff55377b8a8f 133d27adb0e5aabed81952325dfe711c d84c950932cd706add9487f8aeb34283 n -5945 100 -5945 100 NULL