Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Geert
Starting Member
4 Posts |
Posted - 2006-07-13 : 18:25:43
|
Hi,I working out the next sample:http://weblogs.sqlteam.com/jeffs/archive/2006/06/19/10270.aspxI get not start the UNION ALL.i want to see the numbers for a particular @Year, with totals for each Month, Account and Department.Who can make for me this example. I maked the tabels and the UNION all query, but i get errors.Who can help me with this example. Regards,Geertemail geert678@hotmail.com |
|
|
Geert
Starting Member
4 Posts |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-07-14 : 07:17:27
|
| Why don't you post what you have tried for us, along with any errors you are getting. Letting us know your table structures and giving some sample data with desired results would greatly help us help you.- Jeff |
 |
|
|
Geert
Starting Member
4 Posts |
Posted - 2006-07-14 : 15:23:37
|
| Hi Jeff,Thanks that you will help.I am a access beginner and i have lo learn the SQL language.I will try it: Structure: 3 tablesCommitmentID Year Month Account Dept Amount BudgetID Year Month Account Dept Amount ActualsID Year Month Account Dept Amount1) Dept with total for each Account by Commitment, Budget, Actual and Variance Commitment Budget Actual Variance Dept Account Amount Amount Amount Amount100 4000 1500 5000 2600 2400100 4500 2500 5000 2300 2700200 4000 1600 5100 2700 2400200 4500 2600 5100 2400 27002) Dept with total by Commitment, Budget, Actual and Variance Commitment Budget Actual Variance Dept Amount Amount Amount Amount 100 4000 10000 4900 5100 200 2500 5000 2300 2700 3) Total by Commitment, Budget, Actual and Variance Commitment Budget Actual Variance Amount Amount Amount Amount6500 15000 7200 7800I find your weblog very good. I learning Access, but i have problemsget Budgets, Commitments and Actuals all together. I find in English your site. That was what i needed. But i am afraid that it is for me too difficult. I hope that you can understand me. I am a bookkeeper on a non-profit (hospital) organisation. I want to make advanced reports. I hope that i get one good example of a report of Commitment, Budget and Actual with a UNION ALL query. I wanted to build it for later.I try it too make it, but i am not sure of it. Thanks for your help so far. Escuse me for the language failers !!Regards,GeertGeert678@hotmail.com |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-07-14 : 16:48:43
|
| Note that this is a SQL Server forum, not MS Access. They work a little differently. You are asking for an example of a query that uses union all -- didn't I give one on the weblog? What have you tried? What errors did you get? You should really start with the basics -- how a SELECT works, GROUP BY, UNION, etc -- and practice with those and really understand them, and then you can try to apply that knowledge to your real world problem.- Jeff |
 |
|
|
Geert
Starting Member
4 Posts |
Posted - 2006-07-15 : 11:31:19
|
| Jeff,Thanks for your reaction. I thought that your article for MS-Access users was written.The link is http://weblogs.sqlteam.com/jeffs/archive/2006/06/19/10270.aspxI hope to create the tabels en paste the SQL code in the query.I wanted to get a good example of Budgets, Commitments and Actuals.With these example could i make my own query's. I had a good example en want to study de SQL language.I have to learn much. I had no good reports from Budgets, Commitments and Actuals, because i had made too much relations.Your article was very intresting and i learned much of it.I must work out your Multiple Transactional Tables in MS-Access.I hoped that somebody had a good .mdb file for me. I am not working on a ICT company and must learn SQL in the free time what i have.Thanks for all en perhaps you hearded more from me.!Regards,Geert |
 |
|
|
|
|
|
|
|