sales_walk/sql/write_note.sql

12 lines
305 B
MySQL
Raw Permalink Normal View History

2023-09-01 08:29:11 -04:00
MERGE INTO
rlarp.walk w
USING
( SELECT $1 ship_cust, $2 bucket, $3 notes) as i ON
i.ship_cust = w.ship_cust
WHEN MATCHED THEN UPDATE SET
bucket = i.bucket
,notes = i.notes
WHEN NOT MATCHED THEN
INSERT (ship_cust, bucket, notes)
VALUES (i.ship_cust, i.bucket, i.notes )