Re: Problem with Views AND Stored Procedures
Posted in 1996
On Thu, 29 Aug 1996, Jonathan Leffler wrote: } If you use a stored procedure in a SELECT statement, it must } return a single value -- single row AND single column. } } Your procedure returns multiple columns, violating the constraint. } } Incidentally, finder -684 says: } } -684 Procedure procedure-name returns too many values. } } The number of returned values from a procedure is more than the number of } values that the caller expects. } } Example of error: } } CREATE PROCEDURE testproc (arg INT) } RETURNING INT, INT; } RETURN 1,2; } END PROCEDURE } SELECT col FROM tab WHERE col = testproc(1); -- error } } This gives an example of the constraint, admittedly not in the SELECT-list, } but still it gives a fairly good hint, don't you think? NO! I am sorry I am slow. In the above Example you are trying to assign to a single Variable That's why it gave an error. How is it same with my case? I am giving a bucket for each value returned by the procedure!!! It should have been documented somewhere. } } Yours, } Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }