SQL> select
2 distinct qc_m|| ',' ||
3 to_char(logon_dt, 'YYYY-MM-DD HH24:MI:SS')|| ',' ||
4 CASE WHEN logon_dt IS NOT NULL THEN 'LOGON' ELSE 'LOGOFF' END
5 from qc_ct2 qc left join v_tls_equipment_logon tls on qc.qc_m=tls.equipment_id where
6 qc.terminal_c='T'and tls.USER_TYPE_C='1' and tls.site_c='C' order by 1 asc;
result:
26 rows selected.
I have 28 records in:
select qc_m from qc_ct2 where terminal_c='T';
what is it that I needed to keep the 28 records without been filter away by line 6 statement... but then, I need the line 6 statement to meet the critera....