wood burning stoves 2.0*
The moose likes JDBC and the fly likes Help with an update sentence within a stored procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help with an update sentence within a stored procedure" Watch "Help with an update sentence within a stored procedure" New topic
Author

Help with an update sentence within a stored procedure

Ilh Oleo
Ranch Hand

Joined: Feb 07, 2007
Posts: 57
Hi to all!

I'm trying to automatize some data cleaning through a stored procedure but i'm gettting an error message.
What i want to do is pass a value that is the name column from my table to the stored procedure and so i can pass any column name but like i still don't understand very well how to define a stored procedure i'm havinf some troubles.

For example if i type this:
CALL limpia('column_name')
I get this error:
Unknown column 'TIPO_EDUCA' in 'field list



Could someone help me,please?
Ilh Oleo
Ranch Hand

Joined: Feb 07, 2007
Posts: 57
Someone in another forum recommended me to use prepared statements but i don't sure how to call it.
I did something like this:


Does anybody know how should i execute my procedure?
Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
The following example works on Oracle DB:

results:

---------------------------------------------------
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help with an update sentence within a stored procedure
 
Similar Threads
Calling Stored proc using Hibernate @NamedNativeQuery
new to oracle How to execute Stored Procedure
Problem calling IN parameters Stored Procedure from Java
JDBC Callable Statement JConnect2 Returning null resultset
Calling a MySQL stored procedure from a web service....