Ver Mensaje Individual
  #6  
Antiguo 13-04-2009
jconnor82 jconnor82 is offline
Miembro
 
Registrado: feb 2008
Posts: 22
Reputación: 0
jconnor82 Va por buen camino
Es cierto no he podido acceder al array usando el indice, espero y haya una funcion que permita trabajar con ellos porque cuando se accede por campo de tabla si que se puede hacer, cito una parte del libro The Firebird eBook

Limited Dynamic SQL Access
The following example is a simple demonstration of how a DSQL application can get limited read access to an array slice through a stored procedure:
Código SQL [-]
create procedure getcharslice(
  low_elem smallint, high_elem smallint)
returns (id integer, list varchar(50))
as
  declare variable i smallint;
  declare variable string varchar(10);
begin
  for select a1.ID from ARRAYS a1 into :id do
  begin
    i= low_elem;
    list = '';
    while (i <= high_elem) do
    begin
      select a2.CHARARRAY[:i] from arrays a2
      where a2.ID = :id
      into :string;
      list = list||string;
      if (i < high_elem) then
      list = list||',';
      i = i + 1;
    end
    suspend;
  end
end
donde la tabla array es de esta forma:
Código SQL [-]
CREATE TABLE ARRAYS
(ID BIGINT,
CHARARRAY CHAR(14)[8]);
Responder Con Cita