Author |
Topic |
smithmggc
Starting Member
3 Posts |
Posted - 2010-11-23 : 17:59:28
|
I have a table with a varchar(40) field. One of the records contains the value 'Select Benefit...' I can query the table w/o any problem.select *from carriersif I query a view that uses this table the query fails with the error;Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.I know how to deal with reserved words as table and field names using '[' and ']', but I don't see any way to resolve this.Anyone??Thanks! |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
smithmggc
Starting Member
3 Posts |
Posted - 2010-11-24 : 09:56:04
|
OK, this view is ~990 lines, I counted over 100 left joins. This is not my database. The field only appears to be used in the select statement, didn't see it in any of the joins.and this is how it appears in the select statement.SECCARR.Name AS Sec_Policy_Carrier_Name,I was going to create a simple view to see if I could not recreate the error. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-11-24 : 09:58:24
|
this doesnt have any problem. You need to at least post the portion of code which you feel the error is happening.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
smithmggc
Starting Member
3 Posts |
Posted - 2010-11-29 : 11:12:25
|
indeed the error does appear to be caused by some other problem in the database. It actually being caused by a subquery that returns more than one more than record.It was misleading for me because if I didn't select the field that contained the 'Select ...' data in it I didn't get that error.Thanks for all of the responses! |
 |
|
|