Re: Using a variable in sql in a function

Поиск
Список
Период
Сортировка
Искать
От
Jasen Betts
Тема
Re: Using a variable in sql in a function
Дата
Msg-id
hi4iam$sn9$2@reversiblemaps.ath.cx
Список
Дерево обсуждения
Re: Using a variable in sql in a function Jasen Betts <jasen@xnet.co.nz>
you could possibly do it like this.

FOR o in SELECT distinct(col_id) as id
    FROM table1
    JOIN table2
    ON col_id = t2_t1_id
   WHERE 
     CASE  period_type  
       WHEN 'CURRENT' THEN field1 IS NULL
       WHEN 'old'     THEN field1 IS NOT NULL

...etc...

     END
   LOOP

В списке pgsql-novice по дате отправления
От: Andrew Rose
Дата:
От: Tom Lane
Дата:
Сообщение: Re: Error on Vacuum?
FAQ