All pastes #113930 Raw Edit

eKo1

public sql v1 · immutable
·published 2006-08-03 20:41 UTC
rendered paste body
create or replace functionfind_international_tnc(IN digit_string, OUT international_tnc, OUT text)returns setof record as $$    select tnc.*, c.name    from international_tnc tnc, country c    where tnc.cc = c.code and $1 like tnc.cc || tnc.pattern || '%'    order by tnc.pattern desc$$ language sql;