phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bossert <maboss...@gmail.com>
Subject Re: perhaps dumb question? workaround for default values
Date Thu, 10 Sep 2015 21:11:04 GMT
Thanks!

Sent from my iPhone

> On Sep 10, 2015, at 4:52 PM, James Heather <james.heather@mendeley.com> wrote:
> 
> You want to use an UPSERT SELECT.
> 
>    UPSERT INTO mytable (primary_key_col, PULL_DATE) SELECT primary_key_col, CURRENT_DATE()
FROM mytable;
> 
> James
> 
>> On 10/09/15 20:40, M. Aaron Bossert wrote:
>> I have a table that requires an additional column with the current date added.  I
realize that I can't do this using the CSV importer...How can I do that in a query?  I tried
standard SQL with UPSERT instead of INSERT:
>> 
>> UPSERT INTO NG.BARS_CNC_DETAILS_HIST SET PULL_DATE=CURRENT_DATE();
>> 
>> 
>> but this gives a syntax error.
> 

Mime
View raw message