Q:

Select statement with result even if there isn't in the db

I have this table with all my attachment on specific customer order and I want to select only one kind of attachement, but I want to see the line even if there is no attachment.  Is there a way to do so? 
I tried this but it doesn't work:
SELECT 
  Comm. No_Com, 
    CASE WHEN Attachement. EntityID IS NULL OR Attachement. ATS_CategoryOfAttachmentCode='DESSIN'
        THEN Attachement. FileName
        ELSE ' '
    END AS Dessin

    FROM Comm
    INNER JOIN Attachement
    ON Comm. COH_Id=Attachement. EntityID

A:

Use LEFT OUTER JOIN instead of INNER JOIN. 
SELECT 
    Comm. No_Com, 
    CASE WHEN Attachement. EntityID IS NULL OR Attachement. ATS_CategoryOfAttachmentCode='DESSIN'
        THEN Attachement. FileName
        ELSE ' '
    END AS Dessin
FROM Comm
LEFT OUTER JOIN Attachement
ON Comm. COH_Id=Attachement. EntityID AND Attachment. Kind = 'DesiredKind'

