J'essaye d'UNION les résultats de deux requêtes. Mais je reçois l'erreur suivante:UNION sur deux select donne 'Erreur SQL: ORA-00907: parenthèse droite manquante'
Error at Command Line:9 Column:81
Error report:
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
Voilà ma question:
SELECT application_id, clicks, datee, client_id FROM(
(select
APPL_CD AS application_id,
count(*) as clicks,
to_date((to_char(ACTN_TAKE_DATA_TM, 'dd-mm-yyyy')), 'dd-mm-yyyy') as datee,
ALRT_RSPNS_FROM_CLIENT_ID AS client_id
from ALRT_PLATFORM_ALRT_HSTRY
where ACTN_TAKE_CD is not null
group by to_char(ACTN_TAKE_DATA_TM, 'dd-mm-yyyy'), APPL_CD, ALRT_RSPNS_FROM_CLIENT_ID order by datee)
UNION ALL
(select
APPL_CD AS application_id,
count(*) as clicks,
to_date((to_char(ACTN_TAKE_DATA_TM, 'dd-mm-yyyy')), 'dd-mm-yyyy') as datee,
ALRT_RSPNS_FROM_CLIENT_ID AS client_id
from ALRT_PLATFORM_ALRT
where ACTN_TAKE_CD is not null
group by to_char(ACTN_TAKE_DATA_TM, 'dd-mm-yyyy'), APPL_CD, ALRT_RSPNS_FROM_CLIENT_ID order by datee)
)
Il semble, il n'y a pas incompatibilité de parenthèses. – Kangkan