Skip to main content
April 23, 2021
Solved

"SCOPE_IDENTITY' error 'SCOPE_IDENTITY' is not a recognized built-in function name.

  • April 23, 2021
  • 3 replies
  • 0 views

I am getting the following error when I am to insert on my table. Any ideas why?

 the following data

what is SCOPE_IDENTITY

Best answer by csteward

This seems to be specific to the Azure Data Warehouse, related to the query's inability to retrieve a new primary key for an insert.  You will likely have to work this out with whatever Azure DW support you have available, as far as account permissions, DB settings, etc.

3 replies

csteward
cstewardAnswer
April 23, 2021

This seems to be specific to the Azure Data Warehouse, related to the query's inability to retrieve a new primary key for an insert.  You will likely have to work this out with whatever Azure DW support you have available, as far as account permissions, DB settings, etc.

April 23, 2021



do you think this has anything with the CDT set up?


<xsd:element name="aappNum" nillable="true" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@GeneratedValue @Column(name="AAPP_Num", nullable=false, columnDefinition="BIGINT IDENTITY")</xsd:appinfo>
</xsd:annotation>
</xsd:element>

csteward
April 23, 2021

So, it is a possibility of being related to missing @Id in your notation - there is also a conflict with nillable between the element and notation, try this:

<xsd:element name="aappNum" nillable="false" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Id @GeneratedValue @Column(name="AAPP_Num", nullable=false, columnDefinition="BIGINT IDENTITY")</xsd:appinfo>
</xsd:annotation>
</xsd:element>

I haven't used BIGINT on any identity fields prior either, 2,147,483,647 rows has been plenty for me so far :)