## Applying rate increase to column value

 Author Message edppalms Forum Newbie Group: General Forum Members Points: 3 Visits: 5 I need to take salary and add a 10 percent increase to it and display the resultsWill something like this work?SELECT *Salary, ROUND( (Salary * .1), 2) PercentageFROM Employee.tbl MyDoggieJessie One Orange Chip Group: General Forum Members Points: 26800 Visits: 7488 Yep, or you can add it to the base amount like so:SELECT 58261.21, ROUND((58261.21 * .1), 2), ROUND((58261.21 * 1.1), 2) ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience edppalms Forum Newbie Group: General Forum Members Points: 3 Visits: 5 I keep getting MSG 102 Syntax error Near 'salary'. I am trying to calculate a 10 percent raise based on salary from the Employee table.SELECT *Salary, ROUND( (Salary * .1), 2) AS RaiseFROM Employee.TblThanks for any help,Ed MyDoggieJessie One Orange Chip Group: General Forum Members Points: 26800 Visits: 7488 You can't alias the "*"You need a comma after the star, like so: `DECLARE @Employee TABLE (FullName varchar(10), Salary money) INSERT INTO @Employee SELECT 'John Doe', 85000 UNION ALL SELECT 'Jane Doe', 87244 UNION ALL SELECT 'John Doe', 77854 UNION ALL SELECT 'John Doe', 94875 SELECT *, ROUND( (Salary * .1), 2) AS RaiseFROM @Employee` You should always write out the columns names wherever possible and refrain from using "*" when possible.Ex:`DECLARE @Employee TABLE (FullName varchar(50), Salary money) INSERT INTO @Employee SELECT 'John Doe', 85000 UNION ALL SELECT 'Jane Doe', 87244 UNION ALL SELECT 'Tim McGraw', 77854 UNION ALL SELECT 'Arnold Stumph', 94875 SELECT FullName [LuckyBa\$tard], Salary, ROUND( (Salary * .1), 2) AS RaiseFROM @Employee` ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience edppalms Forum Newbie Group: General Forum Members Points: 3 Visits: 5 Thanks....Works like a charm.Luck Bastard got his raise.THXNewb MyDoggieJessie One Orange Chip Group: General Forum Members Points: 26800 Visits: 7488 Awesome, he'll be very happy on Monday :-) ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience