Hi Team,
I am not able to use multi value insert via argument in mysql stored
procedure, Please help where am I wrong. Thanks in Advance !
mysql> insert into input_data1 values(7777),(6666),(5555),(9999);
Query OK, 4 rows affected (0.00 sec)
*Problem*
mysql> call mobile_series1('(99889988),(12334565)');
+-----------------------+
| mobile |
+-----------------------+
| (99889988),(12334565) |
+-----------------------+
1 row in set (0.01 sec)
instead of 2 rows in table its only one row.
*Function Code:*
|DELIMITER|
DROP PROCEDURE IF EXISTS mobile_series1;
CREATE PROCEDURE mobile_series1(IN str text)
LANGUAGE SQL READS SQL DATA
BEGIN
DROP TABLE IF EXISTS input_data1;
CREATE TEMPORARYTABLE input_data1(mobile varchar(1000)) engine=memory;
INSERT INTO input_data1(mobile) VALUES (str);
SELECT * FROM input_data1;
END |
DELIMITER;
|
--
Best Regards
Amit Jain
www.netcore.co.in
Ext - 4109
#9833777592
** Message has been scanned by Emergic MailServ **
Attachment: [text/html]
Attachment: [image/jpeg] signature.jpg
Attachment: [image/jpeg] signature.jpg