procedure brokback_mountain(cowboys out cowboy)
as
begin
open cowboys as
select * from wyoming.people where sex='M' and name='Jack Twist'
union
select * from wyoming.people where sex='M' and name='Ennis del Mar';
exception
when DRINKING then
open cowboys as
select * from wyoming.people where name='Jack Twist'
union
select * from wyoming.people where name='Ennis del Mar';
end;
as
begin
open cowboys as
select * from wyoming.people where sex='M' and name='Jack Twist'
union
select * from wyoming.people where sex='M' and name='Ennis del Mar';
exception
when DRINKING then
open cowboys as
select * from wyoming.people where name='Jack Twist'
union
select * from wyoming.people where name='Ennis del Mar';
end;