Re: [SQL] Problem with stored procedure

2004-08-26 Thread Antonis Antoniou
Patrice OLIVER wrote: Hello, In this example, I use 2 tables : create table types ( typnum integer primary key, catcode varchar(2), typlib varchar(35)); create table uv ( uvnum varchar(5) primary key, typnum integer, uvlib varchar(50)); alter table uv add constraint fk_uv_type foreign key (typnum

Re: [SQL] Problem with stored procedure

2004-08-26 Thread Richard Huxton
Patrice OLIVER wrote: [snip] create function insert_uv(varchar,varchar,varchar) returns integer as ' declare codeuv alias for $1; codetype alias for $2; libuv alias for $3; cletype integer; begin select into cletype numtype(codeuv); insert into uv values (codeuv, cletype, libuv); retu

[SQL] Problem with stored procedure

2004-08-26 Thread Patrice OLIVER
Hello, In this example, I use 2 tables : create table types ( typnum integer primary key, catcode varchar(2), typlib varchar(35)); create table uv ( uvnum varchar(5) primary key, typnum integer, uvlib varchar(50)); alter table uv add constraint fk_uv_type foreign key (typnum) references type