Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chiragvm
Yak Posting Veteran
65 Posts |
Posted - 2006-06-09 : 02:14:49
|
SELECT PARAMETER.CurrentUse, PARAMETER_1.CurrentUse AS Expr1, PARAMETER_2.CurrentUse AS Expr2FROM PARAMETER INNER JOIN PARAMETER PARAMETER_1 ON PARAMETER.ServerName = PARAMETER_1.ServerName AND PARAMETER.Device_id = PARAMETER_1.Device_id AND PARAMETER.AGENT_ID = PARAMETER_1.AGENT_ID INNER JOIN PARAMETER PARAMETER_2 ON PARAMETER.ServerName = PARAMETER_2.ServerName AND PARAMETER.Device_id = PARAMETER_2.Device_id AND PARAMETER.AGENT_ID = PARAMETER_2.AGENT_IDWHERE (PARAMETER.ServerName = 'SUN') AND (PARAMETER.AGENT_ID = '007365-1878') AND (PARAMETER.CurrentUse = (SELECT currentuse FROM parameter WHERE parameter.TimeStamps = CONVERT(DATETIME, '2006-05-01 18:29:36', 102))) AND (PARAMETER_1.CurrentUse = (SELECT currentuse FROM parameter WHERE parameter.TimeStamps = CONVERT(DATETIME, '2006-05-01 18:34:51', 102))) AND (PARAMETER_2.CurrentUse = (SELECT currentuse FROM parameter WHERE parameter.TimeStamps = CONVERT(DATETIME, '2006-05-01 18:40:04', 102)))WHEN I RUN THIS QUERY ERROR IS Server: Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-06-09 : 02:37:28
|
execute the subqueries you used in the where clause,like what the error message is saying, you cannot equatexvalue=recordset value, should be 1 is to 1... make sure that the subqueries return only 1 values otherwise, you may want to use IN insted of =--------------------keeping it simple... |
|
|
|
|
|
|
|