 <p>Edit: Actually I can get this error message by using a scalar function as if it was a table valued function. </p> <p><strong>Don't use</strong></p> <pre><code>SELECT * from [dbo].[calculatecptcodeprice] (...) </code></pre> <p><strong>Use</strong></p> <pre><code>SELECT [dbo].[calculatecptcodeprice] (...) </code></pre> <p><strong>Other things to check</strong></p> <ol> <li>Permissions</li> <li>You are prefixing the function with the schema name when you use it.</li> <li>You are trying to use it from within the same database as you created it.</li> </ol>