Jump to content
We've recently updated our Privacy Statement, available here ×

How to fetch result of stored procedure ?


sagarnikam123

Recommended Posts

 

I am using Ubuntu 12.04, iReport-4.7, MySQL database, mysql-jdbc driver

I write stored procedure in MySQL

DELIMITER //CREATE PROCEDURE first()BEGINselect * from person where id in (11,22,33);END //DELIMITER;

which return id & name as fields & calling it from iReport

select id+1,name from (call first)

gives me syntax error,

 

Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'call first)' at line 1

but when I run call first in query executor,no error

How should I get required field for further calculations ? Does this is possible in MS-SQL ?

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Help with MySql Stored Procedures:

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...