从数据类型varbinary到日期SQL服务器的隐式转换(Implicit conversion from data type varbinary to date SQL server)
我有一个过程,它将date值作为参数,然后在表中插入日期值:
CREATE PROCEDURE dbo.procInsert @employed_on DATE AS BEGIN INSERT INTO dbo.TBL(EMPLOYED_ON) VALUES(@employed_on) END但是我收到这个错误:
不允许从数据类型varbinary到日期的隐式转换。 使用CONVERT函数运行此查询。
我试图使用convert但它不工作。
更新我发现了我的错误。 我把变量换成了插入。
I have a procedure which takes a date value as parameter and then inserts the date value in a table:
CREATE PROCEDURE dbo.procInsert @employed_on DATE AS BEGIN INSERT INTO dbo.TBL(EMPLOYED_ON) VALUES(@employed_on) ENDhowever i am getting this error:
Implicit conversion from data type varbinary to date is not allowed. Use the CONVERT function to run this query.
I tried to use convert but its not working.
UPDATE i found my mistake. i swapped the variables for insert.
最满意答案
我发现了我的错误。 我把变量换成了插入。
i found my mistake. i swapped the variables for insert.
更多推荐
发布评论