B
Bruce
Hi,
I have a complex analytical query that is WAY beyond my SQL capabilities and
would appreciate any expert help I can get on this. The table of records I
want to process is large (2.6million records) and will require considerable
processing time. Ultimately I want to append the query results to a table
called tbl_temp. If it helps, I can send some sample data (small sample) of
what I want to process (from tbl_ASX_Data). I can demonstrate my desired
results in Excel if this helps.
Not sure if this is a SQL or VBA solution but happy with help on either.
My table information….
Table name:
tbl_ASX_data
Fields:
ASXCode: This contains my item/product code of type text
ImportDate: This is a text field in date yyyymmdd format
Close: Value of type numeric
Volume: Value of type numeric
n.b Primary Key is concatenated with ASXCode and ImportDate fields.
What I want to do….
For each ASXCode I want to calc the following;
Append the results of the 12 month average of the daily Close * Volume for
each element of ASXCode.
1) For each record calculate Close * Volume
2) Then calculate the average of 1) over the last 12 month for each ASXCode.
i.e. Convert the ImportDate field to a DateValue and work out the range of
records within 1 year and for each ASXCode calculate the average of these
results
3) Append results to table tbl_temp.
Greatly appreciate any help in solving this one cause I will never get it
myself.
Bruce
I have a complex analytical query that is WAY beyond my SQL capabilities and
would appreciate any expert help I can get on this. The table of records I
want to process is large (2.6million records) and will require considerable
processing time. Ultimately I want to append the query results to a table
called tbl_temp. If it helps, I can send some sample data (small sample) of
what I want to process (from tbl_ASX_Data). I can demonstrate my desired
results in Excel if this helps.
Not sure if this is a SQL or VBA solution but happy with help on either.
My table information….
Table name:
tbl_ASX_data
Fields:
ASXCode: This contains my item/product code of type text
ImportDate: This is a text field in date yyyymmdd format
Close: Value of type numeric
Volume: Value of type numeric
n.b Primary Key is concatenated with ASXCode and ImportDate fields.
What I want to do….
For each ASXCode I want to calc the following;
Append the results of the 12 month average of the daily Close * Volume for
each element of ASXCode.
1) For each record calculate Close * Volume
2) Then calculate the average of 1) over the last 12 month for each ASXCode.
i.e. Convert the ImportDate field to a DateValue and work out the range of
records within 1 year and for each ASXCode calculate the average of these
results
3) Append results to table tbl_temp.
Greatly appreciate any help in solving this one cause I will never get it
myself.
Bruce