Yurij wrote:
Вот не помешали бы массивы в параметрах, да.
Еще Ann или Helen приводили пример хранимки, превращающей строку в
датасет. Что-то типа такого:
create procedure SPLIT_INTEGER (
VALUE_ varchar(2048))
returns (
RESULT integer)
AS
declare variable temp_ varchar(16);
declare variable char_ varchar(1);
begin
if (value_ is null) then
exit;
--end if
value_=value_||',';
temp_='';
while (value_<>'') do
begin
char_=substring(value_ from 1 for 1);
if (char_=',') then
begin
if (temp_<>'') then
begin
result=cast(temp_ as integer);
temp_='';
suspend;
end--if
end
else
temp_=temp_||char_;
--end if
value_=substring(value_ from 2 for 2048);
end--while
end
На входе строка '1,2,3,4', на выходе - таблица. Пихаем ее в GTT и вуаля...