在我的 SQL 中,我正在寻找我正在使用 LIKE 命令搜索的项目。有没有办法确定在每行数据中找到了哪个 LIKE?
SELECT DISTINCT VICSEC.VSID, VICSEC.VSDESCRIPTION
FROM VSUSER.VICSEC INNER JOIN VSUSER.VSNOTES ON VICSEC.VSID=VSNOTES.VSID
WHERE VICSEC.VSSHIPDATE between sysdate and (sysdate+14)
AND(UPPER(VICSEC.VSDESCRIPTION) LIKE '%***GARTER***%'
OR UPPER(VICSEC.VSDESCRIPTION) LIKE '%DEMIBRA%'
OR UPPER(VICSEC.VSDESCRIPTION) LIKE '%PANTY%'
OR UPPER(VICSEC.VSDESCRIPTION) LIKE '%PAJAMA%'
OR UPPER(VICNOTES.VSNOTE) LIKE '%***GARTER***%'
OR UPPER(VICNOTES.VSNOTE) LIKE '%DEMIBRA%'
OR UPPER(VICNOTES.VSNOTE) LIKE '%PANTY%'
OR UPPER(VICNOTES.VSNOTE) LIKE '%PAJAMA%'
OR UPPER(VICSEC.VSSTORITEM) LIKE '%***GARTER***%'
OR UPPER(VICSEC.VSSTORITEM) LIKE '%DEMIBRA%'
OR UPPER(VICSEC.VSSTORITEM) LIKE '%PANTY%'
OR UPPER(VICSEC.VSSTORITEM) LIKE '%PAJAMA%')
ORDER BY VICSEC.VSID