Ian Bishrey wrote:
>
> In Informix SE 7.1 on AIX 4.1.5, using dbaccess...
>
> This may be a dumb question, but can anyone tell me why this produces an
> output:
>
> select * from customer>
> but this does not:
>
> create procedure foo()> {
> select * from customer> }
> end procedure;
> execute procedure foo();>
> ?
>
It didn't work because your syntax is wrong. Following two code
fragments work. Try something similar to that.
-- code fragment 1
create procedure get_does()
returning char(30), char(30);define lname, fname char(30);
select lastname, firstname into lname, fname
from person where lastname matches 'Doe';return fname, lname;
end procedure;
-- code fragment 2
create procedure add_address( )
returning;
define id int;
select max(person_id) into id from person;
insert into address values ( id, '', '', '');
end procedure;
Hope it helps.
--
Tin Zaw x.13205 mailto: tzaw@qualcomm.com
Network Engineer QUALCOMM Inc. www.qualcomm.com