|
![](/images/resource/spacer.gif) |
|
รบกวนด้วยครับ งง มา 2 วันแล้ว VB.NET แยกข้อมูล แล้ว Insert ข้อมูลลง Mysql |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ง่ายๆ คือ ระบุเงื่อนไข และ วิธีในการแยก ครับ
ว่าจะแยก แบบไหน แยกยังไง มีความสัมพันกันยังไง
ลองทำความเข้าใจกับความต้องการดู แล้ว เขียนเป็นขั้นตอนออกมาก่อน แล้วค่อยมาเขียนโค้ด
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-11-26 16:48:09 |
By :
lamaka.tor |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ดูรูปแล้ว ไม่เห็นมันจะแยกอะไรตรงไหน
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-11-26 18:37:53 |
By :
Chaidhanan |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
select * from table where sumcolumn like '%EG%'
หรือถ้าจะทำให้ถูกคือ เอา อีพวก EG GF ....... ฯลฯ ไปใส่ใน combobox
ส่วน select ก็สร้าง ฟังค์ชั่นขึ้นมาเพื่อรับค่า ไปค้น
อย่าไปสนใจ excel เพราะเราใช้โปรแกรมตัวใหม่แล้ว
ให้รู้แค่หลักการ ขั้นตอน แล้ว เอามาเขียนก็พอ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-11-26 19:04:43 |
By :
lamaka.tor |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
select distinct left(`รหัส`,2) as zzz from tablename;
เอาผลลัพธ์ที่ได้ ไป แทนที่ชื่อตารางในการ คิวรี่
insert into zzz select * from tablename where `รหัส` like 'zzz%' ";
[/vb]
ปล. แต่ไม่รู้จะแยกทำไมให้ยุ่งยากอะครับ มันไม่จำเป็น ใช้การคิวรี่ให้ได้ผลลัพธ์ตามต้องการดีกว่า
|
ประวัติการแก้ไข 2018-11-26 19:12:49
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-11-26 19:09:42 |
By :
Chaidhanan |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 05
|