Orvalho Augusto wrote:>
> Can someone provide me a good way to circumvent the lack of calling
> Stored Procedures from RMySQL?
>
> I can not rewrite those stored procedures on R because there a lot
> more folks here that only understands SQL.
>
> The stored procedure returns a resultset.
>
Use RODBC instead.
Assuming two stored procedures :
CREATE PROCEDURE getusers (in userid INT)
BEGIN
SELECT name from jos_users where id > userid;
END;
CREATE PROCEDURE getusers0()
BEGIN
SELECT name from jos_users;
END;
The following works
#####
library(RODBC)
con = odbcConnect("mysql",uid="xxx",pwd="yyy")
users0 = sqlQuery(con,"CALL getusers0")
users0
users = sqlQuery(con,"CALL getusers(20)")
users
close(con)
#####
Dieter
--
View this message in context:
http://old.nabble.com/RMySQL-and-Stored-procedures-tp26159085p26160033.html
Sent from the R help mailing list archive at Nabble.com.