only swap parts if a replacement is given
This commit is contained in:
parent
87d5dbceaf
commit
3d5cd9b2ff
@ -6,6 +6,8 @@ target AS (SELECT $$swap_doc$$::jsonb swap)
|
|||||||
FROM
|
FROM
|
||||||
TARGET
|
TARGET
|
||||||
LEFT JOIN LATERAL jsonb_to_recordset(target.swap->'rows') AS x(original text, sales numeric, replace text, fit text)ON TRUE
|
LEFT JOIN LATERAL jsonb_to_recordset(target.swap->'rows') AS x(original text, sales numeric, replace text, fit text)ON TRUE
|
||||||
|
WHERE
|
||||||
|
COALESCE(x.replace,'') <> ''
|
||||||
)
|
)
|
||||||
--select * from pl
|
--select * from pl
|
||||||
,seg AS (
|
,seg AS (
|
||||||
|
Loading…
Reference in New Issue
Block a user