下面存储过程,定义游标,哪里的错?提示“参数数据类型 varchar 对于 convert 函数的参数 3 无效。”
declareCurOutCursorforselectCONVERT(int,substring(LOG_TIME,1,2))hho,CONVERT(int,subst...
declare CurOut Cursor for select CONVERT(int,substring(LOG_TIME,1,2))hho,CONVERT(int,substring(LOG_TIME,4,2)) mmo,CONVERT(int,substring(LOG_TIME,7,2)) sso,
MODULE_NAME,INPUT_TIME from LOG_LICENCEDATA
where INPUT_TIME between CONVERT(DATETIME, @Today,'yyyy-MM-dd') and CONVERT(DATETIME, @endtime,'yyyy-MM-dd')
and USER_NAME=@nameuser and USER_COPMUTER=@usercomputer and LICENCE_SERVER=@licenceserver and (USER_ACTION like '%OUT%' or USER_ACTION like '%logout%') order by INPUT_TIME asc; 展开
MODULE_NAME,INPUT_TIME from LOG_LICENCEDATA
where INPUT_TIME between CONVERT(DATETIME, @Today,'yyyy-MM-dd') and CONVERT(DATETIME, @endtime,'yyyy-MM-dd')
and USER_NAME=@nameuser and USER_COPMUTER=@usercomputer and LICENCE_SERVER=@licenceserver and (USER_ACTION like '%OUT%' or USER_ACTION like '%logout%') order by INPUT_TIME asc; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询