faizan ahmad

Usually the things which were not a straight Google

  Home  |   Contact  |   Syndication    |   Login
  17 Posts | 0 Stories | 68 Comments | 0 Trackbacks

News

Archives

Post Categories

.NET

ASP.NET

February 2009 Entries

"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression" As the error message suggests , this normally occurs when you are assigning a T-SQL variable a value within sql query and the query is returning more that one rows e.g. Declare @var1 nvarchar(50) ' select @var1=name from table1' Putting 'top 1' can resolve the problem in many cases ( do check the business logic aspects): ' select top ......