Answered
Performing arithmitic in query. . .
I have an inventory page that pulls the following information
about an each item. . .
inv_id - PK
inv_item - The model number of the item
man_name - Manufacturer
inv_cost - Our cost of the item per unit
inv_price The price we sell the item for
inv_desc - Long description of the item
All that information gets pulled for each record that gets pulled. I want to display a column that will be titled "Margin".
The margin is the percent of profit we make off selling each unit, if the cost is $200, and the price is $349.99, then the margin would be 57.1%. You get the number in the following formula: Margin = Cost \ Price.
I want to calculate this amount for each record and put it into a column named "margin". The reason I want to calculate it before it pulls back to CF is because I want the users to be able to sort by margin.
Im not sure if this is even possible, especially in Access, but I will be switching to SQL server 2000 in about 2 weeks, so if you have a solution in either access or sql server 2000, please post it here. I have a dev version up of sql server to check to see if it works.
Thanks guys,
Mike
inv_id - PK
inv_item - The model number of the item
man_name - Manufacturer
inv_cost - Our cost of the item per unit
inv_price The price we sell the item for
inv_desc - Long description of the item
All that information gets pulled for each record that gets pulled. I want to display a column that will be titled "Margin".
The margin is the percent of profit we make off selling each unit, if the cost is $200, and the price is $349.99, then the margin would be 57.1%. You get the number in the following formula: Margin = Cost \ Price.
I want to calculate this amount for each record and put it into a column named "margin". The reason I want to calculate it before it pulls back to CF is because I want the users to be able to sort by margin.
Im not sure if this is even possible, especially in Access, but I will be switching to SQL server 2000 in about 2 weeks, so if you have a solution in either access or sql server 2000, please post it here. I have a dev version up of sql server to check to see if it works.
Thanks guys,
Mike
