Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
exec [dbo]._uspSetColumnDefaultValue 'StkItem','Qty_on_Hand','float','0'
exec [dbo]._uspSetColumnDefaultValue 'StkItem','ReservedQty','float','0'
exec [dbo]._uspSetColumnDefaultValue 'StkItem','QtyOnPO,'float','0'
Posted

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.
 
Share this answer
 
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!
:)
 
Share this answer
 
v2
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.
 
Share this answer
 

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


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900