Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a load script that contains the following:
LOAD udf_exchange_cd,
[Aggregate 1 (Positive Correlation)],
[Aggregate 2 (Negative Correlation)],
[Diminishing Balance],
[Spot Month Limit New],
[Trading Ratio New],
exchange_cd,
office_cd,
desk_cd,
formatdate,
Sum(unpriced_lots) as SumUnpricedLots,
Sum(unpriced_delta_lots*[Trading Ratio New]) as TotalAgg1,
Sum(unpriced_delta_lots*-[Trading Ratio New]) as TotalAgg2,
final_pricing_dt
The script works, however I would like to calculate the TotalAgg1 value where the pcr_num is DISTINCT. Is this possible?
Thanks,
Daniel
pls share ur input values and expected output values with some sample data.
Maybe you do another resident load with some key fields and count(pcr_num) as another calculated field and then create another table through resident load of former table with where condtion as 'Where counted_pcr_num =1".
Inner join this 2nd table to the main table and this will keep only records where pcr_num is distinct
I think you better post the entire LOAD statement. There is no field pcr_num in your sample.
Where is pcr_num in your script? HOw this is related with TotalAgg1 ?