File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Create Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Create Stored Procedure " Watch "Create Stored Procedure " New topic

Create Stored Procedure

ravindra patil

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

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

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

Joined: Apr 20, 2006
Posts: 3370

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

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:
subject: Create Stored Procedure