Java s请标记特定的数据库。根据错误消息,我猜是Oracle。感谢您的回复。在oracle环境中,我面临的问题是非常感谢您。在子查询和主查询中都添加了rownum=1后,获得了该值。在子查询和主查询中添加rownum=1后获取值 (select
Java s请标记特定的数据库。根据错误消息,我猜是Oracle。感谢您的回复。在oracle环境中,我面临的问题是非常感谢您。在子查询和主查询中都添加了rownum=1后,获得了该值。在子查询和主查询中添加rownum=1后获取值 (select ,java,oracle,mybatis-mapper,Java,Oracle,Mybatis Mapper,s请标记特定的数据库。根据错误消息,我猜是Oracle。感谢您的回复。在oracle环境中,我面临的问题是非常感谢您。在子查询和主查询中都添加了rownum=1后,获得了该值。在子查询和主查询中添加rownum=1后获取值 (select (case when (coalesce(t1.col1,t2.col1, t1.col2, t1.col3) is null) then (select sysdate from dual) e
s请标记特定的数据库。根据错误消息,我猜是Oracle。感谢您的回复。在oracle环境中,我面临的问题是非常感谢您。在子查询和主查询中都添加了rownum=1后,获得了该值。在子查询和主查询中添加rownum=1后获取值
(select
(case when (coalesce(t1.col1,t2.col1, t1.col2, t1.col3) is null)
then (select sysdate from dual)
else (coalesce(t1.col1,t2.col1, t1.col2, t1.col3))
end )
from table1 t1
join table2 t2
on t1.id IN (t2.id))
select
case when coalesce(t1.col1,t2.col1, t1.col2, t1.col3) is null
then sysdate
else coalesce(t1.col1,t2.col1, t1.col2, t1.col3)
end
from table1 t1
join table2 t2 on t1.id = t2.id
<select id="Trigger" parameterType="hashmap" resultType="java.util.HashMap" flushCache="true">
SELECT
select case when coalesce(table1.col1, table2.col2,table1.col3, table1.col4) is null
then sysdate
else coalesce(table1.col1, table2.col2,table1.col3, table1.col4) end as "ProgressDate"
, table3.id as "ID"
from table1
INNER join table2 on table1.id = table2.id
INNER JOIN table3 ON table1.id = table3.id
INNER JOIN table4 table2.action = table4.action
WHERE table3.transaction = #{inputvaluepassed}
</select>
SELECT
(
select case when coalesce(table1.col1, table2.col2,table1.col3,
table1.col4) is null
then (select sysdate from dual)
else coalesce(table1.col1, table2.col2,table1.col3, table1.col4)
end
from table1
join table2 on table1.id = table2.id
) as "ProgressDate",
table3.id as "ID"
FROM table3, table1, table2, table4
WHERE table3.transaction = #{inputvaluepassed}
AND table1.id = table3.id
AND table2.id=table1.id and table2.action = table4.action
SELECT
(
select case when coalesce(table1.col1, table2.col2,table1.col3,
table1.col4) is null
then (select sysdate from dual)
else coalesce(table1.col1, table2.col2,table1.col3, table1.col4)
end
from table1
join table2 on table1.id = table2.id
limit 1 -- added this line
) as "ProgressDate",
table3.id as "ID"
FROM table3, table1, table2, table4
WHERE table3.transaction = #{inputvaluepassed}
AND table1.id = table3.id
AND table2.id=table1.id and table2.action = table4.action