A Query that works standalone but not in a f(x)

Поиск
Список
Период
Сортировка
От Ralph Smith
Тема A Query that works standalone but not in a f(x)
Дата
Msg-id 4D389B90.8090001@10kinfo.com
обсуждение исходный текст
Ответы Re: A Query that works standalone but not in a f(x)
Список pgsql-general
Within the function I have:

for darec in select * from purchbt where addr not like ''%STE%STE%'' and addr not like ''%STE%STE%STE%'' and  (addr similar to ''%STE[A-Z]*[0-9]+'' or addr similar to ''%STE[A-Z]*[0-9]+[A-Z]'' or addr similar to ''%STE[A-Z]*[0-9]+[A-Z][A-Z]'')  loop

and it finds no records.
Outside the function, replace '' with ', I DO get the results I expect.
Back and forth, it's reliable.

I tried putting the COUNT(*) into a var and it finds 0 w/in the function and 59K recs as a standalone query.

Any ideas?
Thanks!
-- 

Ralph
_________________________

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Gould
Дата:
Сообщение: Re: Moving from SQL Anywhere to PostGres - First Time
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A Query that works standalone but not in a f(x)