Sample: How to Seperate Duplicate Records? (A2k (9.0.3821) SR-1)
กระทู้เก่าบอร์ด อ.สุภาพ ไชยา

 256   1
URL.หัวข้อ / URL
Sample: How to Seperate Duplicate Records? (A2k (9.0.3821) SR-1)

มีคนถามไว้ที่ 
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=acc&Number=169943&page=0&view=expanded&sb=5&o=0&fpart= 
 
Looking for technique to create a new table with unique records based on  
Code and Desc, remove duplicate records except for just one and put the  
remaining duplicate records in a second table 
 
Input 
 
Code Desc Quan Price Autonumber 
101 Red 2 5.00 1 
102 Blue 3 3.00 2  
102 Blue 2 3.00 3 
103 Green 5 7.00 4 
104 Yellow 3 2.00 5 
104 Yellow 2 2.00 6 
104 Yellow 1 2.00 7 
 
Output 
 
UniqueRecordTable 
101 Red 2 5.00 1 
102 Blue 3 3.00 2  
103 Green 5 7.00 4 
104 Yellow 3 2.00 5 
 
AdditionalDuplicateTable 
102 Blue 2 3.00 3 
104 Yellow 2 2.00 6 
104 Yellow 1 2.00 7 
 
Any help would be appreciated. 
 
Thanks, John 
 
ต้องการที่จะแยกไฟล์จาก 
Code Desc Quan Price Autonumber 
101     Red       2        5.00           1 
102     Blue       3        3.00           2  
102     Blue       2        3.00           3 
103     Green    5        7.00           4 
104     Yellow   3        2.00           5 
104     Yellow   2        2.00           6 
104     Yellow   1        2.00           7 
 
ต้องการให้เป็น 
 
ตารางที่ 1 ไม่ซ้ำกันเลย 
101     Red       2        5.00           1 
102     Blue       3        3.00           2  
103     Green    5        7.00           4 
104     Yellow   3        2.00           5 
 
ตารางที่ 2 ข้อมูลที่ซ้ำกันที่เหลือเอามาไว้ที่นี่ดังนี้ 
102     Blue       2        3.00           3 
104     Yellow   2        2.00           6 
104     Yellow   1        2.00           7 
 
จะทำอย่างไร 
 
คุณ Hans คนเดิมได้ให้ตัวอย่างไวดูด้วย ลองไปเอามาศึกษาได้ที่ ttp://http://www.wopr.com/w3tfiles/4-169951-Unique.zip ครับ 

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R06605
   
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.0597s