How to have a NULL instead of No Value from a query

Viewed 139

I had a query like:

SELECT ISNULL(S.Name+'.'+T.Name,'Table Not Found')
FROM DataProfile.Tables T
INNER JOIN DataProfile.Schemas S ON T.schemaId=S.Id
WHERE S.Name+'.'+T.Name=@TableName

Then I tried

IIF(LEN(S.Name+'.'+T.Name)>0,S.Name+'.'+T.Name,NULL)

But when it doesn't find the named table returns not output, Value or Null value or anything I can work on. This is going to be used as a crosscheck.
Does anybody have any idea?

4 Answers
Related