Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please help if you can. Perl/sql or Perl or SQL.SELECT Time_class, Time_instance, Geo_class, Aggregated_area, Super_cl +assed_disease_cat, Cause, Constraint_ref, Sex, Sex_code, Age_start, A +ge_end, Age_range, Sum_count = SUM(G.Converted_person_count) INTO #tmp_G_P_M_CC_S_S FROM Geo_postaggregated_mortality_count_with_cause_catagor +y_SPLIT_SMR G GROUP BY G.Time_class, G.Time_instance, G.Geo_class, G.Agg +regated_area, G.Super_classed_disease_cat, G.Cause, G.Constraint_ref, + G.Sex, G.Sex_code, G.Age_start, G.Age_end, G.Age_range DECLARE @Key AS INT SET @Key = 1 while @Key <= (SELECT MAX(Key_m) FROM Geo_postaggregated_morta +lity_count_with_cause_catagory_SPLIT_SMR) begin UPDATE Geo_postaggregated_pop_count_SPLIT SET Total_person_count = t.Sum_count FROM Geo_postaggregated_mortality_count_with_cause_cata +gory_SPLIT_SMR G, #tmp_G_P_M_CC_S_S t WHERE G.Key_m = @Key, --- Problem is here G.Time_instance = t.Time_instance, G.Geo_class = t.Geo_class, G.Aggregated_area = t.Aggregated_area, G.Super_classed_disease_cat = t.Super_classed_disease_cat, G.Cause = t.Cause, G.Constraint_ref = t.Constraint_ref, G.Sex = t.Sex, G.Sex_code = t.Sex_code, G.Age_start = t.Age_start, G.Age_end = t.Age_end, G.Age_range = t.Age_range SET @Key = @Key +1 end
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL Problem. Perl solution?
by Util (Priest) on Sep 23, 2005 at 18:36 UTC | |
|
Re: SQL Problem. Perl solution?
by Mutant (Priest) on Sep 23, 2005 at 15:49 UTC | |
|
Re: SQL Problem. Perl solution?
by davidrw (Prior) on Sep 23, 2005 at 15:55 UTC |