Connecting Tech Pros Worldwide Help | Site Map

Subtracting from lowest value

Newbie
 
Join Date: Feb 2009
Posts: 3
#1: Feb 20 '09
I have a table that has SeqID, BoxID, Sku, Qty. I have multiple boxes of the same item and want to subtract from the Qty with the lowest SeqID only. What are some examples of doing this?
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#2: Feb 20 '09

re: Subtracting from lowest value


Use MIN() to find which one has the lowest value. Then subtract it from there.

--CK
Reply


Similar Microsoft SQL Server bytes