Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: T-SQL
Posted by: Sascha Manns
Added: Apr 17, 2019 2:32 PM
Views: 13
Tags: no tags
  1. --select sum(Anteilpreis) as NettoAnteil,
  2. --Select sum(convert(Anteilspreis (varchar(20)))) as Nettoanteil
  3. select sum(cast(replace(Anteilpreis, ',', '.') as decimal(18,2))) as NettoAnteil,
  4. sum(cast(replace(Anteilpreis, ',', '.') as decimal(18,2)))*1.19 as BruttoAnteil,
  5. --sum(Anteilpreis)*1.19 as BruttoAnteil,
  6. sum(cast(replace(Anteilpreis, ',', '.') as decimal(18,2)))*0.19 as MwstAnteil,
  7. --sum(Anteilpreis)*0.19 as MwstAnteil,
  8. sum(cast(replace(Gesamtpreis, ',', '.') as decimal(18,2))) as NettoGesamt,
  9. --sum(Gesamtpreis) as NettoGesamt,
  10. cast((sum(cast(replace(Gesamtpreis, ',', '.') as decimal(18,2)))*1.19) as decimal(18,2)) as BruttoGesamt,
  11. --sum(Gesamtpreis)*1.19 as BruttoGesamt,
  12. cast((sum(cast(replace(Gesamtpreis, ',', '.') as decimal(18,2)))*0.19) as decimal(18,2)) as MwstGesamt
  13. --sum(Gesamtpreis)*0.19 as MwstGesamt
  14. --Round(cast(BruttoGesamt as decimal (18,2)),-3) as BruttoGesamt
  15. from tblbewertungminder
  16. where WENumber = '$state.vin'
  17.  
  18.  
  19.  
  20.