Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
PoseyRobert
Starting Member
27 Posts |
Posted - 2015-01-07 : 15:36:07
|
HiI have a temp table that I would like to only display the Qty of 4 one timeThe total Qty is 4Part Fac Loc Lot Qty===== === === === ===8793 07 FG 111 48793 07 FG 122 48793 07 FG 113 48793 07 FG 144 4I want to display Qty 4 so when I do a sum I do not get qTY 16Part Fac Loc Lot Qty===== === === === ===8793 07 FG 111 48793 07 FG 122 08793 07 FG 113 08793 07 FG 144 0 |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-07 : 15:42:15
|
Simplistic, but:select Part, Fac, Lot , case when Lot = 111 then Qty else 0 end as Qty... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2015-01-08 : 01:42:05
|
What if your data is Part Fac Loc Lot Qty===== === === === ===8793 07 FG 111 48793 07 FG 122 38793 07 FG 113 38793 07 FG 144 4MadhivananFailing to plan is Planning to fail |
|
|
|
|
|