I have a user who is working with a new manufacturing SCADA platform. He has a simple table with the following design:
Column Name DataType AllowNulls identkey (PK) INT NO Move INT YES Wind FLOAT YES Traverse FLOAT YES
This is the T-SQL DDL for the table:
CREATE TABLE dbo.tbl_Rv8WindProfile ( identkey int IDENTITY(1,1) NOT NULL , [Move] int NULL , Wind float NULL , Traverse float NULL , CONSTRAINT PK_tbl_Rv8WindProfile PRIMARY KEY CLUSTERED ( identkey ASC ) WITH ( PAD_INDEX = OFF , STATISTICS_NORECOMPUTE = OFF , IGNORE_DUP_KEY = OFF , ALLOW_ROW_LOCKS = ON , ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY] ) ON [PRIMARY]; GO
He currently has only 5 rows of data in the table. In the past, he has right-clicked and selected EDIT TOP 200 ROWS and manually changed the value of the column "Move" by entering an integer via the numeric keypad on his keyboard. It has worked (as he says) for years.
In the past few weeks, he has been getting an error which reads:
No row was updated.
The data in row 5 was not committed.
Error Source .Net SQLClient Data Provider.
Error Message: Conversion failed when converting the varchar value 'Move' to data type int.
Correct the errors and retry or press ESC to cancel the change(s).
If I edit the data using this SQL:
UPDATE dbo.tbl_xyzProfile SET [move] = 4 WHERE [identkey] = 5
the data is updated.
If I use this query (with a character instead of an
UPDATE dbo.tbl_Rv8WindProfile SET [move] = '5' WHERE [identkey] = 5
It recognizes the conversion and it still works.
Things I've checked so far:
- I've double-checked and it does not appear that
MOVEis a reserved word.
- It doesn't appear that he has updated his Microsoft SQL Server install in the past few weeks.
- It works in some tables for him, but not others and I cannot see any pattern which would explain why.
He is editing the integer data in column named
MOVE. In the example shown here, he is trying to change row 4 (identkey = 4) from a integer value of 4 to 6.
I created the table in another database and replicated the data. It also gave me the same error. Then I renamed the column
MoveZ and immediately, it let me modify the integers through the EDIT TOP 200 ROWS option.
I did look at the T-SQL reserved words, ODBC reserved words, Future reserved words and C# reserved words and
MOVE doesn't appear on any of the lists. I don't find it on any .NET reserved words list either.