mdkamrul
mdkamrul

Reputation: 274

oracle query for get rows whics have null columns from generated query

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

Upvotes: 1

Views: 35

Answers (1)

Littlefoot
Littlefoot

Reputation: 142715

I can't view images, but - if I understood the question, that would be

where (   agent_id   is null 
       or agent_name is null
       or passnumber is null
       or ...
     )

Upvotes: 2

Related Questions