Click here to Skip to main content
Rate this: bad
good
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!
Smile | :)
  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
0 OriginalGriff 328
1 Gihan Liyanage 292
2 Sergey Alexandrovich Kryukov 275
3 ClimerChinna 222
4 Abhinav S 187
0 Sergey Alexandrovich Kryukov 8,213
1 OriginalGriff 7,089
2 CPallini 2,598
3 Richard MacCutchan 1,925
4 Abhinav S 1,778


Advertise | Privacy | Mobile
Web02 | 2.8.140826.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
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