Issue occurs in sybase isql,
scenerio --
>create table a ( c1 integer,c2 integer); -SUCCESSFUL
>alter table a add c3 integer default 0; - SUCCESSFUL
>insert into a(c1,c2) values('1','2'); - SUCCESSFUL
>alter table CustCareConfig drop c3 - SUCCESSFUL
>alter table a add c3 integer default '0'; -SUCCESSFUL
> insert into a(c1,c2) values('3','4'); - Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query. --Error is throwing
The error can be explaioned more clearly in below sequence.
1> ALTER TABLE CustCareConfig Add TimeOut int DEFAULT '0'
2> go
(7 rows affected)
1> insert into CustCareConfig (OrganizationID,OrganizationName) values (22,"TEST2")
2> go
Msg 257, Level 16, State 1:
Server 'PPLE_SYB', Line 1:
Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query.
1> alter table CustCareConfig drop TimeOut
2> go
(7 rows affected)
1> ALTER TABLE CustCareConfig Add TimeOut int DEFAULT 0
2> go
(7 rows affected)
1> insert into CustCareConfig (OrganizationID,OrganizationName) values (22,"TEST2")
2> go
(1 row affected)
1>
The same issue will not occur when using oracle, so only issues exists in sybase isql.
Could you help me with some web links or else why the same issue working in oracle and not in sybase.
Also suggest the way farward and in your inputs here..