Loading

Error "String data, right truncation" Using Parameters with Stored Procedures

Дата публикации: Apr 13, 2024
Описание
When changing a string parameter value in a stored procedure, the following error might occur:
 
An error occurred validating the stored procedure connection.

[Microsoft][SQL Server Native Client 11.0]String data, right truncation 
The last tuple inserted was (<tuple name>)
Error inserting <number of tuples> tuples into table [<temporary table name>].

Unable to connect to the server "<server name>". Check that the server is running and that you have access privileges to the requested database.

Cause

The new parameter string exceeds the column width, which is set by the original parameter.
Решение
Use one of the following methods to increase the column width in the stored procedure.
  • Modify the stored procedure to return a column from the underlying table as the selected column instead of returning the Tableau parameter value.
  • Ensure that a WHERE clause specifies that the table column width be equal to the parameter value.
  • Increase the character width of the parameter(s) so that any possible field values returned by the parameters are less than the original parameter width.
Номер статьи базы знаний

001473972

 
Загрузка
Salesforce Help | Article