【发布时间】:2020-04-01 10:24:12
【问题描述】:
再次在这里寻求帮助 - 我正在使用两个 Oracle 表
我有这个问题 (image-1)
有两个不同列的表,我做了一个联合,我得到了你在 image-1 上看到的结果 这是我的查询:
(select td.DETALLE col1,
tg.FININ col2,
tg.ffinn col3,
null as col4
from table_1 tg
inner join other_table td on (tg.cod_f = td.fol and tg.prod_c = td.prod)
where UPPER(tg.sys_user) = UPPER(:APP_USER)
and td.fol = :P10_FOLLETO
and td.prod = :P10_PRODUCTO
and tg.fin = :P10_FECHA_INICIO)
union all
(select null as col1
,null as col2
,null as col3
,camp.camp_util.get_data(:P10_FOLLETO, :P10_PRODUCTO, :P10_FECHA_INICIO) as col4 -- This is a FUNCTION from another schema that will return in this case just MAD
from dual);
但我的结果可能是:
注意:每个查询都将返回一行,因此我想将所有内容分组在一行中。
有人帮帮我吗?
问候
【问题讨论】:
-
这里的大多数人都希望样本表数据和预期结果为格式化文本,而不是图像。
-
再添加几行样本数据,并相应调整结果。
标签: sql oracle plsql oracle-apex oracle-apex-5.1