/* */

Wednesday, November 3, 2010

Re: [belajar-access] mau tanya update query



kalau di data tabel 1 tidak ada di tabel 2 bagaimana? padahal tabel1 sudah terlanjur dihapus, dulu kayanya penah dibahas sama pak MBA kalau ngga salah

2010/11/2 Sumiyanto - <sumiyanto@yahoo.com>
 
Dear Mas Rusman,

Solusinya bisa dengan cara di delete table1 dahulu, dengan membuat sql sbb:
DELETE *
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;

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

 
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.
sample_id  au1au2 au3au4 ag1hg1 auaveagave
1011260 0.25 5.2   1.20 2.7251.2
1011296 0.25 5.2   7.80 2.7257.8
1011469 0.25 5.2   1.50 2.7251.5
1011504 0.25 5.2   5.20 2.7255.2
1011512 0.25     0.40 0.250.4
1011678 0.25     0.40 0.250.4

Tabel2.
sample_id au1au2 au3au4 ag1hg1 auaveagave
10112603.253.32    1.20.253.285 1.2
10112967.11 7.03   7.8 0.187.07 7.8
1011469 0.880.89    1.50.75 0.8851.5
10115042.48 2.45   5.2 0.882.465 5.2
1011512 0.06    0.4 0.090.06 0.4
1011678 0.31    0.4 0.060.31 0.4







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.






__._,_.___


SPAM IS PROHIBITED



Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

No comments:

Post a Comment