QueryEntity uses NVARCHAR(4000) in query even though our data is VARCHAR(50)

Hi there,

Our business is having a problem when using a queryEntity in Appian for a certain field. It converts that field to an NVARCHAR(4000) (I'm assuming because it's a text field) even though our Database and Data Type have it listed as VARCHAR(50). In SQL Server, when comparing an NVARCHAR to a VARCHAR, it causes an implicit conversion of all data in the VARCHAR column which is a big performance hit for us.

Is there any way to make sure that the parameter uses VARCHAR(50) instead of NVARCHAR(4000)?

Thank you

  Discussion posts and replies are publicly visible

Parents
  • A bit of a guess here but it's likely an issue that can be seen/resolved in the XSD for the data type you are using. When you've got the data type open go to the cog in the top left corner then download XSD. Can you post the full <element> tag of the field that is giving you an issue? See below for an example.

    <xsd:element name="error" nillable="true" type="xsd:string">
        <xsd:annotation>
            <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

Reply
  • A bit of a guess here but it's likely an issue that can be seen/resolved in the XSD for the data type you are using. When you've got the data type open go to the cog in the top left corner then download XSD. Can you post the full <element> tag of the field that is giving you an issue? See below for an example.

    <xsd:element name="error" nillable="true" type="xsd:string">
        <xsd:annotation>
            <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

Children