- 论坛徽章:
- 0
|
本帖最后由 zxp19821005 于 2012-05-14 17:25 编辑
tcc表中, dir、downtilt_electr和ANT_total_under_ANGLE等字段为float型。
1、执行以下语句时
update tcc set dir =convert(float,45),downtilt_electr =convert(float,4),ANT_total_under_ANGLE =convert(float,4)
提示:
Number (257) Severity (16) State (1) Server (BOCODT) Implicit conversion from datatype 'FLOAT' to 'VARCHAR' is not allowed. Use the CONVERT function to run this query.
2、执行以下语句时
update tcc set dir =45,downtilt_electr =4,ANT_total_under_ANGLE =4
提示:
Number (257) Severity (16) State (1) Server (BOCODT) Implicit conversion from datatype 'INT' to 'VARCHAR' is not allowed. Use the CONVERT function to run this query.
3、执行以下语句时
update tcc set dir =cast(45 as float),downtilt_electr =cast(4 as float),ANT_total_under_ANGLE =cast(4 as float)
提示:
Number (257) Severity (16) State (1) Server (BOCODT) Implicit conversion from datatype 'FLOAT' to 'VARCHAR' is not allowed. Use the CONVERT function to run this query.
请问各位大虾,我该如何写这个语句? |
|