We help IT Professionals succeed at work.
Get Started

Oracle SQl query

anumoses asked
Last Modified: 2012-06-27
INSERT INTO temp_mobile_donors_au
             select distinct d.donor_id
               from donations@pdon.world d,
                    blood_drives b,
                    ds_malaria_travel_history h
              where b.site_code = 'NA19'            
             and d.coll_date between trunc(add_months(sysdate,-24))
                                      and trunc(sysdate)
                and d.drive_id = 'DRV'||b.drive_id
                and h.donor_id = d.donor_id;
This query is used to print reports. I am inserting donors and then loop to print the donor sheet for each donor. For this particular case I have 105 donors. My question is ----is there a way to take a count when inserted and see if count is > 50 then insert those donors after count 50 into another table?
Watch Question
Database Developer & Administrator
Most Valuable Expert 2011
Top Expert 2012
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE