# Chart of Accounts - Parent Account Import

**URL:** <https://www.dolibarr.org/forum/t/chart-of-accounts-parent-account-import/18435>\
**Category:** Using my Dolibarr\
**Created:** [January 27, 2020, 4:18am UTC](https://www.dolibarr.org/forum/t/chart-of-accounts-parent-account-import/18435 "2020-01-27T04:18:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rootlookup](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rootlookup](https://www.dolibarr.org/forum/u/rootlookup)\
**Post date:** [January 27, 2020, 4:18am UTC](https://www.dolibarr.org/forum/t/chart-of-accounts-parent-account-import/18435/1 "2020-01-27T04:18:00Z")

</div>

Dolibarr 10.6  
IIS 8.5  
PHP 7.2.2  
Postgres 10.3

These screenshots are after a .csv import.   
Notice the “Parent Account” column.

In the import, I entered the Account Number of the Parent Account. However, it is expecting a rowid (that does not exist yet). How do I handle this?

* * *

I know I can enter all parent accounts manually, then import all subaccounts via .csv. Is there a way to import “all” of the chart of accounts, at once, in one big .csv file?

ScreenShot 1

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/b/ba8dcf28f6a783cd20b3a8df5ba9a0fb859eab89.png)

ScreenShot 2

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/1/17679e10aa78807030b1c7eb5495a5981ed85b21.png)

---

<div class="post-metadata">

**Author:** ![shoutnet](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/shoutnet/32/434_2.png) [@shoutnet](https://www.dolibarr.org/forum/u/shoutnet)\
**Post date:** [July 12, 2020, 4:07pm UTC](https://www.dolibarr.org/forum/t/chart-of-accounts-parent-account-import/18435/2 "2020-07-12T16:07:22Z")

</div>

I have the same problem. But it seems there is no solution unless you edit in the database

---

<div class="post-metadata">

**Author:** ![shoutnet](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/shoutnet/32/434_2.png) [@shoutnet](https://www.dolibarr.org/forum/u/shoutnet)\
**Post date:** [July 12, 2020, 4:15pm UTC](https://www.dolibarr.org/forum/t/chart-of-accounts-parent-account-import/18435/3 "2020-07-12T16:15:03Z")

</div>

I find a solution to do that,

firstly, follow your method to import data

then duplicate the table llx\_accounting\_account as table\_llx\_accounting\_account\_1

Execute the following command:

UPDATE llx\_accounting\_account INNER JOIN llx\_accounting\_account\_1 ON llx\_accounting\_account.account\_parent = llx\_accounting\_account\_1.account\_number set llx\_accounting\_account.account\_parent = llx\_accounting\_account\_1.rowid

After that delete the table llx\_accounting\_account\_1
