pacificpear
Programmer
Crystal Report 10/ SQl/XML
All the data in sql server is in string
I am having problems in calculating avergages of the given date.Following is the data
X Y Z Timestamp
700994 HA-astprod2a 25.30 2005-06-17 08:15:38.000
700994 HA-astprod2b 125.30 2005-06-17 08:15:38.000
700994 HA-branch2a 16.87 2005-06-19 08:15:38.000
700994 HA-branch2a 18.87 2005-06-19 08:15:38.000
701295 HA-branch2a 8.42 2005-06-17 08:15:38.000
701295 HA-branch2a 18.42 2005-06-17 08:15:38.000
701295 HA-branch2a 82.42 2005-06-19 08:15:38.000
701295 HA-branch2a 81.42 2005-06-19 08:15:38.000
expected result
: Average of column Z on the same date i.e
First I have to calculate the sum of 700994 on date 2005-06-17
So the date should be
X Y Z Timestamp
700994 HA-astprod2a 150.6 2005-06-17 08:15:38.000
700994 HA-branch2a 35.74 2005-06-19 08:15:38.000
And same for the other one"701295" too and then i have to calculate the average of both the days
i.e average of "700994" is "75.3"
can anyone help
Thanks
PP
All the data in sql server is in string
I am having problems in calculating avergages of the given date.Following is the data
X Y Z Timestamp
700994 HA-astprod2a 25.30 2005-06-17 08:15:38.000
700994 HA-astprod2b 125.30 2005-06-17 08:15:38.000
700994 HA-branch2a 16.87 2005-06-19 08:15:38.000
700994 HA-branch2a 18.87 2005-06-19 08:15:38.000
701295 HA-branch2a 8.42 2005-06-17 08:15:38.000
701295 HA-branch2a 18.42 2005-06-17 08:15:38.000
701295 HA-branch2a 82.42 2005-06-19 08:15:38.000
701295 HA-branch2a 81.42 2005-06-19 08:15:38.000
expected result
: Average of column Z on the same date i.e
First I have to calculate the sum of 700994 on date 2005-06-17
So the date should be
X Y Z Timestamp
700994 HA-astprod2a 150.6 2005-06-17 08:15:38.000
700994 HA-branch2a 35.74 2005-06-19 08:15:38.000
And same for the other one"701295" too and then i have to calculate the average of both the days
i.e average of "700994" is "75.3"
can anyone help
Thanks
PP