Error Creating QueryView with TVF

I'm getting the error below when I attempt to load a query view Table value function in 3.0 SP13.

LOADSPEC ERROR:The specified function name does not match the name of the table-valued function being created.

This occurs because of the case of the text "CREATE FUNCTION".  This issue is addressed in 4.0, as the case of the text no longer matters.  In 3.0, this can be corrected by creating functions in lower case like:"create function" 

Steps to Duplicate

1. Run the below SQL.

exec usp_loadspec

@forcereload=1,

@specxml=

'<QueryViewSpec

xmlns="bb_appfx_queryview"

xmlns:common="bb_appfx_commontypes"

ID="551e8b8d-5da5-48f5-a2f7-64e748320631"

Name="My Function Query View"

Description="Top 50 Donors"

Author="Operation Mobilization"

IsRoot="false"

PrimaryKeyField="SITEID"

RecordType="Constituent"

common:SecurityUIFolder="FD Reports"

>

<TVFImplementation FunctionName="USR_UFN_QUERY_MYFCN">

<CreateFunctionSQL>

<![CDATA[

CREATE FUNCTION dbo.USR_UFN_QUERY_MYFCN ()

RETURNS TABLE

AS

RETURN (

SELECT SITEID FROM APPUSER WHERE ID = ''5DF0A63F-898A-48C2-85F7-27DA63807BD1''

)

]]>

</CreateFunctionSQL>

</TVFImplementation>

 

<!-- describe each field in the view output -->

<Output>

<OutputFields>

<OutputField Name="SITEID" Caption="Site ID" DataType="Guid" />

</OutputFields>

</Output>

</QueryViewSpec>'

Environment

 Blackbaud Infinity SDK
 3.0

Was this article helpful?


Thanks for your feedback! Did this solve your issue?

Comments (optional):


Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):


Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.