File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Stored procedure in mysql
Joined: Jun 05, 2010
Dec 03, 2012 11:32:46
I am a beginner in mysql stored procedure
What is wrong with this mysql stored procedure?
DELIMITER // CREATE PROCEDURE getPolicies() BEGIN DECLARE a INT; DECLARE b INT; SET b = 1001; SET a = SELECT ID FROM MEMPLACEMENT WHERE INTRODUCER = b AND PLACEMENT = 'Left' AND REGISTRATIONDATE = (SELECT MAX(REGISTRATIONDATE) FROM MEMPLACEMENT WHERE INTRODUCER = b AND PLACEMENT = 'Left'); END // DELIMITER ;
Mysql console gives me following error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'SELEC
T POLICYNUMBER FROM MEMBERPLACEMENT WHERE INTRODUCERPOLICYNUMBER = b AND PL'
I agree. Here's the link:
subject: Stored procedure in mysql
mysql cursor in stored procedure
how to create MySql stored procedure?
Calling a MySQL stored procedure from a web service....
How to call Stored Procedure using jdbcTemplate and store result in object DTO/String/List/Result se
MySQL - Returning Tables in Functions/SPs/Views
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014