How Do You Solve This Pl/Sql Cursor, Following Is The Segment Of Codes:-?
I’m not well-versed in PL/SQL – only TransactSQL, so I can only give hints: 1) declare cursor XXX AS (you used: declare cursor XXX IS) – it’s “AS” not “IS” 2) Your WHERE clause should use OR not AND 3) I think you may have forgotten the “INTO” part of the fetch 4) It’s DBMS_OUTPUT_LINE() – not DBMS_OUTPUT.PUT_LINE() 5) You forgot the rest of the EXIT WHEN statement – you need to add a condition to exit, like row now found or some such. 6) In your SELECT statement, you need to put in a JOIN for the 3 tables, otherwise, you’ll get a cartesian join with a few trillion rows – give or take a billion – depending on how many rows are in the tables. 7) In your SQL statement, you use a slash for the STATUS alias. You should put it in quotes, but best is to lose it altogether.