0

hi all,

I am comparing 2 data:

Data 1 has 26 colums that have the information of comapanies and detail of informations.
Data 2 has 18 coulums that have the information of peoples.

Form the name of people (data 2) I want to make the new data which have all the informations.

for example with A people (NguoiA).I hope i have the informations below:

Nguoi A:
congty sp nhom20 nhom21 nhom22 nhom25 nhom26
cong ty B A 1,610.00 1,610.00 920,000.00 149,937.00 16.3
cong ty B B 400 400 212,000.00 -2,000.00 -0.94
cong ty B C 432 864 245,376.00 -2,851.00 -1.16
cong ty B D 14,800.00 14,800.00 6,304,800.00 -164,280.00 -2.61
Total 17,242 17,674 7,682,176 -19,194 12

cong ty A E 1,560.00 3,120.00 463,320.00 -26,208.00 -5.66
cong ty A F 3,000.00 3 321,000.00 33,000.00 10.28
Total 4,560 3,123 784,320 6,792 5

bang keo G 200 10 45,000.00 25,400.00 56.44
total 200 10 45,000 25,400 56

Thank you very much for helping.

Edited by biojet

Attachments
thong ke																									
????: 2014?6?20? ??11?47?																									
?????																									
nhom cong nghiep																									
Nhom 1	Nhom2	nhom3	nhom4	nhom5	nhom6	nhom7	nhom8	nhom9	congty	nhom11	nhom12	nhom13	nhom14	nhom15	nhom16	nhom17	nhom18	sp	nhom20	nhom21	nhom22	nhom23	nhom24	nhom25	nhom26
11203	OK	1D1000	cong nghiep	01990020	GD	ZZZ	dai ly 1	1287310001	cong ty B	20	 keo	14M	KV	-	-	1131320001	-	A	1,610.00	1,610.00	920,000.00	0	920,000.00	149,937.00	16.3
11204	OK	1D1000	cong nghiep	01990021	GD	ZZZ	dai ly 1	1287310002	cong ty B	20	 keo	14M	KV	-	-	1131320002	-	B	400	400	212,000.00	0	212,000.00	-2,000.00	-0.94
11205	OK	1D1000	cong nghiep	01990022	GD	ZZZ	dai ly 1	1287310003	cong ty B	20	 keo	14M	KV	-	-	1131320003	-	C	432	864	245,376.00	0	245,376.00	-2,851.00	-1.16
11206	OK	1D1000	cong nghiep	01990023	GD	ZZZ	dai ly 1	1287310004	cong ty B	20	 keo	14M	KV	-	-	1131320004	-	D	14,800.00	14,800.00	6,304,800.00	0	6,304,800.00	-164,280.00	-2.61
11207	OK	1D1000	cong nghiep	01990024	GD	144	dai ly 2	1287310005	cong ty A	20	 keo	12D	sinh hoat	-	-	1131320005	-	E	1,560.00	3,120.00	463,320.00	0	463,320.00	-26,208.00	-5.66
11208	OK	1D1000	cong nghiep	01990025	GD	144	dai ly 2	1287310006	cong ty A	20	 keo	14J	nuoc 2	-	-	1131320006	-	F	3,000.00	3	321,000.00	0	321,000.00	33,000.00	10.28
11209	OK	1D1000	cong nghiep	01990026	GD	AAA	dai ly 	1287310007	bang keo	20	 keo	13I	nuoc 1	-	-	1131320007	-	G	200	10	45,000.00	0	45,000.00	25,400.00	56.44
thong ke danh sach																
																	
																	
100	nguoiA		200	nguoiB		300	nguoiC		400	nguoiD		500	nguoiF		600	nguoiG	
	cong ty A			cong ty C		1289	cong ty G	541 	1,266 	cong ty H		157 	cong ty J		1,457 	cong ty K	
12333333	??	222 	12456	Kumi	22 	1290	???	12 	1,267 	??	2 	158 	??	8 	1,458 	??	77 
12333334	cong ty B	27 	12457	cong ty F	2 	1291	???	2 	1,268 	??	1 	159 	??	77 	1,459 	??	44 
12333335	bang keo	6,568 	12458	???	235 	1292	???	12 	1,269 	???	19 	160 	??	33 	1,460 	??	55 
		6,817 			259 			567 			22 			118 			176 
		1,136 			43 			95 			4 			20 			29 
	????			????
3
Contributors
2
Replies
15
Views
3 Years
Discussion Span
Last Post by Taywin
0

If you are looking for code, then I won't give you. If you are asking for idea about how to deal with it, then here it is.

First, you need to read the data in from both files. Create another variable for saving new data. Then iterate through both data and matched the name with the company. Save the matched data in the variable you defined earlier. Once you have gone through, save the collected data in a new file.

The challenge will be parsing the data. Both files have different format, so you need to be careful when you parse data. The people data can be parsed line-by-line; whereas, the company data seems to be column-by-column. That's all.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.