Your question, your audience. Choose who sees your identity—and your question—with question security.
create or replace view top_two_random_numbers
as
SELECT id_card_number FROM (
SELECT id_card_number, row_number() over(order by dbms_random.value) myrn FROM ballot
)
where myrn <= 2;
--then in Forms:
select * from top_two_random_numbers;
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
In your form:
execute
balloting.init; -- either in the when new_form_instance_trigger or in a when_button_pressed_trigge
in the same place create your repeating timer
create a when_timer_expired trigger
begin
:your_show_item := balloting.show_next;
-- if you use other timers as well get the timer name of the expired timer
-- to execute the desired code for each timer
end;
attach a when_button_pressed trigger on your winner_button
begin
:your_winner_item := balloting.show_next;
:your_show_item := :your_winner_item;
-- depending on what you want you can delete your timer here
end;
-- the creation and delete of the timer you will have to choose , showing new_values after a winner is selected or stopping it.
Depending on that choise you wil have to recreate the timer when starting the balloting again.
-- at the end you wil have to change the cursor in the package to use the table you want to use
balloting.pck.txt
test-balloting.sql