A SELECT statement that assigns a value to a variable must not be combined with data-retrieval opera
2013-08-02 11:37
519 查看
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
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 ... (向变量赋值的 SELECT 语句不能与数据检索操作结合使用 )
- could not be set to a 'string' value. You must set this property to a non-null value of type
- tomcat 7 WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
- WCF分布式开发常见错误(23):This could be due to the fact that the server certificate is not configured properly with HTTP.SYS
- This is probably a good time to review the order in which SELECT statement clauses are to be specified. Table 10.2 lists all the clauses we have learned thus far, in the order they must be used.
- The environment variable JAVA_HOME(with the value of xxx) does not point to a valid JVM installation
- IllegalArgumentException: Argument for @NotNull parameter 'file' of com/intellij/openapi/vfs/VfsUtilCore.virtualToIoFile must not be null
- Neo4j查询报错:Unable to load NODE with id 或者 Neo.ClientError.Statement.EntityNotFound
- The function equals must be used with a prefix when a default namespace is not specified解决
- No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/tx_search_friend
- ORA-01439: column to be modified must be empty to change datatype
- error C4996: Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct
- Attribute value is quoted with " which must be escaped when used within the value 问题解决
- void value not ignored as it ought to be
- Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model.
- 解决:void value not ignored as it ought to be
- There is already an open DataReader associated with this Connection which must be closed first
- Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.
- The function getXX must be used with a prefix when a default namespace is not specified