My SQL Server Database (SQL 2000) Sort Order is :
--------------------------------------
Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data
I Create a table and run the following statement
-------------------------------------------------
create table a2(num INT)
INSERT INTO A2 VALUES(1)
insert into a2 values(2)
alter table a2 alter column num varchar(2)
insert into a2 values('B')
insert into a2 values(2)
select * from a2 where num = 2
The Select Statement gives me the the following Error :
--------------------------------------------------------
Syntax error converting the varchar value 'B' to a column of data type int.
What is the reason and what is the solution ?
--------------------------------------
Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data
I Create a table and run the following statement
-------------------------------------------------
create table a2(num INT)
INSERT INTO A2 VALUES(1)
insert into a2 values(2)
alter table a2 alter column num varchar(2)
insert into a2 values('B')
insert into a2 values(2)
select * from a2 where num = 2
The Select Statement gives me the the following Error :
--------------------------------------------------------
Syntax error converting the varchar value 'B' to a column of data type int.
What is the reason and what is the solution ?