Dear Mas Rusman,
Solusinya bisa dengan cara di delete table1 dahulu, dengan membuat sql sbb:
DELETE *
FROM Table1;
FROM Table1;
kemudian buat lagi sql yang kedua, yakni mencopy seluruh record ke table1 dipilih semua (All / *) dari table2
INSERT INTO Table1
SELECT *
FROM Table2;
SELECT *
FROM Table2;
semoga membantu
regards,
Sumiyanto
From: Rusmanto <rusmanto@tokatindung.com>
To: belajar-access@yahoogroups.com
Cc:
Sent: Wednesday, November 3, 2010 7:57:48 AM
Subject: [belajar-access] mau tanya update query
*** This e-mail and attachments it might contains has passed internal anti-virus check but it is suggested for you to re-scan with your anti-virus ***
Disclaimer Notice :
This message and any attachment contains information intended only for the use of the addresee named above. It may also be confidential and/or privileged.
If you are not the intended recipient of this message you are herby notified that you must not disseminate, copy or take any action in reliance on it. Please delete the message and notify the sender.
Opinions, conclusions and other information in this message that do not relate to the official business of Archipelago Resources Plc., Archipelago Resources Pty Ltd.,
PT Meares Soputan Mining, PT Tambang Tondano Nusajaya shall be understood as neither given nor endorsed by them.
To: belajar-access@yahoogroups.com
Cc:
Sent: Wednesday, November 3, 2010 7:57:48 AM
Subject: [belajar-access] mau tanya update query
Assalamuallaikum,
Teman-teman saya mau tanya gimana caranya update data yang sudah ada dengan data baru yang field nya sama persis,
seperti contoh di bawah ini :
Saya mau update Tabel1 dengan Tabel2.
saya sudah coba import tabel tapi tidak mau, tetap aja nilainya tidak berubah.
Tabel1.
Teman-teman saya mau tanya gimana caranya update data yang sudah ada dengan data baru yang field nya sama persis,
seperti contoh di bawah ini :
Saya mau update Tabel1 dengan Tabel2.
saya sudah coba import tabel tapi tidak mau, tetap aja nilainya tidak berubah.
Tabel1.
| sample_id | au1 | au2 | au3 | au4 | ag1 | hg1 | auave | agave |
| 1011260 | 0.25 | 5.2 | 1.2 | 0 | 2.725 | 1.2 | ||
| 1011296 | 0.25 | 5.2 | 7.8 | 0 | 2.725 | 7.8 | ||
| 1011469 | 0.25 | 5.2 | 1.5 | 0 | 2.725 | 1.5 | ||
| 1011504 | 0.25 | 5.2 | 5.2 | 0 | 2.725 | 5.2 | ||
| 1011512 | 0.25 | 0.4 | 0 | 0.25 | 0.4 | |||
| 1011678 | 0.25 | 0.4 | 0 | 0.25 | 0.4 |
Tabel2.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mohon pencerahannya gimana caranya yang paling mudah, kalau cuma 5 data sih gampang tapi kalau ada ratusan dan jadi masalah. terimakasih sebelumnya. wassalam Rusman | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
*** This e-mail and attachments it might contains has passed internal anti-virus check but it is suggested for you to re-scan with your anti-virus ***
Disclaimer Notice :
This message and any attachment contains information intended only for the use of the addresee named above. It may also be confidential and/or privileged.
If you are not the intended recipient of this message you are herby notified that you must not disseminate, copy or take any action in reliance on it. Please delete the message and notify the sender.
Opinions, conclusions and other information in this message that do not relate to the official business of Archipelago Resources Plc., Archipelago Resources Pty Ltd.,
PT Meares Soputan Mining, PT Tambang Tondano Nusajaya shall be understood as neither given nor endorsed by them.
__._,_.___
No comments:
Post a Comment