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
Win a copy of
this week in the
Other Open Source APIs
JDBC and Relational Databases
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
Calling a MySQL stored procedure from a web service....
MySQL - Returning Tables in Functions/SPs/Views
How to call Stored Procedure using jdbcTemplate and store result in object DTO/String/List/Result se
how to create MySql stored procedure?
mysql cursor in stored procedure
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015