社区
MS-SQL Server
帖子详情
初学sqlserver问一个存储过程的问题
musicfree_uibe
2003-12-26 02:50:53
存储过程中有参数为datetime和bit类型的,请问怎么调用这个存储过程呢?
我写
exec proc_name 2002-10-10,1
好像不行唉:(请帮帮忙!!!谢谢
...全文
72
12
打赏
收藏
初学sqlserver问一个存储过程的问题
存储过程中有参数为datetime和bit类型的,请问怎么调用这个存储过程呢? 我写 exec proc_name 2002-10-10,1 好像不行唉:(请帮帮忙!!!谢谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
12 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zjcxc
元老
2003-12-26
打赏
举报
回复
exec FB_PrcInsertStudentProfile 1,2,'3','4'
,5,6,'7',8,9
,'10',11,12,'13',14
,1,'2002-10-10'
,1,'1818','19',1
,'20','21'
,'1999-01-01' --这里原来与下面的交换了.
,'22'
,'24','25','26',27
,'28','29','30','31','32','33',34
,'35','36','37','38','39','40','41'
musicfree_uibe
2003-12-26
打赏
举报
回复
解决!谢谢!
wzh1215
2003-12-26
打赏
举报
回复
'1999-01-01'
写错了位置,仔细检查一下!
erigido
2003-12-26
打赏
举报
回复
'2002-10-10'
写错位置了。
musicfree_uibe
2003-12-26
打赏
举报
回复
贴错了存储过程应该是:
create procedure FB_PrcInsertStudentProfile
@RS_learningCenter integer,
@RS_batch integer,
@RS_signUpMethod nchar(20),
@RS_signUpSchool1 nchar(80),
@RS_signUpSchool1Major1 integer,
@RS_signUpSchool1Major2 integer,
@RS_signUpSchool2 nchar(80),
@RS_signUpSchool2Major1 integer,
@RS_signUpSchool2Major2 integer,
@RS_signUpSchool3 nchar(80),
@RS_signUpSchool3Major1 integer,
@RS_signUpSchool3Major2 integer,
@RS_signUpRemark nchar(400),
@RS_addType integer,
@RS_preparatory bit,
@RS_preparatoryTime datetime,
@RS_additionTest bit,
@RS_photo nchar(50),
@RS_name nchar(20),
@RS_gender bit,
@RS_folk nchar(10),
@RS_political nchar(14),
@RS_birthday datetime,
@RS_level nchar(8),
@RS_cardType char(10),
@RS_cardID nchar(30),
@RS_huKou nchar(16),
@RS_provience integer,
@RS_city nchar(20),
@RS_address nchar(80),
@RS_zip char(6),
@RS_nativePlace nchar(40),
@RS_email nchar(30),
@RS_tel nchar(20),
@RS_mobile integer,
@RS_job nchar(20),
@RS_company nchar(30),
@RS_foreignLanguage nchar(16),
@RS_postSchool nchar(80),
@RS_postMajor nchar(20),
@RS_certificateID nchar(20),
@RS_eduRemark nchar(200)
as
insert into FB_OrecruitStudents
values
(
@RS_learningCenter,
@RS_batch,
@RS_signUpMethod,
@RS_signUpSchool1,
@RS_signUpSchool1Major1,
@RS_signUpSchool1Major2,
@RS_signUpSchool2,
@RS_signUpSchool2Major1,
@RS_signUpSchool2Major2,
@RS_signUpSchool3,
@RS_signUpSchool3Major1,
@RS_signUpSchool3Major2,
@RS_signUpRemark,
@RS_addType,
@RS_preparatory,
@RS_preparatoryTime,
@RS_additionTest,
@RS_photo,
@RS_name,
@RS_gender,
@RS_folk,
@RS_political,
@RS_birthday,
@RS_level,
@RS_cardType,
@RS_cardID,
@RS_huKou,
@RS_provience,
@RS_city,
@RS_address,
@RS_zip,
@RS_nativePlace,
@RS_email,
@RS_tel,
@RS_mobile,
@RS_job,
@RS_company,
@RS_foreignLanguage,
@RS_postSchool,
@RS_postMajor,
@RS_certificateID,
@RS_eduRemark
);
erigido
2003-12-26
打赏
举报
回复
exec proc_name '2002-10-10',1
这样就可以了,出现什么问题了?
musicfree_uibe
2003-12-26
打赏
举报
回复
测试时我用:
exec FB_PrcInsertStudentProfile 1,2,'3','4',5,6,'7',8,9,'10',11,12,'13',14,1,'2002-10-10',1,'1818','19',1,'20','21','22','1999-01-01','24','25','26',27,'28','29','30','31','32','33',34,'35','36','37','38','39','40','41'
总是抱错:
服务器: 消息 8114,级别 16,状态 4,过程 FB_PrcInsertStudentProfile,行 0
将数据类型 varchar 转换为 datetime 时出错。
zjcxc
元老
2003-12-26
打赏
举报
回复
exec proc_name '2002-10-10',1
musicfree_uibe
2003-12-26
打赏
举报
回复
create procedure FB_PrcInsertStudentProfile
@RS_ID INTEGER,
@RS_learningCenter integer,
@RS_batch integer,
@RS_signUpMethod nchar(20),
@RS_signUpSchool1 nchar(80),
@RS_signUpSchool1Major1 integer,
@RS_signUpSchool1Major2 integer,
@RS_signUpSchool2 nchar(80),
@RS_signUpSchool2Major1 integer,
@RS_signUpSchool2Major2 integer,
@RS_signUpSchool3 nchar(80),
@RS_signUpSchool3Major1 integer,
@RS_signUpSchool3Major2 integer,
@RS_signUpRemark nchar(400),
@RS_addType integer,
@RS_preparatory bit,
@RS_preparatoryTime datetime,
@RS_additionTest bit,
@RS_photo nchar(50),
@RS_name nchar(20),
@RS_gender bit,
@RS_folk nchar(10),
@RS_political nchar(14),
@RS_birthday datetime,
@RS_level nchar(8),
@RS_cardType char(10),
@RS_cardID nchar(30),
@RS_huKou nchar(16),
@RS_provience integer,
@RS_city nchar(20),
@RS_address nchar(80),
@RS_zip char(6),
@RS_nativePlace nchar(40),
@RS_email nchar(30),
@RS_tel nchar(20),
@RS_mobile integer,
@RS_job nchar(20),
@RS_company nchar(30),
@RS_foreignLanguage nchar(16),
@RS_postSchool nchar(80),
@RS_postMajor nchar(20),
@RS_certificateID nchar(20),
@RS_eduRemark nchar(200)
as
insert into FB_OrecruitStudents
values
(
@RS_ID,
@RS_learningCenter,
@RS_batch,
@RS_signUpMethod,
@RS_signUpSchool1,
@RS_signUpSchool1Major1,
@RS_signUpSchool1Major2,
@RS_signUpSchool2,
@RS_signUpSchool2Major1,
@RS_signUpSchool2Major2,
@RS_signUpSchool3,
@RS_signUpSchool3Major1,
@RS_signUpSchool3Major2,
@RS_signUpRemark,
@RS_addType,
@RS_preparatory,
@RS_preparatoryTime,
@RS_additionTest,
@RS_photo,
@RS_name,
@RS_gender,
@RS_folk,
@RS_political,
@RS_birthday,
@RS_level,
@RS_cardType,
@RS_cardID,
@RS_huKou,
@RS_provience,
@RS_city,
@RS_address,
@RS_zip,
@RS_nativePlace,
@RS_email,
@RS_tel,
@RS_mobile,
@RS_job,
@RS_company,
@RS_foreignLanguage,
@RS_postSchool,
@RS_postMajor,
@RS_certificateID,
@RS_eduRemark
);
musicfree_uibe
2003-12-26
打赏
举报
回复
奇怪了:(我把我的代码贴出来吧:(
txlicenhe
2003-12-26
打赏
举报
回复
exec proc_name '2002-10-10',1
wzh1215
2003-12-26
打赏
举报
回复
exec proc_name '2002-10-10',1
SqlServer
存储过程
及调试指南
详细介绍了
SqlServer
的
存储过程
调试方法,适合
初学
者及想深入研究的开发人员
SQL server
存储过程
习题,SQL触发器习题.rar
SQL
存储过程
习题,SQL触发器习题,SQL习题,基础语法,与W3School类似,
初学
者学习使用。
sql Server 2005
存储过程
视频
sql Server 2005
存储过程
视频,对于
初学
者很有帮助
SQL server 2005
存储过程
100个实例
SQL server 2005
存储过程
100个实例,帮助
初学
者更快的掌握sql server的
存储过程
编程
java源码包---java 源码 大量 实例
在有状态SessionBean中,用累加器,以对话状态存储起来,创建EJB对象,并将当前的计数器初始化,调用每
一个
EJB对象的count()方法,保证Bean正常被激活和钝化,EJB对象是用完毕,从内存中清除…… Java Socket 聊天...
MS-SQL Server
34,594
社区成员
254,589
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章