Aaron Ingold
SSCrazy Eights
Points: 9070
More actions
July 11, 2006 at 2:51 pm
#648586
Why use EXEC()?
DECLARE @price DECIMAL
, @vat DECIMAL
, @total DECIMAL
SET @vat = 0.1
SET @price = 10
SET @formula = @vat * @price
Felipe Maurer
SSC Enthusiast
Points: 162
July 11, 2006 at 3:02 pm
#648591
Because the formula will be passed as a parameter, since it will be stored in a field in a table and different formulas will be applied to different situations.
Sergiy
SSC Guru
Points: 110209
July 11, 2006 at 3:32 pm
#648597
Check out sp_executesql in BOL.
_____________Code for TallyGenerator
July 11, 2006 at 3:43 pm
#648598
Thx
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply