phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaghawan Ojha <vaghawan...@gmail.com>
Subject Re: Upserting in batch into a column of all rows by concatenating multiple columns
Date Sun, 29 Oct 2017 02:55:06 GMT
Thank you, Sorry for my poor reading, how I missed it.

Thank you
Vaghawan

On Sat, Oct 28, 2017 at 11:01 PM, James Taylor <jamestaylor@apache.org>
wrote:

> See http://phoenix.apache.org/language/index.html#upsert_select
>
> On Sat, Oct 28, 2017 at 4:25 AM Vaghawan Ojha <vaghawan781@gmail.com>
> wrote:
>
>> Hi,
>>
>> I want to update a column's value in all rows by concatenating values
>> from the multiple columns of the rows. In plain sql it's possible to do
>> that but I'm not sure if that can be done in Phoenix.
>>
>> For say I've four columns in a table:
>>
>> (id, product_id, price, store_id, bill_id)
>>
>> Now I already have the values of id, product_id, price and store_id in
>> the table. But now I want to set the values of bill_id in all rows to
>> something like this:
>>
>> product_id || '-' || store_id
>>
>> Is it possible? If it is, then how do I do it. I don't know if that can
>> be done with Atomic upsert.
>>
>> Any help would be great.
>>
>> Thanks
>> Vaghawan
>>
>

Mime
View raw message