SQL存储过程日期定义问题
USE [HC_sql]
GO
/****** 对象: StoredProcedure [dbo].[Access_join_ru] 脚本日期: 08/31/2013 17:08:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[Access_join_ru]
@join_type nvarchar(50), --类型
@join_site nvarchar(50),--地点
@join_department nvarchar(50),--部门
@join_article nvarchar(50),--物品
@join_personnel nvarchar(50),--人员
@join_credentials nvarchar(50),--证件号
@join_content nvarchar(50),--访问内容
@join_date datetime,--日期datetime
@join_img nvarchar(50),--图片地址
@join_card nvarchar(50),--身份证号码
@join_PO nvarchar(50),--PO
@join_Name nvarchar(50),--姓名
@join_supplier nvarchar(50),--供应商
@card_PO nvarchar(50),
@lblID_card nvarchar(50),--身份
@lblID_Name nvarchar(50),--姓名
@lblID_Nation nvarchar(50),--名族
@lblID_Sex nvarchar(50),--性别
@lblID_Birth nvarchar(50),--出生日期
@lblID_Addr nvarchar(50),--住址
@lblID_Depart nvarchar(50),--发证机关
@lblID_Time datetime,--有效期
@lblID_img nvarchar(50),--图片地址
@rtn_join int output --返回值
as
begin transaction
INSERT INTO Access_join(Access_join_type,
Access_join_site,
Access_join_department,
Access_join_article,
Access_join_personnel,
Access_join_credentials,
Access_join_content,
Access_join_date,
Access_join_img,
Access_join_card,
Access_join_PO,
Access_join_Name,
Access_join_supplier
)VALUES(@join_type,
@join_site,
@join_department,
@join_article,
@join_personnel,
@join_credentials,
@join_content,
@join_date,
@join_img,
@join_card,
@join_PO,
@join_Name,
@join_supplier)
INSERT INTOId_card (ID_PO,
ID_card,
ID_Name,
ID_Nation,
ID_Sex,
ID_Birth,
ID_Addr,
ID_Depart,
ID_Time,
ID_img
)VALUES (@card_PO,
@lblID_card,
@lblID_Name,
@lblID_Nation,
@lblID_Sex,
@lblID_Birth,
@lblID_Addr,
@lblID_Depart,
@lblID_Time,
@lblID_img)
if @@error <> 0
begin
rollback transaction
set @rtn_join = 0
return
end
commit transaction
set @rtn_join = 1
exec [Access_join_ru] '面试','','人力资源部','','VO01','面试','2013-08-21','D:\123\jld.com','430321199002113711','hc2013082101','张震',
'','hc2013082101','430321199002113711','张震','汉族','男','2019-01-02','湖南','华南','2013.08.09-2017.08.09','D:\123\jld.com',''