Tuesday, 27 August 2013

How to use a procedure into the select and insert?

How to use a procedure into the select and insert?

I'm work with store procedures, supose that I've the following procedure
that return a value, and this value I use in other query.
CREATE PROCEUDRE filter(IN string varchar(1000), OUT salida varchar(1000))
BEGIN
.....
END
And I want make a insert with a select query for example:
INSERT INTO otherTable
SELECT filter(concat_group(column)) , value1,value2 from mytable
GROUP BY column,value,value2;
which is the correct way to do this?

No comments:

Post a Comment