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 Reply
  • I feel like I'm missing something. What query turned into SQL? Now that we're in Azure Portal (new info here!) this introduces another place where a conversion could occur. Not saying it is Azure Portal but just that it's another place where it could be.

    Can you confirm if nvarchar is in the database (not using Azure Portal)? I feel the XSD in Appian has mostly likely eliminated Appian as the issue but it would be good to confirm what the actual DB says. Your earlier comments suggest it also shows varchar(50) but I'm not 100% sure.

    Also, if there are any views involved in this set up it would be good to confirm those too.

Children
No Data