trim white space off part numbers

This commit is contained in:
Paul Trowbridge 2021-04-13 16:15:11 -04:00
parent ab7af8d2ed
commit fee1b9202f

View File

@ -2,7 +2,11 @@ WITH
target AS (SELECT $$swap_doc$$::jsonb swap) target AS (SELECT $$swap_doc$$::jsonb swap)
,pl AS ( ,pl AS (
SELECT SELECT
x.* -----trim white space on CMS part numbers coming from spreadsheet master data----
rtrim(x.original) AS original
,sales
,rtrim(x."replace") AS replace
,rtrim(x.fit) fit
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