Hi,

i got your question, we do not yet support the partial column update in
carbon.
When u say, set the column2, col3 by select col2, col3 from B where a.id =
b.id, then whenever the where condition is met, we select the whole column
from B and set to A.

So you can have query as 
*update iud.a d set (d.col2) = (select s.col2 from iud.b s where d.id =
s.id)*

You will have output for your data as mentioned, like below after update

+---+----------------+-------------------+
|id   |col1                |col2 |col3           |
+---+----------------+-------------------+
|4    |01OP20111688|40  |0020013010|
|1    |03OP20111684|10  |                  |
|2    |01OP20111607|40  |                  |
|3    |01OP20111649|      |0020018393|
+---+------------+---------+-------------+

you will not have value 90 in the col2, as its value in table A, but you are
updating the value of table B's col2.


If you want the below data as you requested, 

+---+------------+----+----------+
|id |col1        |col2|col3      |
+---+------------+----+----------+
|3  |01OP20111649|90  |0020018393|
|4  |01OP20111688|40  |0020013010|
|1  |03OP20111684|10  |          |
|2  |01OP20111607|40  |          |
+---+------------+----+----------+


Then you can write query like below

*update iud.a d set (d.col2) = (select s.col2 from iud.b s where d.id = s.id
and s.col2 != '')*


Regards,
Akash R Nilugal



--
Sent from: 
http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/

Reply via email to