mssql出错:A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
来源:互联网 发布:乐视网络电视下载安卓 编辑:程序博客网 时间:2024/05/29 13:42
今天执行下列语句的时候报错,在网上找了半天也没找到原因。最后还是自己找到原因了。
Declare @START_STATUS varchar(200)
Declare @FINISH_STATUS varchar(200)
select top 1 @START_STATUS=sws.name,@FINISH_STATUS=fws.name fcc.time_type from
projectcenter.time_field_calculate_config fcc inner join projectcenter.workflow_status sws on
fcc.start_status_id= sws.id inner join projectcenter.workflow_status fws on fcc.finish_status_id= fws.id
where project_group_id=@proj_group_id and auser_id=@user_id
Msg 141, Level 15, State 1, Line 18
A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
看这句语句大家就明白了吧。就这样解决了
Declare @FIRST_DATE datetime
Declare @SECOND_DATE datetime
Declare @START_STATUS varchar(200)
Declare @FINISH_STATUS varchar(200)
Declare @TIME_TYPE varchar(200)
select top 1 @START_STATUS=sws.name,@FINISH_STATUS=fws.name,@TIME_TYPE=fcc.time_type from
projectcenter.time_field_calculate_config fcc inner join projectcenter.workflow_status sws on
fcc.start_status_id= sws.id inner join projectcenter.workflow_status fws on fcc.finish_status_id= fws.id
where project_group_id=@proj_group_id and auser_id=@user_id
- mssql出错:A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
- A SELECT statement that assigns a value to a variable must not be combined with data-retrieval opera
- A SELECT statement that assigns a value to a variable must ... (向变量赋值的 SELECT 语句不能与数据检索操作结合使用 )
- could not be set to a 'string' value. You must set this property to a non-null value of type
- To Be a Coder or Not, That's a Question!
- to be or not to be, that is a question...
- To be or not to be that is a question
- the environment variable java_home (with the value of ) does not point to a valid jvm installation
- The "data" option should be a function that returns a per-instance value in component definitions.
- To be a Great Programmer, you must admit that you are a Terrible Programmer
- The environment variable JAVA_HOME(with the value of xxx) does not point to a valid JVM installation
- “The left-hand side of an assignment must be a variable” problem with charAt
- The function default must be used with a prefix when a default namespace is not specified
- The function getXX must be used with a prefix when a default namespace is not specified
- The function size must be used with a prefix when a default namespace is not specified
- The function equals must be used with a prefix when a default namespace is not specified
- The function size must be used with a prefix when a default namespace is not specified
- render() must be called with a dict, not a Context. return HttpResponse(t.render(c))解决
- vector 和list
- getSession()与getHibernateTemplate()区别
- bytecode操作
- 开发自己的类加载器_文件系统类加载器
- Web编程是函数式编程
- mssql出错:A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
- 年终了,为这一年留下点东西吧
- filter-mapping顺序
- hibernate 批量操作
- 【转】GTY(())的内部
- WF-异常捕获与补偿的应用说明
- JSF2自定义组件编程系列 第四部分
- C语言中测试程序运行时间
- 审计