转换在sql中失败 [英] conversion getting failed in sql
本文介绍了转换在sql中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的表名联系人
Here is my table name contacts
Column name Datatype (? tree view tickboxes ?(RD sp))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
contacttypedetailid int Unchecked
contactid char(6) Checked
contacttypecode char(3) Checked
Applicable char(1) Checked
TargetAmount decimal(18, 0) Checked
查询:
The query:
select * from contacts
输出:
output:
contacttypedetailid contactid contacttypecode Applicable TargetAmount
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 1 01 T 0
2 1 02 T 0
3 2 01 T 0
while(删除)运行程序,我收到错误。
(删除程序):
while ("deleting") running procedure, I am getting error.
(The Deleting Procedure):
create PROCEDURE [dbo].[SP_DeleteContacttypeDetail]
@contactid as int
AS
BEGIN
Delete from contacttypedetail where contactid=@contactid
END
这里执行这些程序时出现错误。
Here while executing these procedure am getting error.
推荐答案
更改您的查询,如下所示
Change your query as shown below
SELECT * FROM contacts WHERE contactid = '1'
根据您的表定义contactid是一个字符串字段。
问候,
As per your table definition contactid is a string field.
Regards,
这篇关于转换在sql中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文