andrico
Posts: 12
|
| Posted: 12/10/2004, 9:17 AM |
|
I have an .asp search form. The results are determined by 3 data fileds, PNumber (ANI), StartDate (s_DisconnectDate) and EndDate (s_DisconnectDate2) from my 'LDData' table. The search form works great but I need to total one of the columns on the form, 'CallDurations' AS TotalMinutes. My current SQL Script doesn't calculate the total for just the results displayed instead it totals all info in the table because I can't figure out the 'Where' part of the code. Here is what I have so far.
sSQL = "SELECT Sum(LDData.CallDuration) AS TotalMinutes" & _
" FROM LDData" & _
" Where (????)"
I only want to total the 'CallDuration' column for the PNumber and data ranges entered by the user not the entire table. Any help would be greatly appreciated.
_________________
Rico |
 |
 |
peterr
Posts: 5971
|
| Posted: 12/10/2004, 9:35 AM |
|
You'd use GridName.DataSource.Where
Please try this forum search: http://forums.codecharge.com/search.php?s_keyword=ccdlo...[]=21&s_period=
then search the forum threads for "DataSource.Where" to see how others use it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|