DB2 SQL Errors Codes and Error Messages and Warnings from Error -150 to -152

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-150, SQLSTATE=42807, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE OBJECT OF THE INSERT,
DELETE, UPDATE, MERGE, OR
TRUNCATE STATEMENT IS A VIEW,
SYSTEM-MAINTAINED
MATERIALIZED QUERY TABLE, OR
TRANSITION TABLE FOR WHICH
THE REQUESTED OPERATION IS
NOT PERMITTED
Explanation: One of the following occurred:
v A transition table was named in an INSERT,
UPDATE, DELETE, MERGE, or TRUNCATE
statement in a triggered action. Transition tables are
read-only.
v The view named in the INSERT, UPDATE, DELETE,
MERGE, or TRUNCATE statement is defined in such
a way that the requested insert, update, delete, or
truncate operation cannot be performed upon it.
Inserts into a view are prohibited if:
– The view definition contains a join, a GROUP BY,
or a HAVING clause.
– The SELECT clause in the view definition contains
the DISTINCT qualifier, an arithmetic expression,
a string expression, a built-in function, or a
constant.
– Two or more columns of the view are derived
from the same column.
– A base table of the view contains a column that
does not have a default value and is not included
in the view.
Updates to a view are prohibited if:
– The view definition contains a join, a GROUP BY,
or a HAVING clause.
– The SELECT clause in the view definition contains
the DISTINCT qualifier or a built-in function.
Also, a given column in a view cannot be updated
(that is, the values in that column cannot be
updated) if the column is derived from an arithmetic
expression, a constant, a column that is part of the
key of a partitioned index, or a column of a catalog
table that cannot be updated.
Deletes against a view are prohibited if:
– The view definition contains a join, a GROUP BY,
or a HAVING clause.
– The SELECT clause in the view definition contains
the DISTINCT qualifier or a built-in function.
Truncates against a view are always prohibited.
v An auxiliary table or an XML table was named in a
TRUNCATE statement.
System action: The statement cannot be executed. No
data was inserted, updated, deleted, merged, or
truncated.
User response: The requested function cannot be
performed on the view. Refer to chapter 2 of SQL
Reference for further information regarding inserting,
deleting, updating, and truncating views.
If the error occurred on a CREATE TRIGGER
statement, remove the INSERT, UPDATE, MERGE, or
DELETE reference to the transition table.
SQLSTATE: 42807

Error: DB2 SQL Error: SQLCODE=-151, SQLSTATE=42808, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE UPDATE OPERATION IS
INVALID BECAUSE THE CATALOG
DESCRIPTION OF COLUMN
column-name INDICATES THAT IT
CANNOT BE UPDATED
Explanation: The requested function is not supported
by DB2.
column-name
The name of the column that could not be
updated.
The specified column cannot be updated for one of the
following reasons:
v The values for columns occurring in the partitioning
key of a partitioned table cannot be updated.
v The object table is a view and the specified column is
defined (in the definition of the view) in such a way
that it cannot be updated.
v The object table is a catalog table with no columns
that can be updated.
v The object column is a ROWID column.
v The object column is defined with the AS ROW
CHANGE TIMESTAMP and GENERATED ALWAYS
attributes.
v The specified column of catalog tables cannot be
updated because the column itself is not updatable.
Individual columns in a view cannot be updated for
one of the following reasons:
v The column is derived from an SQL function, an
arithmetic expression, or a constant.
v The column is defined for a column of an underlying
view that cannot be updated.
v The column is defined for a read-only view.
v The column is defined for a column that is in the
partitioning key of a partitioned table.
System action: The statement was not executed. No
data was updated in the object table or view.
Programmer response: Refer to the description of the
UPDATE statement in SQL Reference for information
about restrictions on the ability to update ROWID
columns, identity columns, row change timestamp
columns, and columns in partitioned tables and views.
SQLSTATE: 42808

Error: DB2 SQL Error: SQLCODE=-152, SQLSTATE=42809, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE DROP clause CLAUSE IN THE
ALTER STATEMENT IS INVALID
BECAUSE constraint-name IS A
constraint-type
Explanation: The DROP clause of an ALTER TABLE
statement tried to drop a constraint that does not match
the constraint-type in the DROP clause. clause must
identify an appropriate constraint-type as follows:
REFERENTIAL CONSTRAINT
The identified constraint must be a referential
constraint.
CHECK CONSTRAINT
The identified constraint must be a check
constraint.
PRIMARY KEY CONSTRAINT
The identified constraint must be a primary
key constraint.
UNIQUE KEY CONSTRAINT
The identified constraint must be a unique key
constraint.
System action: The ALTER TABLE DROP statement
cannot be executed. No object was dropped.
Programmer response: Drop the existing object with
the correct DROP clause of the ALTER TABLE
statement.
SQLSTATE: 42809

Above are list of DB2 SQL Errors and Warnings from Error -150 to -152 received while performing certain operation against DB2 Database or related products.

SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.

SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

SQL Server Errors or Failures from Error: 33419 to Error: 33439

SQLServerF1

Error: 33419, Severity: 16, Function %ls is only valid on the varbinary(max) FILESTREAM column in a FileTable.

Error: 33420, Severity: 16, Unable to process object ‘%.*s’ because it is a three-part or four-part name. Specifying the server or database is not supported in the object identifer.
Error: 33421, Severity: 16, The object name ‘%.*s’ is not a valid FileTable object.
Error: 33422, Severity: 16, The column ‘%.*s’ cannot be added to table ‘%.*s’ as it is a FileTable. Adding columns to the fixed schema of a FileTable object is not permitted.
Error: 33423, Severity: 16, Invalid FileTable path name or format.
Error: 33424, Severity: 16, Invalid computer host name in the FileTable path.

Error: 33425, Severity: 16, Invalid share name in the FileTable path.
Error: 33426, Severity: 16, INSERT, UPDATE, DELETE, or MERGE to FileTable ‘%.*ls’ is not allowed inside a trigger on a FileTable.
Error: 33427, Severity: 16, Function %ls is not allowed on the deleted table inside a trigger.
Error: 33428, Severity: 14, User does not have permission to kill non-transacted FILESTREAM handles in database ID %d.
Error: 33429, Severity: 16, The non-transacted FILESTREAM handle %d does not exist.
Error: 33430, Severity: 10, Killed %d non-transactional FILESTREAM handles from database ID %d.
Error: 33431, Severity: 16, An invalid path locator caused a FileTable check constraint error. The path locator has a length of %d, which is longer than the limit of %d allowed for depth %d. Reduce the length of the path locator.
Error: 33433, Severity: 10, Unable to perform the Filetable lost update recovery for database id %d.

Error: 33434, Severity: 16, The current state of the database ‘%.*s’ is not compatible with the specified FILESTREAM non-transacted access level. The database may be read only, single user or set to emergency state.
Error: 33435, Severity: 16, Cannot publish the FileTable ‘%ls’ for replication. Replication is not supported for FileTable objects.
Error: 33436, Severity: 16, Cannot enable Change Data Capture on the FileTable ‘%ls’. Change Data Capture is not supported for FileTable objects.
Error: 33437, Severity: 16, Cannot publish the logbased view ‘%ls’ for replication. Replication is not supported for logbased views that depend on FileTable objects.
Error: 33438, Severity: 16, Cannot enable Change Tracking on the FileTable ‘%.*ls’. Change Tracking is not supported for FileTable objects.
Error: 33439, Severity: 16, Cannot use IGNORE_CONSTRAINTS hint when inserting into FileTable ‘%.*ls’, unless FILETABLE_NAMESPACE is disabled.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 27179 to Error: 27198

SQLServerF1

Error: 27179, Severity: 16, The object version does not match the project id or you do not have sufficient permissions.

Error: 27180, Severity: 16, %ls is not a valid environment variable name. It consists of characters that are not allowed.
Error: 27181, Severity: 16, The project ‘%ls’ already exists or you have not been granted the appropriate permissions to access it.
Error: 27182, Severity: 16, The environment ‘%s’ does not exist or you have not been granted the appropriate permissions to access it.
Error: 27183, Severity: 16, The environment variable ‘%ls’ does not exist or you have not been granted the appropriate permissions to access it.
Error: 27184, Severity: 16, In order to execute this package, you need to specify values for the required parameters.

Error: 27185, Severity: 16, The validation record for ID ‘%I64d’ does not exist or you have not been granted the appropriate permissions to access it.
Error: 27186, Severity: 16, One or more environment variables could not be found in the referenced environment.
Error: 27187, Severity: 16, The project does not exist or you have not been granted the appropriate permissions to access it.
Error: 27188, Severity: 16, Only members of the ssis_admin or sysadmin server roles can create, delete, or rename a catalog folder.
Error: 27189, Severity: 16, Catalog folder name cannot be NULL or an empty string.
Error: 27190, Severity: 16, The folder ‘%ls’ already exists or you have not been granted the appropriate permissions to create it.
Error: 27191, Severity: 16, The ‘%d’ permission is not applicable to objects of type ‘%d’. Grant, deny, or revoke of this permission is not allowed.
Error: 27192, Severity: 16, The caller has not been granted the MANAGEPERMISSION permission for the specified object.

Error: 27193, Severity: 16, SQL Server %ls is required to install Integration Services. It cannot be installed on this version of SQL Server.
Error: 27194, Severity: 16, Cannot find the project because it does not exist or you do not have sufficient permissions.
Error: 27195, Severity: 16, The operation failed because the execution timed out.
Error: 27196, Severity: 16, Failed to delete the folder ‘%ls’ because it is not empty. Only empty folders can be deleted.
Error: 27197, Severity: 16, The specified %ls %ld does not exist.
Error: 27198, Severity: 16, Failed to locate records for the specified operation (ID %I64d).

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 14051 to Error: 14070

SQLServerF1

 

Error: 14051, Severity: 16, The parameter value must be ‘sync_type’ or ‘dest_db’.
Error: 14052, Severity: 16, The @sync_type parameter value must be “automatic”, “none”, “replication support only”, “initialize with backup”, or “initialize from lsn”.
Error: 14053, Severity: 16, The subscription could not be updated at this time.
Error: 14054, Severity: 10, The subscription was updated successfully.
Error: 14055, Severity: 10, The subscription does not exist.

Error: 14056, Severity: 16, The subscription could not be dropped at this time.
Error: 14057, Severity: 16, The subscription could not be created.
Error: 14058, Severity: 16, Cannot create the subscription because the subscription already exists in the subscription database. Only one subscription to the same publication is allowed in each subscription database. Drop the subscription and add it again if necessary. If the proble
Error: 14059, Severity: 16, Materialized view articles cannot be created for publications with the properties allow_sync_tran, allow_queued_tran, or allow_dts.

Error: 14060, Severity: 16, Subscriber parameters specifying provider properties must be NULL for SQL Server subscribers.
Error: 14061, Severity: 16, The @pre_creation_cmd parameter value must be ‘none’, ‘drop’, ‘delete’, or ‘truncate’.
Error: 14062, Severity: 10, The Subscriber was dropped.
Error: 14063, Severity: 11, The remote server does not exist or has not been designated as a valid Subscriber.
Error: 14064, Severity: 10, Found generation stuck at genstatus 4.
Error: 14065, Severity: 16, The @status parameter value must be ‘initiated’, ‘active’, ‘inactive’, or ‘subscribed’.
Error: 14066, Severity: 16, The previous status must be ‘active’, ‘inactive’, or ‘subscribed’.
Error: 14067, Severity: 16, The status value is the same as the previous status value.
Error: 14068, Severity: 16, The subscription status of the object could not be changed.
Error: 14069, Severity: 16, Could not update sysarticles. The subscription status could not be changed.
Error: 14070, Severity: 16, Could not update the distribution database subscription table. The subscription status could not be changed.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 13227 to Error: 13268

SQLServerF1

 

Error: 13227, Severity: 10, to
Error: 13228, Severity: 10, from
Error: 13229, Severity: 10, enable
Error: 13230, Severity: 10, disable
Error: 13231, Severity: 10, remap

Error: 13232, Severity: 10, INSERT
Error: 13233, Severity: 10, UPDATE
Error: 13234, Severity: 10, DELETE
Error: 13235, Severity: 10, WHEN MATCHED
Error: 13236, Severity: 10, WHEN NOT MATCHED
Error: 13237, Severity: 10, WHEN NOT MATCHED BY SOURCE
Error: 13238, Severity: 10, TOP or OFFSET
Error: 13239, Severity: 10, GROUP BY
Error: 13240, Severity: 10, HAVING

Error: 13241, Severity: 10, ORDER BY
Error: 13243, Severity: 10, OUTPUT INTO
Error: 13244, Severity: 10, SELECT
Error: 13245, Severity: 10, WHERE
Error: 13246, Severity: 10, unexpected
Error: 13247, Severity: 10, The crypto API has detected bad data while trying to perform a decryption operation
Error: 13248, Severity: 10, OUTPUT
Error: 13249, Severity: 10, Temporary tables
Error: 13250, Severity: 10, Labels
Error: 13251, Severity: 10, availability group
Error: 13252, Severity: 10, type table
Error: 13254, Severity: 10, event
Error: 13255, Severity: 10, target
Error: 13256, Severity: 10, event action
Error: 13257, Severity: 10, event session
Error: 13258, Severity: 10, event package
Error: 13259, Severity: 10, event object
Error: 13260, Severity: 10, event predicate comparator
Error: 13261, Severity: 10, event attribute or predicate source
Error: 13262, Severity: 10, customizable attribute
Error: 13263, Severity: 10, event predicate
Error: 13264, Severity: 10, predicate source
Error: 13265, Severity: 10, event attribute
Error: 13266, Severity: 10, partitioned
Error: 13267, Severity: 10, not partitioned
Error: 13268, Severity: 10, resource pool

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 11734 to Error: 12009

SQLServerF1

 

Error: 11734, Severity: 16, NEXT VALUE FOR function is not allowed in the SELECT clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 11735, Severity: 16, The target table of the INSERT statement cannot have DEFAULT constraints using the NEXT VALUE FOR function when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 11736, Severity: 16, Only one instance of NEXT VALUE FOR function per sequence object is allowed in SET or SELECT with variable assignment.
Error: 11737, Severity: 15, NEXT VALUE FOR function does not support the ROWS and RANGE clauses.

Error: 11738, Severity: 16, The use of NEXT VALUE FOR function is not allowed in this context.
Error: 11739, Severity: 16, NEXT VALUE FOR function cannot be used if ROWCOUNT option has been set, or the query contains TOP or OFFSET.
Error: 11740, Severity: 16, NEXT VALUE FOR function cannot be used in a default constraint if ROWCOUNT option has been set, or the query contains TOP or OFFSET.
Error: 11741, Severity: 16, NEXT VALUE FOR function cannot be used within CASE, CHOOSE, COALESCE, IIF, ISNULL and NULLIF.
Error: 11742, Severity: 16, NEXT VALUE FOR function can only be used with MERGE if it is defined within a default constraint on the target table for insert actions.

Error: 11800, Severity: 16, RESTORE WITH SNAPSHOTRESTOREPHASE=2 for database ‘%ls’ failed because an earlier RESTORE WITH SNAPSHOTRESTOREPHASE=1 may have failed as a result of a network error. Retry the restore operation through SQL Writer after addressing any network issues and mak
Error: 11901, Severity: 16, Column ‘%.*ls.%.*ls’ is a federated column, while referencing column ‘%.*ls.%.*ls’ in foreign key ‘%.*ls’ is not.
Error: 11902, Severity: 16, Federation scheme key ‘%.*ls’ is not a part of this federation.
Error: 12002, Severity: 16, The requested %S_MSG index on column ‘%.*ls’ of table ‘%.*ls’ could not be created because the column type is not %S_MSG . Specify a column name that refers to a column with a %S_MSG data type.
Error: 12003, Severity: 16, Could not find spatial tessellation scheme ‘%.*ls’ for column of type %.*ls. Specify a valid tessellation scheme name in your USING clause.
Error: 12004, Severity: 16, Could not find the default spatial tessellation scheme for the column ‘%.*ls’ on table ‘%.*ls’. Make sure that the column reference is correct, or specify the extension scheme in a USING clause.
Error: 12005, Severity: 16, Incorrect parameters were passed to the CREATE %S_MSG statement near ‘%.*ls’. Validate the statement against the index-creation syntax.
Error: 12006, Severity: 16, Duplicate parameters were passed to the create index statement. Validate the statement against the index-creation syntax.
Error: 12007, Severity: 16, The CREATE %S_MSG statement is missing the required parameter ‘%.*ls’. Validate the statement against the index-creation syntax.
Error: 12008, Severity: 16, Table ‘%.*ls’ does not have a clustered primary key as required by the %S_MSG index. Make sure that the primary key column exists on the table before creating a %S_MSG index.
Error: 12009, Severity: 16, Could not find the %S_MSG index ‘%.*ls’ on table ‘%.*ls’. Either no %S_MSG index with this name exists, or a non-%S_MSG index might be using the same name. Fix the index name, avoiding duplicates. If a relational index has the same name, drop the regular

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 10723 to Error: 10742

SQLServerF1

You may receive various errors in SQL Server while working. Below are some of the SQL Server Errors from Error: 10723 to Error: 10742

Error: 10723, Severity: 15,
In a MERGE statement, a variable cannot be set to a column and expression in the same assignment in the SET clause of an UPDATE action. Assignments of the form ‘SET @variable = column = expression’ are not valid in the SET clause of an UPDATE action in a

Error: 10724, Severity: 15,
The FORCESEEK hint is not allowed for target tables of INSERT, UPDATE, or DELETE statements.

Error: 10725, Severity: 15,
Cannot use the VARYING option in a DECLARE, CREATE AGGREGATE or CREATE FUNCTION statement.

Error: 10726, Severity: 15,
User defined aggregates do not support default parameters.

Error: 10727, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed on either side of a JOIN or APPLY operator.

Error: 10728, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed as the table source of a PIVOT or UNPIVOT operator.

Error: 10729, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed in a SELECT statement that is not the immediate source of rows for an INSERT statement.

Error: 10730, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed in the FROM clause of an UPDATE or DELETE statement.

Error: 10731, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed inside another nested INSERT, UPDATE, DELETE, or MERGE statement.

Error: 10732, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed on either side of a UNION, INTERSECT, or EXCEPT operator.

Error: 10733, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed in the USING clause of a MERGE statement.

Error: 10734, Severity: 16,
Variable assignment is not allowed in a statement containing a top level UNION, INTERSECT or EXCEPT operator.

Error: 10735, Severity: 15,
Incorrect WHERE clause for filtered %S_MSG ‘%.*ls’ on table ‘%.*ls’.

Error: 10736, Severity: 15,
A full-text stoplist statement must be terminated by a semi-colon (;).

Error: 10737, Severity: 15,
In an ALTR TABLE REBUILD or ALTER INDEX REBUILD statement, when a partition is specified in a DATA_COMPRESSION clause, PARTITION=ALL must be specified. The PARTITION=ALL clause is used to reinforce that all partitions of the table or index will be rebuil

Error: 10738, Severity: 15,
The number of row value expressions in the INSERT statement exceeds the maximum allowed number of %d row values.

Error: 10739, Severity: 15,
The insert column list used in the MERGE statement cannot contain multi-part identifiers. Use single part identifiers instead.

Error: 10740, Severity: 15,
A search property list statement must end with a semicolon (;).

Error: 10741, Severity: 15,
A TOP can not be used in the same query or sub-query as a OFFSET.

Error: 10742, Severity: 15,
The offset specified in a OFFSET clause may not be negative.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 10700 to Error: 10722

SQLServerF1

You may receive various errors in SQL Server while working. Below are some of the SQL Server Errors from Error: 10700 to Error: 10722

Error: 10700, Severity: 16,
The table-valued parameter “%.*ls” is READONLY and cannot be modified.

Error: 10701, Severity: 15,
The READONLY option cannot be used in an EXECUTE or CREATE AGGREGATE statement.

Error: 10702, Severity: 15,
The WITH CUBE and WITH ROLLUP options are not permitted with a ROLLUP, CUBE, or GROUPING SETS specification.

Error: 10703, Severity: 15,
Too many grouping sets. The maximum number is %d.

Error: 10704, Severity: 15,
To rethrow an error, a THROW statement must be used inside a CATCH block. Insert the THROW statement inside a CATCH block, or add error parameters to the THROW statement.

Error: 10705, Severity: 15,
Subqueries are not allowed in the OUTPUT clause.

Error: 10706, Severity: 15,
Too many expressions are specified in the GROUP BY clause. The maximum number is %d when grouping sets are supplied.

Error: 10707, Severity: 15,
The CUBE() and ROLLUP() grouping constructs are not allowed in the current compatibility mode. They are only allowed in 100 mode or higher.

Error: 10708, Severity: 15,
DEFAULT is not allowed on the right hand side of “%.*ls”

Error: 10709, Severity: 15,
The number of columns for each row in a table value constructor must be the same.

Error: 10710, Severity: 15,
An action of type ‘%S_MSG’ is not allowed in the ‘WHEN NOT MATCHED’ clause of a MERGE statement.

Error: 10711, Severity: 15,
An action of type ‘INSERT’ is not allowed in the ‘%S_MSG’ clause of a MERGE statement.

Error: 10713, Severity: 15,
A MERGE statement must be terminated by a semi-colon (;).

Error: 10714, Severity: 15,
An action of type ‘%S_MSG’ cannot appear more than once in a ‘%S_MSG’ clause of a MERGE statement.

Error: 10716, Severity: 15,
A nested INSERT, UPDATE, DELETE, or MERGE statement must have an OUTPUT clause.

Error: 10717, Severity: 15,
The %S_MSG clause is not allowed when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.

Error: 10718, Severity: 15,
Query hints are not allowed in nested INSERT, UPDATE, DELETE, or MERGE statements.

Error: 10720, Severity: 15,
An OUTPUT INTO clause is not allowed in a nested INSERT, UPDATE, DELETE, or MERGE statement.

Error: 10721, Severity: 15,
The WHERE CURRENT OF clause is not allowed in a nested INSERT, UPDATE, DELETE, or MERGE statement.

Error: 10722, Severity: 15,
The DISTINCT keyword is not allowed when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

SQL Server Errors or Failures from Error: 5310 to Error: 5331

SQLServerF1

 

Error: 5310, Severity: 16, Aggregates are not allowed in the VALUES list of an INSERT statement.
Error: 5311, Severity: 16, Invalid quote character ‘%lc’. A remote server or user command used an invalid quote character.
Error: 5312, Severity: 16, The input to the function ‘ntile’ cannot be bound.
Error: 5313, Severity: 16, Synonym ‘%.*ls’ refers to an invalid object.
Error: 5315, Severity: 16, The target of a MERGE statement cannot be a remote table, a remote view, or a view over remote tables.
Error: 5316, Severity: 16, The target ‘%.*ls’ of the MERGE statement has an INSTEAD OF trigger on some, but not all, of the actions specified in the MERGE statement. In a MERGE statement, if any action has an enabled INSTEAD OF trigger on the target, then all actions must have enab

Error: 5317, Severity: 16, The target of a MERGE statement cannot be a partitioned view.
Error: 5318, Severity: 16, In a MERGE statement, the source and target cannot have the same name or alias. Use different aliases for the source and target to ensure that they have unique names in the MERGE statement.
Error: 5319, Severity: 16, Aggregates are not allowed in a WHEN clause of a MERGE statement.
Error: 5321, Severity: 16, The ‘%ls’ function is not allowed in the %S_MSG clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 5322, Severity: 16, An aggregate function is not allowed in the %S_MSG clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 5323, Severity: 15, Subqueries are not allowed in the %S_MSG clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.

Error: 5324, Severity: 15, In a MERGE statement, a ‘%S_MSG’ clause with a search condition cannot appear after a ‘%S_MSG’ clause with no search condition.
Error: 5325, Severity: 15, The order of the data in the data file does not conform to the ORDER hint specified for the BULK rowset ‘%.*ls’. The order of the data must match the order specified in the ORDER hint for a BULK rowset. Update the ORDER hint to reflect the order in which
Error: 5326, Severity: 15, The data in the data file does not conform to the UNIQUE hint specified for the BULK rowset ‘%.*ls’. The data in the data file must be unique if the UNIQUE hint is specified for a BULK rowset. Remove the UNIQUE hint, or update the input data file to ensur
Error: 5327, Severity: 15, The column ‘%.*ls’ does not have a valid data type for the ORDER hint specified for data source ‘%.*ls’. The text, ntext, image, xml, varchar(max), nvarchar(max) and varbinary(max) data types cannot be used in the ORDER hint for a BULK rowset or CLR TVF.
Error: 5328, Severity: 15, Cannot insert explicit value for the identity column ‘%.*ls’ in the target table ‘%.*ls’ of the INSERT statement when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 5329, Severity: 15, Windowed functions are not allowed in the %S_MSG clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.
Error: 5330, Severity: 16, Full-text predicates cannot appear in the OUTPUT clause.
Error: 5331, Severity: 16, Full-text predicates cannot appear in the %S_MSG clause when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.