title: SQL : How to avoid multiple function call in a single query?
body: <p>I have a query that accept the scalar-valued function 2 times, at one place in the field within the select list and second in the join condition. My question is that how to avoid that function call within single query?
  Thanks.</p>
  
  <pre><code>SELECT   i.Id, i.Name, . . . . . dbo.IsItemCApproved(C.Id) AS [Status], . . 
  FROM @Item i 
  JOIN Card C ON C.ItemId = i.Id 
  AND C.Deadline IS NOT NULL 
  AND dbo.IsItemCApproved(C.Id) = 'False' 
  AND C.IsDeleted = 0
  </code></pre>