General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
Hi ,
I am also having same problem but its not because of the list , i am using a store proc below :
CREATE PROC dbo.testingloop
(
DECLARE @testid varchar(max)
)
AS
BEGIN
SET NOCOUNT ON
DECLARE @SQL varchar(600)
SET @testvalue = CURSOR FOR
SELECT [test ID]) FROM Data42 where [test ID] = 36
OPEN @testvalue
FETCH NEXT
FROM @testvalue INTO @testid
WHILE @@FETCH_STATUS = 0
BEGIN
' My update statement here
END
END
but i am getting error where there is a [test id] value 12345 - 5 , actually in Data42 table the type of [test id] is nvarchar and in my updating table is varchar , but i think the error is at line 'SET @testvalue = CURSOR FOR
My Error Message 'Conversion failed when converting the varchar value '12345-2' to data type int.'
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only