sql - How do I load columns from different tables into a cursor and display them? -


I want to display all the rows in the GameTabley, and I want to display one of the rows in the hawkopop. I have googled around, but it does not know how to load a cursor column from 2 tables and can display them.

Using Oracle 11G

This is my stored procedure code:

  process GetLotteryGame (number lg_id, lg_ref in lotg_ref_cursor) is BEGIN open lg_ref select a.GAMEDETAILSID, a.GAMENAME, a An INNER job from GAMECOST, a.GAMEDESCRIPTION, a.WHERETOPLAY, BHOWTOPLINEINFO GAMEDETAILS, b.GAMEDETAILSID = a.GAMEDETAILSID where a.GAMEDETAILSID & gt; = Lg_id; END GetLotteryGame;   

This is my call process code:

  set at 100000 DECLARE v_cursor LOTTERYGAMEPKG.lotg_ref_cursor at SET Serveroutput; V_gamedetailid GAMEDETAILS.gamedetailsID% Type; V_gamename GAMEDETAILS.gamename% type; V_gamecost GAMEDETAILS.gamecost% type; V_gamedescription GAMEDETAILS.gamedescription% Type; V_wheretoplay GAMEDETAILS.wheretoplay% type; V_howtoplayinfo HOWTOPLAY.howtoplayinfo% type; BEGINLOTERIGGAMPPKKGGGETLOTTERGRAPHY (LG_ID => 1, LG_F => Wikiterer); Loop Fetch v_cursor v_gamedetailsID, v_gamename, v_gamecost, v_gamedescription, v_wheretoplay, v_howtoplayinfo; Exit when v_cursor% NOTFOUND; DBMS_OUTPUT.PUT_LINE (v_gamedetailsID '', '|| v_gamename ||', '|| v_gamecost ||', '|| v_gamedescription ||', '|| v_wheretoplay ||', 'v_howtoplayinfo); End loop; Close v_cursor; End; Error Report:  
  Error Report - ORA-06550: Line 17, Column 143: PLS-00103: Symbol of "V_HOWTOPLAYINFO" indicated by one of the following: *, * & amp; ; = - + & lt; /> In, the rest is not the RIM = & gt; & Lt; An exponent (**) & gt; & Lt; & Gt; Or! = Or ~ = & gt; = & lt; = & lt; & Gt; The member was substituted for "V_HOWTOPLAYINFO" in order to continue the subset of subset between and between like and use like like2 like4 likec. 06550. 00000 - "line% s, column% s: \ n% s" * Reason: Usually a PL / SQL compilation error. * Action:    

You forgot the comet operator between ',' v_howtoplayinfo Were) .

should be ',' || V_howtoplayinfo) .

By the way, you are allowed to break such long lines if you do so, you can also read them without scrolling to the right, and you can find such errors automatically.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -