Adam Runtime Posted June 7, 2004 Posted June 7, 2004 Hi I have a calculation for a Cost field I need to do... I need to make sure only the relevant fields are used from other tables, so i need something like this: sum ( Equipment::RatePerDay ) where EquipmentRental::EquipmentID = Equipment::EquipmentID .... the problem is in the WHERE ... whats the keyword in FM for this??? Thanks
RalphL Posted June 7, 2004 Posted June 7, 2004 Costs change with time, therefore you don't want to use relationships to get cost. Use a lookup, the value does not chaneg unless a re-lookup is performed. The lookup is based on a relationship. The cost is no longer a calculation but a number field. The extended cost = cost * time.
QuinTech Posted June 7, 2004 Posted June 7, 2004 Hi Adam, FM does not actually use WHERE statements like SQL does. When you initially set up the relationship, you are effectively creating the WHERE portion of a SQL statement. Thus, if you have a relationship between Equpiment and EquipmentRental based on EquipmentID, then you could just use Sum ( Equipment::RatePerDay ) to get the result (i think) you're looking for. Does this help? Jerry
Recommended Posts
This topic is 7550 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now