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

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

sql server DBA 999

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.

Leave a Reply

Your email address will not be published. Required fields are marked *