Обсуждение: "OO" stored procedures?

Поиск
Список
Период
Сортировка

"OO" stored procedures?

От
Walker Aumann
Дата:
Hi all,

I'm about to start on my first serious SQL development project, and I'm
wondering about a feature that I can't find any information about.

Brief overview: we need a database to store lots of little bits of
information about various customer accounts.  Every month, some customers
want reports.  The problem is that the customers want different reports.
Ideally, I'd like to have a stored procedure associated with each
particular customer, so I can do something like (excuse the horrible mix
of SQL and perl here):

foreach $cust ('SELECT DISTINCT customers FROM accounts WHERE
    monthly_report IS NOT NULL')
{
    $cust.report($cust, $date);
}

Is this doable, or am I supposed to define a number of
customer1_monthly_report stored procedures in the global namespace and
use those?

Walker