Unanswered: view link if a document is there,else don't view it
In a MS SQL table i have the fields Comment,Code,Username and Document.In our system users can use this table to enter Comments and Codes,and upload a pdf document.In a view on a form i want users to be able to see other's users comments or uploaded documents.If a document is there the link should be viewed,but if there is no document there should be nothing.This is what i managed to build thusfar:
SELECT Username,Comment,Code,'<a href=https://www.ekb-etzel.de/jobrouter/uploads/'+Document+'>doclink''</a>'Document FROM EKB_ENG_COMMENTS_TEST ORDER BY Username,Comment,Code,Document
In this case there is always a link in the view,which i do not want,i only want a link if there's a document.
All things i've tried with CASE Document IS NOT NULL THEN etc ended in syntax errors.