Guest_imported
New member
- Jan 1, 1970
- 0
Hello,
I have queried statuses from dual:
[tt]
select 'I' AS BLA FROM DUAL
union
select 'A' AS BLA FROM DUAL
union
select 'W' AS BLA FROM DUAL
union
select 'V' AS BLA FROM DUAL
union
select 'E' AS BLA FROM DUAL
union
select 'P' AS BLA FROM DUAL
union
select 'N' AS BLA FROM DUAL
[/tt]
I would now like to make a query on another table to count how many times each of these statuses exists in that table. When does not exist at all, 0 should be displayed. What do I put in place of ??? in the following query?
The =(+) syntax is difficult for me.
[tt]
select
trn_stat_typ,
NVL(count(trn_stat_typ),0)
from
vegas.atoim
PROCESSDT >= to_date('01.01.2000','dd.MM.yyyy')
and PROCESSDT <= to_date('01.01.2004','dd.MM.yyyy')
and TRN_STAT_TYP =(+) (???)
GROUP BY
trn_stat_typ
[/tt]
Would be thankful for all help getting me closer for the solution. Thank you!
Sincerely,
Aulo
I have queried statuses from dual:
[tt]
select 'I' AS BLA FROM DUAL
union
select 'A' AS BLA FROM DUAL
union
select 'W' AS BLA FROM DUAL
union
select 'V' AS BLA FROM DUAL
union
select 'E' AS BLA FROM DUAL
union
select 'P' AS BLA FROM DUAL
union
select 'N' AS BLA FROM DUAL
[/tt]
I would now like to make a query on another table to count how many times each of these statuses exists in that table. When does not exist at all, 0 should be displayed. What do I put in place of ??? in the following query?
The =(+) syntax is difficult for me.
[tt]
select
trn_stat_typ,
NVL(count(trn_stat_typ),0)
from
vegas.atoim
PROCESSDT >= to_date('01.01.2000','dd.MM.yyyy')
and PROCESSDT <= to_date('01.01.2004','dd.MM.yyyy')
and TRN_STAT_TYP =(+) (???)
GROUP BY
trn_stat_typ
[/tt]
Would be thankful for all help getting me closer for the solution. Thank you!
Sincerely,
Aulo