i have two table in sql serever with no relation 1-rate table 2-jewellry tabale rate table hold diffrent rate for example usd , gold , platinume and jewellry table use holds jewellry item , and total price of each item is calculated real time based on rate value from rate table .
price field in jewellry table is computed column and has its own business rule , but in end it should use a value in rate table to complete the rule , for example gold rate in rate table*weight(jewellry table)*tax(rate table ).
how can i achive this in sql server ? store procedure ? function ? i dont want to use any client side because i want to export table via wcf as odata .
You can achieve this by creating a user-defined function that does the calculation that you want.
The computed column can then be set using the UDF.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments