Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Do You Solve This Pl/Sql Cursor, Following Is The Segment Of Codes:-?

0
Posted

How Do You Solve This Pl/Sql Cursor, Following Is The Segment Of Codes:-?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123