2017-08-03 46 views

回答

2

你可以使用一個case表達:

CASE TP.noOfseats 
    WHEN 0 THEN '' 
    ELSE CONCAT(ISNULL(NES.NumberOfNomination, ''), 
       '/', 
       ISNULL(TP.NoOfSeats, '')) 
END AS Seats 
+0

不工作對我來說 – Ahaliya

+0

@Ahaliya護理更具體? – Mureinik

-1
CONCAT(ISNULL(NES.NumberOfNomination, ''), '/', 
     ISNULL(CASE WHEN TP.NoOfSeats = 0 
        THEN '' 
        ELSE TP.NoOfSeats END, '') 
     ) as Seats,