Re: using collection parameters in SPL
Posted in 2007
On Nov 16, 6:06 pm, Fernando Nunes <s...@onlinedomus.net> wrote:
> comp.databases.informix wrote:
> > I'm trying to pass in a SET datatype into a stored procedure. Im not
> > having any luck in getting it to work .I cant find any info or
> > examples of the correct syntax.
>
> > I have a procedure(which compiles) as,
> > CREATE PROCEDURE getlistofskills_ds(
> > p_skills SET(INTEGER NOT NULL),
> > p_start_date DATETIME YEAR TO MINUTE,
> > p_end_date DATETIME YEAR TO MINUTE,
> > p_timezone_offset INTEGER,
> > p_is_multi CHAR(1))
> > RETURNING ........>
> > And trying one of many different ways as,
>
> > execute procedure getlistofskills_ds(SET{610,611,612,613},'2007-10-10
> > 00:00','2007-10-11 23:30',0,'Y')
> > OR
> > execute procedure getlistofskills_ds(SET{610,611,612,613}::SET(INT NOT
> > NULL),'2007-10-10 00:00','2007-10-11 23:30',0,'Y')>
> > I get the -674 error
>
> > Any one got some ideas on the correct syntax?
>
> CREATE PROCEDURE getlistofskills_ds(
> p_skills SET(INTEGER NOT NULL),
> p_start_date DATETIME YEAR TO MINUTE,
> p_end_date DATETIME YEAR TO MINUTE,
> p_timezone_offset INTEGER,
> p_is_multi CHAR(1))
> RETURNING integer;> return 1;
> end procedure;
>
> execute procedure getlistofskills_ds(SET{610,611,612,613},'2007-10-10> 00:00','2007-10-11 23:30',0,'Y');
>
> This works on 10.00.UC6 and 11.10.UC1 on Linux...
> Are you calling any procedure within your procedure?
>
> Regards.
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
You were correct. I assumed it was the original procedure that had the
error, when it was one being called from inside the procedure.