Khác biệt giữa các bản “Translations:Nhập tệp CSV vào Kiu ERP/47/en”
Từ Kiu Wiki
(Tạo trang mới với nội dung “'''company_3,Boum,True''' To create the CSV file for persons, linked to companies, we will use the following SQL command in PSQL: '''> copy (select 'pers…”) |
|||
Dòng 1: | Dòng 1: | ||
'''company_3,Boum,True''' | '''company_3,Boum,True''' | ||
+ | |||
To create the CSV file for persons, linked to companies, we will use the following SQL command in PSQL: | To create the CSV file for persons, linked to companies, we will use the following SQL command in PSQL: | ||
+ | |||
'''> copy (select 'person_'||id as "External ID",person_name as "Name",'False' as "Is a Company",'company_'||company_id as "Related Company/External ID" from persons) TO '/tmp/person.csv' with CSV''' | '''> copy (select 'person_'||id as "External ID",person_name as "Name",'False' as "Is a Company",'company_'||company_id as "Related Company/External ID" from persons) TO '/tmp/person.csv' with CSV''' | ||
+ | |||
It will produce the following CSV file: | It will produce the following CSV file: | ||
+ | |||
'''ID bên ngoài, tên, là một Công ty, Công ty liên quan / ID ngoài''' | '''ID bên ngoài, tên, là một Công ty, Công ty liên quan / ID ngoài''' |
Phiên bản lúc 17:32, ngày 18 tháng 12 năm 2017
company_3,Boum,True
To create the CSV file for persons, linked to companies, we will use the following SQL command in PSQL:
> copy (select 'person_'||id as "External ID",person_name as "Name",'False' as "Is a Company",'company_'||company_id as "Related Company/External ID" from persons) TO '/tmp/person.csv' with CSV
It will produce the following CSV file:
ID bên ngoài, tên, là một Công ty, Công ty liên quan / ID ngoài