The combination of message number (error) and language ID (langid) uniquely identifies each error message. Messages with the same message number but different language IDs are translations.
select error, description, langid from sysmessages where error = 101
error description langid ----- -------------------------------------- ------ 101 Line %d: SQL syntax error. NULL 101 Ligne %1!: erreur de syntaxe SQL. 1 101 Zeile %1!: SQL Syntaxfehler. 2 (3 rows affected)
The error message text is a description of the problem. The descriptions often include a line number, a reference to a kind of database object (a table, column, stored procedure, and so forth), or the name of a particular database object.
In the description field of sysmessages, a percent sign (%) followed by a character or character string serves as a placeholder for these pieces of data, which Adaptive Server supplies when it encounters the problem and generates the error message. “%d” is a placeholder for a number; “%S_MSG” is a placeholder for a kind of database object; “%.*s”—all within quotes—is a placeholder for the name of a particular database object. Table 5-1 lists placeholders and what they represent.
For example, the description field for message number 103 is:
The %S_MSG that starts with '%.*s' is too long. Maximum length is %d.
The actual error message as displayed to a user might be:
The column that starts with 'title' is too long. Maximum length is 80.
For errors that you report to Technical Support, it is important that you include the numbers, object types, and object names. (See “Reporting errors”.)