SQL Server Error : 162, Severity: 15. Invalid expression in the TOP clause.

SQL Server Error : 162 Details


SQL Server Error: 162
Severity: 15
Event Logged or not: No
Description:
Invalid expression in the TOP clause.
Severity 15 Description:
Indicates syntax errors in the Transact-SQL command.

Cause:

Setup the import file to use the current file path and In the control flow diagram there is a step called “import data “

The ssis package creates a temp table named temp, imports the records from the excel workbook worksheet named “Sheet1”. Then queries to match the following “names” with appropriate id’s of table

we can run this import temp data into real table and run again.

Once those id’s have been found/updated then it takes the records from the temp table and copies them to the live table on the database.

Solution:

Here the solution would be to fix The value violated the integrity constraints for the column. So the source data column for the destination column has invalid values/duplicate values for some rows. Configure error component on the Ole destination to get hold of the rogue data.

Refere to this to understand on how to configure the error output on the Ole Destination.

SQL Server Error Code and solution summary


SQL Server Error: 162
Severity: 15
Event Logged or not: No
Description:
Invalid expression in the TOP clause.

The value violated the integrity constraints for the column. So the source data column for the destination column has invalid values/duplicate values for some rows. Configure error component on the Ole destination to get hold of the rogue data.

Vamshi B

Share
Published by
Vamshi B

Recent Posts

sql server detected logical consistency based error

Learn about SQL Server detecting logical consistency based issues and how to resolve them.

5 months ago

sql server error 1222

Learn about SQL Server error 1222 and how to resolve the lock request time out…

5 months ago

Microsoft SQL Server 2022 New Features

Discover the new features of Microsoft SQL Server 2022 and how they compare to previous…

5 months ago

SQL Server Error 1222 lock request time out period exceeded

SQL Server Error 1222 lock request time out period exceeded   Lock request time out…

5 months ago

SQL Server Error : 427, Severity: 20. Could not load the definition for constr

SQL Server Error : 427, Severity: 20. Could not load the definition for constraint ID…

10 months ago

SQL Server Error : 204, Severity: 20. Normalization error in node %ls.

SQL Server Error : 204, Severity: 20. Normalization error in node %ls.

10 months ago

This website uses cookies.