phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serega Sheypak <serega.shey...@gmail.com>
Subject Re: select all dynamic columns by primary key if columns names are unknown
Date Tue, 02 Feb 2016 21:42:56 GMT
It super overhead, you have to query twice...

2016-02-02 22:34 GMT+01:00 Steve Terrell <sterrell@oculus360.us>:

> I would like to know as well.  Today when I upsert and create dynamic
> columns, I have to also create a second table to keep track of the dynamic
> field names and data types that were upserted so that the person writing
> queries for the first table can know what's fields are available.
>
> Also would like to know if there is a way to do bulk upserting with
> dynamic fields.
>
> On Tue, Feb 2, 2016 at 3:27 PM, Serega Sheypak <serega.sheypak@gmail.com>
> wrote:
>
>> Hi, is it possible to select all dynamic columns if you don't know their
>> names in advance?
>> Example:
>>
>> I have a table with single defined column named PK, which is a primary key
>>
>> Someone runs query:
>>
>> UNSERT INTO MY_TBL(PK, C1, C2, C3) VALUES('x', '1', '2', '3')
>>
>> where C1, C2, C3 are dynamic columns
>>
>> then I want to select all columns using query:
>> select * from MY_TBL where PK = 'x'
>> But this query won't return C1, C2, C3 columns.
>>
>>
>

Mime
View raw message