Click here to Skip to main content
12,508,014 members (46,971 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++
exec [dbo]._uspSetColumnDefaultValue 'StkItem','Qty_on_Hand','float','0'
exec [dbo]._uspSetColumnDefaultValue 'StkItem','ReservedQty','float','0'
exec [dbo]._uspSetColumnDefaultValue 'StkItem','QtyOnPO,'float','0'
Posted 24-Sep-12 22:59pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Check your sp.
There might be one subquery which returns more then one value.
when you are using =,<=,>=,!= operator on subquery then that subquery must return single value or else use In or Not In clause.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

check sub-query it's returning more than one value,

Check filtering conditions of sub-query because after filtration it should return one value not multiple.
Use top 1 or distinct in your sub-query

Happy Coding!
:)
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Check the subquery. You have many options.
1. Use in instead of =, not in instead of != and so on.
2. Use grouping like sum/count/avg/max/min/first
3. Use distinct or group by
4. Find the error in the subquery and correct it to return exactly one value.

I would say you'd rather have to check option 4. When a query returns more than one value in place where you need exactly one, means your query is not correct, and avoid options 1/2/3 unless this is exactly that you need.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160927.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100