Hey,
I’ve an table I hope that is being creating initially using excel import. Now that I want to update the data in the same table. Can anyone please guide me to do that.
Thanks in advance
Regards
Chethan
Hey,
I’ve an table I hope that is being creating initially using excel import. Now that I want to update the data in the same table. Can anyone please guide me to do that.
Thanks in advance
Regards
Chethan
Hi
If your new file contains only new data that you wish to append to your existing table you can:
In case the new file contains both old and new data and you need to make sure you get the up-to-date information, you might wanna use MERGE fucntion, something like:
MERGE INTO t1 USING t2 ON t1.id= t2.id
WHEN MATCHED THEN UPDATE SET a = t2.a
WHEN NOT MATCHED THEN INSERT (id, a) VALUES (t2.id, t2.a);
This example updates column “a” in case the id exists in both tables or make an insert in case it’s a new id.
If you need to update more columns, you’ll need to specify them in your update.
I hope that helps!
Joao
Thanks Joao.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.