Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error MSG 245 !! Solution Needed Urgently

Status
Not open for further replies.

pgthyagu

Technical User
May 27, 2002
9
IN
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 ?
 
Yo converted the column to varchar and are comapring it to a integer. Change the 2 to '2' in the where clause. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top