August 13, 2002 at 1:39 pm
I have a parts table which maintains quantity levels per part.
If I want to update the quantity for a given part do I have to
1)T-SQL: SELECT val and load to a variable
2)whateverlang: do the math and finally
3)T-SQL:UPDATE tbl SET val.
Say this was displayed by a web scripting lang.
Is there a better way? There always is isn't there? Tell me how you'd do it if you want.
TIA
August 13, 2002 at 3:01 pm
What type of math? Require user input? an example might help.
If it's simple math, like value * .40, then I'd
update table
set colA = ColA *.4
where pk = xx
Steve Jones
August 13, 2002 at 3:44 pm
Thanks Steve. That's about as it easy as it gets.
Love this site.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply