Re: Upserting in batch into a column of all rows by concatenating multiple columns
Thank you, Sorry for my poor reading, how I missed it. Thank you Vaghawan On Sat, Oct 28, 2017 at 11:01 PM, James Taylorwrote: > See http://phoenix.apache.org/language/index.html#upsert_select > > On Sat, Oct 28, 2017 at 4:25 AM Vaghawan Ojha > 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 >> >
Re: Upserting in batch into a column of all rows by concatenating multiple columns
See http://phoenix.apache.org/language/index.html#upsert_select On Sat, Oct 28, 2017 at 4:25 AM Vaghawan Ojhawrote: > 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 >
Upserting in batch into a column of all rows by concatenating multiple columns
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