The line...
SET @SelString = 'INSERT INTO tblChartItems (ChartID, ProductItemID, ChartPosition, LastChartPosition, ProductTypeID) VALUES(' + @ChartID + ',' + @ProductID + ',' + @Position + ',' + 0 + ',' + @ProductTypeID +')'
The error...
Syntax error converting the varchar value 'INSERT INTO tblChartItems (ChartID, ProductItemID, ChartPosition, LastChartPosition, ProductTypeID) VALUES(' to a column of data type int.
Types...
@SelString = nchar(500)
@ChartID = Integer
@ProductID = nchar
@Position = Integer
@ProductTypeID = Integer
I have tried using convert(nchar(5),@ChartID) - on the types but the error remains. Do I even need
to convert these. I understand the error but how should I ammend it?
Thanks
SET @SelString = 'INSERT INTO tblChartItems (ChartID, ProductItemID, ChartPosition, LastChartPosition, ProductTypeID) VALUES(' + @ChartID + ',' + @ProductID + ',' + @Position + ',' + 0 + ',' + @ProductTypeID +')'
The error...
Syntax error converting the varchar value 'INSERT INTO tblChartItems (ChartID, ProductItemID, ChartPosition, LastChartPosition, ProductTypeID) VALUES(' to a column of data type int.
Types...
@SelString = nchar(500)
@ChartID = Integer
@ProductID = nchar
@Position = Integer
@ProductTypeID = Integer
I have tried using convert(nchar(5),@ChartID) - on the types but the error remains. Do I even need
to convert these. I understand the error but how should I ammend it?
Thanks