made condition on column in view I have made a view in which i use function to get a column something like that

dbo.GetFinalLetter(Id, CASE 
        WHEN Id IN (
                ---------
                )
            THEN 1
        WHEN Id IN (
                --------
                )
            THEN 0
        END) as LetterText


so i want to put an other condition that only those results been shown that have text in that column for that purpose i used 

where LetterText &lt;&gt; null

where LetterText not null


but it shows error
You can try to move your function call to an OUTER/CROSS APPLY and then use the APPLY result to check your value:

SELECT &lt;your columns&gt;
FROM &lt;your tables&gt;
    CROSS APPLY 
    (
        SELECT dbo.GetFinalLetter(Id, CASE 
        WHEN Id IN (
                ---------
                )
            THEN 1
        WHEN Id IN (
                --------
                )
            THEN 0
        END) as LetterText
    ) AS x
WHERE x.LetterText IS NOT NULL ;


OR you can also use a subquery of the full query:

SELECT &lt;your columns&gt;
FROM 
(
    SELECT &lt;your columns&gt;,
        dbo.GetFinalLetter(Id, CASE 
        WHEN Id IN (
                ---------
                )
            THEN 1
        WHEN Id IN (
                --------
                )
            THEN 0
        END) as LetterText
    FROM &lt;your tables&gt;
) AS t
WHERE LetterText IS NOT NULL ;


The way to do that may depend on the data volume of the tables.

Hope this helps.