Sharon Niles
|
| Posted: 12/11/2002, 10:49 PM |
|
Does anyone out there know how to create a grid based on two sql's. This is the story.
SQL 1 gets records based on date range based through search
SQL 2 takes all above records and adds them together without the date.
|
|
|
 |
Lee Irving
|
| Posted: 12/12/2002, 1:51 AM |
|
Sharon,
Can you give an example of what you are trying to achieve.
I think what you are getting at is a summary of transactions between two dates.
i.e. Sum(Field1), Sum(Field2) from TABLE where date >= '01/01/2001' <= '01/01/2002'
|
|
|
 |
Sharon Niles
|
| Posted: 12/12/2002, 10:23 AM |
|
Thank you for your help. My situation is this: I need the total dollar amount grouped by company name over a period of time selected by the user. So for example, Company x purchased $20 in January 2002, $30 in July 2002 and $500 in November 2002. The user wants totals from July 2002 to December 2002 the total is $530. If I use a search range with date as the link, the grid brings two lines back: July 2002 $30 and December 2002 $500. The user only wants one line to come back saying Company X - $530.
In Access, I would use two queries. One showing the date as a parameter. The second query totaling the first query results so that only one line appears. Any suggestions will be appreciated.
|
|
|
 |
|