Mysql Error 1312
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question Tagged Questions info newest frequent votes active unanswered PROCEDURE [name] can't return a result set in the given context learn more… | top users | synonyms 0 votes 0answers 474 views Java - Using Hibernate to Call a Stored Procedure - Can't Return a Result Set I'm working through this tutorial (http://www.mkyong.com/hibernate/how-to-call-store-procedure-in-hibernate/) on calling an SQL stored procedure in Java using Hibernate. However, I'm getting an ... java mysql hibernate jdbc mysql-error-1312 asked Aug 2 '13 at 9:44 Keshava Murthy 59211 3 votes 1answer 2k views MYSQL ERROR: PROCEDURE can't return a result set in the given context I am new to Stored procedure in mysql This is the procedure for returning difference of date excluding Weekends, but it returns error #1312 - PROCEDURE blog1.DayCount can't return a result set in ... mysql stored-procedures mysql-error-1312 asked Jul 23 '10 at 11:43 sathish 3,63321930 1 vote 1answer 316 views Mysql stored procedure giving error at runtime I have created a stored procedure in Mysql, as : delimiter $$ drop procedure if exists test9$$ Create procedure test9(test_type varchar(20)) Reads sql data begin Declare 1_id int; Declare ... mysql stored-procedures mysql-error-1312 asked Jun 29 '10 at 5:25 Kalx 1341515 3 votes 2answers 1k views Mysql stored procedure I have created a stored procedure in Mysql, as : DELIMITER // CREATE PROCEDURE test() BEGIN SELECT * FROM buyers; END // DELIMITER ; but when i call it using, call test() it returns an error ... mysql stored-procedures mysql-error-1312 asked Jun 28 '10 at 11:23 Kalx 1341515 4 votes 1answer 5k views Why Am I Getting MySQL Error #1312 when Using a Simple Stored Procedure? I'm trying to learn how to use MySQL stored procedures. MySQL accepted my procedure: CREATE PROCEDURE SimpleProc() BEGIN SELECT * FROM myTable; END (In phpMyAdmin, I set // for delimiter. ... mysql stored-procedures mysql-error-1312 asked May 16 '10 at 1:09 Laxmidi 1,24053266
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Stored Procedures :: SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) New Topic Advanced Search SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) Posted by: Marty Chang () Date: June 01, 2010 07:36PM Hello, I'm trying to create a simple stored procedure as a test right now, and I cannot seem to get this stored procedure to work. The code looks as follows: DELIMITER // DROP http://stackoverflow.com/questions/tagged/mysql-error-1312 PROCEDURE IF EXISTS `select_hello` // CREATE PROCEDURE `select_hello`() BEGIN SELECT "Hello, World!"; END // DELIMITER ; All it's supposed to do is to return a result set containing one column and one row with the value "Hello, World!" in the single cell. Instead, I get the following error: #1312 - PROCEDURE mydatabase.select_hello can't return a http://forums.mysql.com/read.php?98,370074 result set in the given context This error is documented very, very briefly in the MySQL online documentation at the following URL: http://dev.mysql.com/doc/refman/5.1/en/create-procedure.html However, all that is said is: "For statements that can be determined only at runtime to return a result set, a PROCEDURE %s can't return a result set in the given context error occurs (ER_SP_BADSELECT)." I found this to be completely unhelpful in guiding me to the proper way to avoid this error. I would appreciate any help with getting this simple stored procedure to work. Navigate:Previous Message•Next Message Options:Reply•Quote Subject Views Written By Posted SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) 4380 Marty Chang 06/01/2010 07:36PM Re: SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) 1297 Peter Brawley 06/01/2010 09:26PM Re: SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) 1540 Marty Chang 06/03/2010 08:30PM Re: SELECT Statement in Stored Procedure Causes Error #1312 (ER_SP_BADSELECT) 1324 Guelphdad Lake 06/01/2010 10:14PM Re: SELECT Statement in Stored Procedure Causes Err
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn http://dba.stackexchange.com/questions/33986/cant-return-a-result-set-in-the-given-context-error-when-calling-stored-proce more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to mysql error the top “can't return a result set in the given context” error when calling stored procedure - differences between mysql 5.0 and 5.5? up vote 1 down vote favorite 1 I have a stored procedure to regenerate leafs (nleft, nright) in simple (id, id_parent) tree. (sample table) When I'am calling CALL EdgeListToNestedSet( 'category', 'id_category', 'id_parent'); it works great with version 5.5.29 of mysql but on 5.0.26 I've got an error: #1312 - PROCEDURE test.EdgeListToNestedSet can't return a mysql error 1312 result set in the given context Any ideas what can be wrong and how to make it working? mysql stored-procedures share|improve this question asked Feb 1 '13 at 17:56 ts. 12216 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote accepted Older versions of phpMyAdmin have issues with MySQL. This has been asked 8 times in StackOverflow with the tag mysql-error-1312. This bug was seen and addressed in MySQL 5.0.09 beta about 6 weeks after MySQL 5.0.26 was released Oct 09, 2006. Still, you got this error. According to http://qasimbadami.wordpress.com/tag/mysql-error-1312/, you should make sure you are using mysqli / PDO. share|improve this answer answered Feb 1 '13 at 22:43 RolandoMySQLDBA 108k15139276 add a comment| up vote 0 down vote I had this problem too; calling the procedure worked on my local xampp instalation but not on the live server. Tried a lot of things and pulled a lot of hair on this one. I was concatenating some strings in the procedure, on different rows for clarity; after i put all the text of the concat statement on a single row it worked (deleted only white space, no code); so it might be that some special new line characters break something in MySQL concatenations share|improve this answer edited Mar 2 '13 at 6:51 answered Mar 2 '13 at 6:45 bogdan 1011 add a comment| Yo