MySQL Forums
Forum List  »  German

Re: stored procedure
Posted by: Thomas Wiedmann
Date: February 06, 2012 04:26AM

Hallo Franz,

probier mal diese gekürzte Version des SP in der MySQL Kommandozeile aus
DELIMITER $$

Create Procedure GetListenByUsrNo(IN iusrno int) 
COMMENT 'IN=usrno' 
SQL SECURITY INVOKER 
begin 
 select l.beschreibung,l.programm 
 from listen as l, grplst as g, users as u 
 where usrno = iusrno 
 and l.lstno = g.lstno 
 and g.grpno = u.grpno; 
end$$

DELIMITER ;

CALL GetListenByUsrNo(4711);

Es gibt keine OUT Parameter, der Resultset des SELECT wird direkt ausgegeben.

In der Kommandozeile sollten dann alle Zeilen ausgegeben werden. Wenn dass okay ist, dann mal mit VB ausprobieren.
(Ich hoffe es ist kein Fehler drin, ich kann hier im Moment nichts ausprobieren).

Grüße
Thomas

Options: ReplyQuote


Subject
Views
Written By
Posted
2032
February 06, 2012 03:38AM
Re: stored procedure
1108
February 06, 2012 04:26AM
946
February 06, 2012 05:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.