MikeDuffield
Registered User.
- Local time
- Today, 20:27
- Joined
- Aug 31, 2010
- Messages
- 50
Hello all,
I'm pretty new to the world of SQL queries, I've always stuck to VB and Excel in the past... As a result, I'm struggling on things that I'm sure most would find easy. I've Google'd this to no avail, so now it's time to cry for help!
I have added two new fields to an SQL query, as follows:
Actual: [SalesTbl].[Manufactured]+[Factored]
So, here we add a field called Actual, that is the total of two other existing fields in a table. this works fine. Another new field is also added:
Prcnt Budget: [SalesTbl].[Actual]/[Budget]
The problem I'm facing is that I assume it tries to calculate everything at once, as it can't find a value for "Actual". I thought it would create the field Actual first, then try and calculate Prcnt Budget, but it seems not.
In the query, I would have assumed it calculates each field one at a time before moving on to the next, but perhaps I've got the fundamentals of a query entirely wrong...
Can anyone enlighten me?
Thanks in advance
Mike.
I'm pretty new to the world of SQL queries, I've always stuck to VB and Excel in the past... As a result, I'm struggling on things that I'm sure most would find easy. I've Google'd this to no avail, so now it's time to cry for help!
I have added two new fields to an SQL query, as follows:
Actual: [SalesTbl].[Manufactured]+[Factored]
So, here we add a field called Actual, that is the total of two other existing fields in a table. this works fine. Another new field is also added:
Prcnt Budget: [SalesTbl].[Actual]/[Budget]
The problem I'm facing is that I assume it tries to calculate everything at once, as it can't find a value for "Actual". I thought it would create the field Actual first, then try and calculate Prcnt Budget, but it seems not.
In the query, I would have assumed it calculates each field one at a time before moving on to the next, but perhaps I've got the fundamentals of a query entirely wrong...
Can anyone enlighten me?
Thanks in advance
Mike.