Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there, i have my data table in the format

Id   Name   score  value
1     x        50   1
2     y        20   3
3     z        36   5


I want to generate a query with a sql query designer that look like

Id   Name   score  value  Product
1     x        50   1       50
2     y        20   3       60
3     z        36   5       180


Where product is score*value

How can i achieve this?
Thanks in advance

Your Martin

[edit]Code blocks added - OriginalGriff[/edit]
Posted
Updated 29-Jul-11 22:40pm
v2

1 solution

SQL
SELECT Id, Name, score, value, (score * value) AS Product FROM myTable
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900