Trường hợp này xãy ra do kiểu Float của cột Dongia,hoac soluong,phatsinh trong bảng PS_Chitiet. cach xử lý như sau:
- ban đầu thử cột đơn giá bằng câu lệnh sau: alter table ps_Chitiet alter column dongia varchar(50)
select sophieu,dongia from PS_Chitiet where isnumeric(dongia)=0 and dongia is not null
update PS_Chitiet set dongia=0 where isnumeric(dongia)=0 and dongia is not null
alter table ps_Chitiet alter column dongia float
alter table ps_Chitiet alter column dongia numeric(24,4)
Kế tiếp là thử cho các cột còn lại tương tự.
- ban đầu thử cột đơn giá bằng câu lệnh sau: alter table ps_Chitiet alter column dongia varchar(50)
select sophieu,dongia from PS_Chitiet where isnumeric(dongia)=0 and dongia is not null
update PS_Chitiet set dongia=0 where isnumeric(dongia)=0 and dongia is not null
alter table ps_Chitiet alter column dongia float
alter table ps_Chitiet alter column dongia numeric(24,4)
Kế tiếp là thử cho các cột còn lại tương tự.