Hey guys. I'm very new to SQL. I bought a Groupon training program for $50 which includes training for 70-461 through 70-465. Anyway syntax problems below. Thanks!In this first one, I'm trying to use my first created column "taxes" to calculate the second column "totalcost". However, it says the following: "Cannot convert a char value to money. The char value has incorrect syntax." SELECT ProductType, price, 'taxes' = CASE WHEN price <$10.00 then price*.05 WHEN price >= $10.00 then Price*.10 Else price*.05 END,'TotalCost' = CASE WHEN price <$10.00 then price+'taxes' WHEN price >= $10.00 then price+'taxes' Else price+'taxes' END From AnimeGoods
In this second one, it's saying "Invalid column name 'totalprice'."I think I'm having problems using calculated columns to create other calculated columns. I'm sorry I'm very new but thank you very much!SELECT Producttype, price, 'discount' = CASE WHEN price >$15.00 then price*.20 else 0 END,'TotalPrice' = CASE WHEN price >$15.00 then price-(price*.20) else price end,'PercentofOriginal' = CASE WHEN price>totalprice then totalprice/price else 1005 ENDFROM Animegoods