Sample If Status 1 Printed 2 Reject 0 Not Print phprunner if nulls not reviewe

Sample If Status 1 Printed 2 Reject 0 Not Print



SELECT
`Comp name`,
`Person Name`,

       (CASE WHEN Status = 0 THEN "NotPrint"
             WHEN Status = 1 THEN "Printed"
             WHEN Status = 2 THEN "Reject"
         
       END) AS Status,



 IF(Status IS NULL, 'N/A',  Status) Status,

DocNumber
FROM badge
ORDER BY Idb DESC




This if null not reviewd

SELECT
`Comp name`,
`Person Name`,
(CASE
   WHEN Status IS NULL  > "" THEN "notreviwed"

             WHEN Status = 1 THEN "Printed"
             WHEN Status = 2 THEN "Reject"
           
       END) AS Status,
IF(Status IS NULL, 'N/A', Status) AS Status1,
DocNumber
FROM badge
ORDER BY Idb DESC

Comments