Sunday, 15 September 2013

sql - trying to sum allocation percentages -


After

I'm a newbie with SQL and with little training it has been thrown in, so appreciate the very simple answer are doing! I am trying to draw a query on the allocation of participants but I need all the allocation for a fun expression. I currently select the following:

  select external_plan, participant_tax_id, external_vehicle, sum ( Money_type from decimal (alloc_rate, 15,2)), trc.vst_partalloc where external_plan = 'RF00580' and money_type = '101' alloc_rate, external_plan, participant_tax_id, external_vehicle, group by money_type   

this The following example presents:

  EXTERNAL_PLAN pARTICIPANT_TAX_ID eXTERNAL_VEHICLE alloc_Rate MONEY_TYPE RF00580 #### ##### DFC X 0.03 101 RF 00580 ################## ACRNX 0.06 101 RF 00580 ######### STSVX 0.06 101 RF 00580 ######### VISGX 0.06 101 RF 00580 # # # ###### VMViX0.0601 RF00580 #########Regx 0.0901 RF00580########DODGX 0.12 101 RF00580########DRLCX 0.12 101 RF 00580 ######### ABNK 0.20 101 RF 00580 ######## PTTRX 0.20 101   

Then ###### ### One of the participants in these rows represents, alloc rates say up to 100, what I need is a line e Xternal_vehicle but not returning from the summ display is written from 100 to alloc_rate - does this make sense? Thanks in advance for any help, thanks!

All you have to do is remove it from the need to look like External_vehicle and select the group by section.

No comments:

Post a Comment