设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1319|回复: 1
打印 上一主题 下一主题

[求助]請問一下,下面這條語句錯從何來?

[复制链接]
跳转到指定楼层
1#
发表于 2002-10-8 22:04:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
/*
alter procedure  usp_qry_deficiency (@my_year as smallint,@my_month as smallint,@wage_pay_deficiency as money output)
as   
     select @wage_pay_deficiency = ((select sum(wage_sum)  from wage where wage_date_year =@my_year and wage_date_month = @my_month) -(select sum(wage_sum)  from wage where wage_date_year = @my_year and wage_date_month = @my_month and wage_pay = 1))
*/
SQL服務通過沒問題,但
declare @my_def as money
exec usp_qry_deficiency @my_year = 2002,@my_month = 8,@my_def output
select @my_def
執行時出錯如下:
Server: Msg 119, Level 15, State 1, Line 14
Must pass parameter number 3 and subsequent parameters as '@name = value'. After the form '@name = value' has been used, all subsequent parameters must be passed in the form '@name = value'.
真不明,我以前都是這樣搞的,都沒出過錯,但今天真奇怪。請各位診斷一下,多謝!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2002-10-8 22:09:00 | 只看该作者
CALL,原因很簡單
原來 exec usp_qry_deficiency @my_year = 2002,@my_month = 8,@my_def output
改為這樣的形式即可exec usp_qry_deficiency 2002, 8,@my_def output
今不知微軟搞什麼鬼的,偏偏在輸出參數上有些改變。不注意用戶的使用習慣。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-6-8 13:25 , Processed in 0.318509 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表