CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Multiple SQL to achieve grid

Print topic Send  topic

Author Message
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.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.