The from (
Select
The sum (case when a.y ears<=5 then 1 else 0 end) as "5"
, the sum (case when a.y ears>=6 and a.y ears<=8 then 1 else 0 end) as "6-8"
, the sum (case when a.y ears>=9 and a.y ears<11 then 1 else 0=end) as "9-11"
, the sum (case when a.y ears>=12 and a.y ears<14 then 1 else 0=end) as "12-14"
, the sum (case when a.y ears> 15 then 1 else 0=end) as "15"
The from (
The select months_between (sysdate, BUILD_DATE)/12 years
The from PL_EQPIPE_T
Where 1=1
]] & gt;
V) a)
Unpivot
(the value for the key in (" 5 ", "6-8", "September 11", "12-14", "15"))
Can run in PLSQL, mybatis error, error stack:
Nested exception is Java. SQL. SQLException: SQL injection violation, syntax error: syntax error, expect RPAREN, actual FOR pos 516, line 18, the column 10, token FOR: the select key as "key", the value as "value"
The from (
Select
The sum (case when a.y ears<=5 then 1 else 0 end) as "5"
, the sum (case when a.y ears>=6 and a.y ears<=8 then 1 else 0 end) as "6-8"
, the sum (case when a.y ears>=9 and a.y ears<11 then 1 else 0=end) as "9-11"
, the sum (case when a.y ears>=12 and a.y ears<14 then 1 else 0=end) as "12-14"
, the sum (case when a.y ears> 15 then 1 else 0=end) as "15"
The from (
The select months_between (sysdate, BUILD_DATE)/12 years
The from PL_EQPIPE_T
Where 1=1
V) a)
Unpivot
(the value for the key in (" 5 ", "6-8", "September 11", "12-14", "15")))
CodePudding user response:
Use the druid data validation function?CodePudding user response: