September 12, 2017 at 10:03 pm
sqlfriends - Tuesday, September 12, 2017 1:28 PMI see on this page: https://en.wikipedia.org/wiki/PL/SQL
PL/SQL (Procedural Language/Structured Query Language
I think the "PL" part of that is how you had to get at the results from a GUI. I've not worked with Oracle for 14 or 15 years but I was always mortified that I'd write a beautiful SELECT to do something but there was no way for the GUI to get at the results of the SELECT. Our standard was to write a package and have a "Global Reference Cursor" that was responsible for passing the data from whatever SELECT you wrote to the GUI. For batch jobs, there was no need of the "Global Reference Cursor".
--Jeff Moden
Change is inevitable... Change for the better is not.
September 13, 2017 at 9:07 am
Jeff Moden - Tuesday, September 12, 2017 10:03 PMsqlfriends - Tuesday, September 12, 2017 1:28 PMI see on this page: https://en.wikipedia.org/wiki/PL/SQL
PL/SQL (Procedural Language/Structured Query LanguageI think the "PL" part of that is how you had to get at the results from a GUI. I've not worked with Oracle for 14 or 15 years but I was always mortified that I'd write a beautiful SELECT to do something but there was no way for the GUI to get at the results of the SELECT. Our standard was to write a package and have a "Global Reference Cursor" that was responsible for passing the data from whatever SELECT you wrote to the GUI. For batch jobs, there was no need of the "Global Reference Cursor".
Ah, yes, the Reference Cursor. Hated it, but as you said, the only way to return a result set back to the calling application.
September 13, 2017 at 9:59 am
thanks all.
I also see the cursor is used for the reason to log or handle errors for the specific record (id, or other columns) that caused the error, while set based cannot do that.
September 13, 2017 at 10:59 am
If I remember correctly, in Oracle everything is a cursor behind the scenes, even if you don't explicitly declare one. See the Handling Explicit Cursors section in this page:
http://docs.oracle.com/cd/B10501_01/appdev.920/a97269/pc_actun.htm
September 13, 2017 at 11:12 am
Chris Harshman - Wednesday, September 13, 2017 10:59 AMIf I remember correctly, in Oracle everything is a cursor behind the scenes, even if you don't explicitly declare one. See the Handling Explicit Cursors section in this page:
http://docs.oracle.com/cd/B10501_01/appdev.920/a97269/pc_actun.htm
--Jeff Moden
Change is inevitable... Change for the better is not.
September 13, 2017 at 11:13 am
Chris Harshman - Wednesday, September 13, 2017 10:59 AMIf I remember correctly, in Oracle everything is a cursor behind the scenes, even if you don't explicitly declare one. See the Handling Explicit Cursors section in this page:
http://docs.oracle.com/cd/B10501_01/appdev.920/a97269/pc_actun.htm
When using PL/SQL that is correct and why I mentioned that a couple of times in the posts here. The links for the poster explains this some and how to avoid explicit cursors.
December 30, 2019 at 7:33 pm
This was removed by the editor as SPAM
Viewing 7 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply