I have query which returns some rows with null columns. I wanted only get the rows which have null columns. here is my query
SELECT
eofficeuat.gatepass.agent_id,
eofficeuat.cnf_agents.agent_name,
eofficeuat.entrylog_vehicle.passnumber AS passnumber,
eofficeuat.gatepass.id,
eofficeuat.entrylog_vehicle.action,
to_char(eofficeuat.gatepass.issuedatetime, 'dd-mm-yyyy HH12:MI:SS PM') AS issueddatetime
FROM
eofficeuat.gatepass
inner JOIN eofficeuat.cnf_agents ON eofficeuat.gatepass.agent_id = eofficeuat.cnf_agents.agent_id
left JOIN eofficeuat.entrylog_vehicle ON eofficeuat.gatepass.id = eofficeuat.entrylog_vehicle.passnumber
WHERE
trunc((eofficeuat.gatepass.issuedatetime - DATE '1970-01-01') * 60 * 60 * 24) - 21602 >= 1569952800
AND trunc((eofficeuat.gatepass.issuedatetime - DATE '1970-01-01') * 60 * 60 * 24) < (
SELECT
( sysdate - DATE '1970-01-01' ) * 86400000
FROM
dual
)
order by eofficeuat.gatepass.issuedatetime desc
this showing output like this image in the link https://gyazo.com/e9e150547b8f104f832cd190ff5392a2
can you please help for this? thanks
< ( SELECT ( sysdate - DATE '1970-01-01' ) * 86400000 FROM dual )
? Just write< ( sysdate - DATE '1970-01-01' ) * 86400000
– Wernfried Domscheit Oct 2 '19 at 6:26WHERE TRUNC(eofficeuat.gatepass.issuedatetime) - (6/24) >= to_date('2019-10-01 20:00', 'YYYY-MM-DD HH24:MI') AND TRUNC(eofficeuat.gatepass.issuedatetime) < sysdate
. You don't have to screw with Unix timestamps. – Wernfried Domscheit Oct 2 '19 at 6:43