Обсуждение: Complex column ref.

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

Complex column ref.

От
Arve Fahlvik
Дата:
Hello

I wonder if it is possible to refer to different columns in a query 
without usin 'execute'.

If I have the following table:
create table test(
a int,
b int,
c int);

declare
r record;
i numeric;
begin
.
select ref into i from reftable where ...;
select * into r from test where oid=...;
if r[i] = 2002 then  do something;
end if;
.
end;

In other words: I'm looking for a dynamic way of refer to columns 
without using 'execute'.

I hope the explanation of what I want to do is understandable.

Thanks

afa