Increase the field length in SQL queries

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 1분
  • The ODBC driver limits the field length in SQL queries to the maximum length defined by the ServiceNow dictionary entry. You can increase the maximum field length to avoid truncating data.

    시작하기 전에

    Role required: admin

    이 태스크 정보

    If the data coming from the ODBC source exceeds the field size of the dictionary entry, ServiceNow truncates the query output to fit the field size. If your data is truncated, you can do the following.

    프로시저

    1. Increase the maximum length in the dictionary entry for the field in question.
    2. Reconnect the ODBC driver to pick up the change.
      주:
      By default, the ODBC driver uses the VARCHAR data type to store query string output. When strings become very large (roughly 16000 characters), the ODBC driver uses the LONGVARCHAR data type instead. It is important to keep in mind, however, that the LONGVARCHAR data type has a more limited set of SQL commands that can be executed on it. For example, it does not support queries using scalar data.