filter out low grade matches
This commit is contained in:
parent
3492c802b9
commit
28865863bd
@ -1,5 +1,5 @@
|
||||
WITH
|
||||
target AS (select replace_new_mold new_mold)
|
||||
target AS (select 'replace_new_mold' new_mold)
|
||||
,basemix AS (
|
||||
SELECT
|
||||
part,
|
||||
@ -47,7 +47,13 @@ target AS (select replace_new_mold new_mold)
|
||||
FROM
|
||||
basemix b
|
||||
LEFT OUTER JOIN rlarp.itemmv i ON
|
||||
i.stlc = (SELECT new_mold FROM target)
|
||||
i.stlc = (SELECT new_mold FROM target WHERE new_mold <> '')
|
||||
AND CASE WHEN b.sizc = i.sizc THEN '1' ELSE '0' END||
|
||||
CASE WHEN i.aplnt = 'I' THEN '0' ELSE '1' END||
|
||||
CASE WHEN b.colgrp = i.colgrp THEN '1' ELSE '0' END||
|
||||
CASE WHEN b.coltier = i.coltier THEN '1' ELSE '0' END||
|
||||
CASE WHEN b.colc = i.colc THEN '1' ELSE '0' END||
|
||||
CASE WHEN substring(b.part,9,12) = substring(i.item,9,12) THEN '1' ELSE 0 END >= '111110'
|
||||
)
|
||||
--SELECT * FROM tag
|
||||
,rsort AS (
|
||||
|
Loading…
Reference in New Issue
Block a user