N
N
Nikolay Baranenko2017-09-18 14:47:30
SQL
Nikolay Baranenko, 2017-09-18 14:47:30

Is it possible to not list all fields when describing update and insert in merge?

Hello.
it is necessary to merge 2 tables
for the test wrote such a script

MERGE INTO WAREHOUSE.ALL_EVENTS be 
USING WAREHOUSE.BUF_ALL_EVENTS buf ON be.id=buf.id 
WHEN MATCHED THEN UPDATE SET 
version=buf.version,
time_received=buf.time_received
WHEN NOT MATCHED THEN INSERT
(
id, 
version,
time_received
)
VALUES
(
buf.id, 
buf.version,
buf.time_received
)
;

In fact, there are more than 50 fields in the table,
is it possible to arrange the script in such a way as not to list the names of the fields in the update part?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
d-stream, 2017-09-18
@drno-reg

update table
set <just what you need>
where ...

A
AnyKey80lvl, 2018-02-15
@AnyKey80lvl

There is no such possibility, which is obvious from reading the man'a.
https://my.vertica.com/docs/8.1.x/HTML/index.htm#A...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question