日期:2014-05-17 浏览次数:20816 次
WITH t AS
(
SELECT '0,' AS a, '0,4,' AS b FROM dual
union all
SELECT '1,4,' AS a, '1,2,3,' AS b FROM dual
union all
SELECT '2,3,' AS a, '0,' AS b FROM dual
union all
SELECT '1,2,4,' AS a, '0,3,' AS b FROM dual
union all
SELECT '1,2,' AS a, '0,2,4,' AS b FROM dual
)
SELECT * FROM t;
WITH t AS
(
SELECT '0,' AS str1, '0,4,' AS str2 FROM dual
union all
SELECT '1,4,' AS str1, '1,2,3,' AS str2 FROM dual
union all
SELECT '2,3,' AS str1, '0,' AS str2 FROM dual
union all
SELECT '1,2,4,' AS str1, '0,3,' AS str2 FROM dual
union all
SELECT '1,2,' AS str1, '0,2,4,' AS str2 FROM dual
)
select str1,str2,DECODE(SIGN(INSTR(translate(replace(str1,',',''),replace(str2,',',''),'XXX'),'X')),1,'Y','N') AS STR3 FROM T
WITH t AS
(
SELECT '0,' AS a, '0,4,' AS b FROM dual
union all
SELECT '1,4,' AS a, '1,2,3,' AS b FROM dual
union all
SELECT '2,3,' AS a, '0,' AS b FROM dual
union all
SELECT '1,2,4,' AS a, '0,3,' AS b FROM dual
union all
SELECT '1,2,' AS a, '0,2,4,' AS b FROM dual
)
select a,
b,
&n