Er....here's the code!
for i in 1 .. 5
loop
execute immediate
'select count(*) from flpweb.grg_part where  grg_part.siteid = '||
var_siteid ||' and '
|| column_name1 || ' = :b1 '  INTO counter1 USING to_char(i);

if i = 1 then
value1a := counter1;
percent1a := round((counter1/total_counter1)*100);
elsif i = 2 then
value2a := counter1;
percent2a := round((counter1/total_counter1)*100);
elsif i = 3 then
value3a := counter1;
percent3a := round((counter1/total_counter1)*100);
elsif i = 4 then
value4a := counter1;
percent4a := round((counter1/total_counter1)*100);
else
value5a := counter1;
percent5a := round((counter1/total_counter1)*100);
end if;
end loop;


Don't know if that'll help, but it might get you started.

-d



************************************************************
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to