aspose file tools*
The moose likes JDBC and the fly likes Create Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Create Stored Procedure " Watch "Create Stored Procedure " New topic
Author

Create Stored Procedure

ravindra patil
Greenhorn

Joined: Mar 28, 2007
Posts: 9
This is my stored procedure but it is not working ...

CREATE PROCEDURE sp_select_custId (IN custId INTEGER)
BEGIN
select * from customer c,tapedelivery t where c.CustomerID=t.CustomerId And c.CustomerID = custId;
END;

But it is not running ..it is giving error ..please suggest me correct syntax/way to create this procedure.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

What error are you getting? can you please post the error as well?


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
ravindra patil
Greenhorn

Joined: Mar 28, 2007
Posts: 9
Hello Raghavahan
I am getting this error

"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 'select * from customer c,tapedelivery t where c.CustomerID = t.CustomerId And c.' at line 4"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create Stored Procedure
 
Similar Threads
Stored Procedure in MySql
Create stored procedure in hssql
New to JDBC Callable Satement
Stored procedures..
How to execute PL/SQL program from Java?