What will be output of this cursor ?

hi all,
I am in learning stage, find following example from net and want to know about what will be output of v_emp_data type
DECLARE
      CURSOR ABC_EMP
      IS
      SELECT EMPNO,
             ENAME,
             DEPTNO,
             SAL
        FROM EMP;
      TYPE v_sal_type IS TABLE OF NUMBER
         INDEX BY VARCHAR2 (50);
      v_emp_data    v_sal_type;
BEGIN
      FOR V_EMP_REC IN ABC_EMP
      LOOP
         v_emp_data (
               LPAD (V_EMP_REC.EMPNO, 4, ' ')
            || LPAD (V_EMP_REC.ENAME, 10, ' ')
            || LPAD (V_EMP_REC.DEPTNO, 2, ' ')) :=
            V_EMP_REC.SAL;
         DBMS_OUTPUT.PUT_LINE (v_emp_data.Count);
      END LOOP;
END;
it is showing 1 to 14 which is no. of records  but how I can see the actual data it contain. please help.
regards.

SQL> DECLARE
  2        CURSOR ABC_EMP
  3        IS
  4        SELECT EMPNO,
  5              ENAME,
  6              DEPTNO,
  7              SAL
  8          FROM EMP;
  9        --
10        TYPE v_sal_type IS TABLE OF NUMBER
11          INDEX BY VARCHAR2 (50);
12        --
13        v_emp_data    v_sal_type;
14        v_index varchar2(50);
15  BEGIN
16        FOR V_EMP_REC IN ABC_EMP
17        LOOP
18          v_emp_data (
19                LPAD (V_EMP_REC.EMPNO, 4, ' ')
20              || LPAD (V_EMP_REC.ENAME, 10, ' ')
21              || LPAD (V_EMP_REC.DEPTNO, 2, ' ')) :=
22              V_EMP_REC.SAL;
23        END LOOP;
24        DBMS_OUTPUT.PUT_LINE(v_emp_data.Count);
25          v_index := v_emp_data.FIRST;
26        LOOP
27          EXIT WHEN v_index IS NULL;
28          DBMS_OUTPUT.PUT_LINE('INDEX: ' || v_index || '        VALUE: ' ||  v_emp_data(v_index));
29          v_index := v_emp_data.NEXT(v_index);
30        END LOOP;
31  END;
32  /
14
INDEX: 7369    SMITH20        VALUE: 800
INDEX: 7499    ALLEN30        VALUE: 1600
INDEX: 7521      WARD30       VALUE: 1250
INDEX: 7566    JONES20        VALUE: 2975
INDEX: 7654    MARTIN30       VALUE: 1250
INDEX: 7698    BLAKE30        VALUE: 2850
INDEX: 7782    CLARK10        VALUE: 2450
INDEX: 7788    SCOTT20        VALUE: 3000
INDEX: 7839      KING10       VALUE: 5000
INDEX: 7844    TURNER30       VALUE: 1500
INDEX: 7876    ADAMS20        VALUE: 1100
INDEX: 7900    JAMES30        VALUE: 950
INDEX: 7902      FORD20       VALUE: 3000
INDEX: 7934    MILLER10       VALUE: 1300
PL/SQL procedure successfully completed.
SQL>
SY.

Similar Messages

  • HT1391 Recently my iPod touch 4th gen. was stolen. I have had it for two years, so I don't have a warranty on it anymore. I reported it to the police, but what will apple do? This one kid reported to them that his was stolen and they gave him a new one.

    Recently my iPod touch 4th gen. was stolen. I have had it for two years, so I don't have a warranty on it anymore. I reported it to the police, but what will apple do? This one kid reported to them that his was stolen and they gave him a new one. Will they do the same for me? Is there any other way I can get all my pictures from my iPod without iCloud set up? Would Apple be able to lock up my iPod so they cant use it at all? Please help me, thanks (:

    ipod touch lover wrote:
    Recently my iPod touch 4th gen. was stolen. I have had it for two years, so I don't have a warranty on it anymore. I reported it to the police, but what will apple do?
    Nothing... why would they do anything?
    Apple does not provide insurance and they are not law enforcement.

  • Whats point of iphone 5 ,4" screen and lots apps didnt optimized for it ,what will apple do about this ??? THANKS

    Whats point of iphone 5 ,4" screen and lots apps didnt optimized for it ,what will apple do about this ??? THANKS

    JGSwabo wrote:
    I only wait stupid answers from stupid ios users ,and now go on this link and read what Apple order to all developers and thay nead to fix it to May.1 and thay didnt LOL
    http://m.imore.com/apple-advises-developers-app-submissions-need-stop-accessing- udids-star-supporting-retina-and-16x9
    So, we're the "stupid ios users" yet you are the one posting a link to something that simply says what we all said here?
    "Starting May 1, new apps and app updates submitted to the App Store must be built for iOS devices with Retina display and iPhone apps must also support the 4-inch display on iPhone 5. Learn about preparing your apps by reviewing the iOS"
    What part of that statement in your link do you not get?  App developers will or will not make those changes, not Apple.  It is entirely possible some apps will never get updated for retina, as their developers will drop those products and move on to new ones.  Yes, Apple may set certain minimum standards and requirements for inclusion of anyone's app in their storefront (as I already said), but it is entirely up to the developers to actually implement those changes.  Complaining on an Apple forum that a particular developer chose not to is pointless and a waste of everyone's time.

  • HT1688 How do I report stolen iPhone and what will Apple do about this?

    What will Apple do if someone else connects to iTunes with a stolen iPhone

    "iTunes is a service too."
    itunes is an online store.  You would have them deny service?  Really?  This would be an invitation to countless problems.
    as for cars registration gets checked when
    1. stopped by police
    2. when getting inspection sticker."
    1)  If a thief is caught and they haave an ipod, they will check to see if the serial number is reported stolen ( to the police - not APPLE).  You should report therft ot the police not the make of each iten that is stolen.
    2) You think we should have to have anual inpections for out ipods/iphones?  Really?
    None of this is done through Ford, Checy or any other car maker.
    Unless you are advocating licensing and registering your iphone with the govenrment, then you are not comparing like issues at all.

  • Hello, i have buy iphone 6 recently now it is fall down on the ground and any chance to repair buy apple on free of cost if not then what will be price for this

    Hello, i have buy iphone 6 recently now it is fall down on the ground and any chance to repair buy apple on free of cost if not then what will be price for this

    santosh7783 wrote:
    and its screen is break down please help me
    iPhone 6 screen replacement is $109 U.S.
    => https://www.apple.com/support/iphone/repair/screen-damage/

  • What will the output resolution be from the multicam if the input clips have varying resolution ?

    Hi there,
    I wanted to use the multicam features so I took 4 different angles. Unfortunately they have mixed resolution like 1920 x 1020 and another in 4K.
    In multicam, for those section I selected the 4K video, will I be able  enlarge and panned the video w/o the videos getting blur ...
    Thanks

    RyanManUtd wrote:
    … Only thing that I am puzzled is why FCPX even bother to ask us to select the resolution that we wanted when we create a multicam clip ? …
    Honestly? No idea
    Probably, because a clip HAS to have a 'resolution' - that simple.
    RyanManUtd wrote:
    ... just a thought, if the normal resolution of video increased from 1080p to 4K in the future and becomes a standard, then we gotta find a camera that can do 16K ?
    hmm, well ... pixel per se is no 'quality'… you soon enter the realms of Angular Resolution and Edge Enhancement and Acutance …
    For good reasons, Apple decided 'Retina' means 200-400 ppi : depending on viewing distance, and due to Angular Resolution of the human eye (about 2° - only!) any more pixels is of little use ... just have a - close - look at a billboard aside the street: palm-size 'pixels', but crystal clear on drive-by.
    So, a UHD-display in the living-room smaller than 60" ... is probably 'waste of ammo'… -
    (diffrent for computer display! Then, we sit much closer to it!).
    At the soccer world-cup last year, NHK tested 8k cams - again: not for l'art pour art 'quality', but again for reframing; for broadcasting football, Fox uses frequently 4k-cams, you can see in use in this (for me… )  very interesting article Any Given Sunday/theverge.com ... as a hobby-sports-reporter, I ínhaled that article .. LOL!
    No, not 10k-cam, I want one of those:
    enjoy movie making!!!

  • I want to turn my macbook air off. the shut down button already appeared but the mouse/cursor just hang and won't work. even after pressing the enter button to shut my mac off won't work. what will i do?

    i want to turn my macbook air off. the shut down button already appeared but the mouse/cursor just hang and won't work. even after pressing the enter button to shut my mac off won't work. what will i do?

    This is not a reply. I just want to elaborate on this problem.
    My computer freezes occasionally when it is used after being sleep for a while. The spinning ball appears and everything is totally disabled. Nothing on the keyboard works.
    The mouse moves, but does not work.
    The only solution is to turn the power off and on (losing all data in open applications.)
    I kept the System monitor running on the side to find out which program was running when the computer froze. The Monitor as well as all other applications froze, but the data showed:
    Firefox 18.4%
    Activity Monitor 0.9%
    Firefox Plugin 0.2%
    This is all the information I have. By the way, I am using iMac with OS 10.6.

  • Output from this file

    Hi,
    just i want how will atomatically output form this file to todays date file .
    I have create daily report so how will you copu following output to to todays date.txt file copy.
    DATECOMP=`date '+%d%m%Y'`
    DATECOMP1=`date '+%y%m%d%k%M'`
    DATECOMP2=`date -d "-1 day" '+%d%m%Y'`
    mkdir /oracle/${DATECOMP}.txt
    du -sh /oradata/arch
    du -sh /oradata/backup/xyz_backup/${DATECOMP2}.tgz
    du -sh /oradata/dpdump/xyz_${DATECOMP1}.dmp.gz
    du -sh /oracle/product/10.2.0/db_1/admin/xyz/bdump/alert_xyz.log
    du -sh /oracle/product/10.2.0/db_1/admin/xyz/udump
    du -sh /oracle/product/10.2.0/db_1/admin/xyz/cdump
    du -sh /oracle/product/10.2.0/db_1/network/log/listener.log
    du -sh /oracle/product/10.2.0/db_1/network/log/sqlnet.log

    Surely I agree with Pavan here that I amnot able to "exactl" understand the need or question. But I guess you want a daily report sort of thing. Make up a shell script and then configure it with DBMS_SCHEDULER.We don't know that youhave 10g or not but still I am just taking a guess that you have. Than using UTL_FILE ,maintain the o/s file the way you want.
    Aman....

  • HT1386 I restore my iPhone on it's factory setting as it says on the process but it can't able to detect my sim card? What can I do about this?

    I download an update and on my iPhone but what happened is all was gone and I can't able to go through on it's original setting, i tried restoring it but i failed, my sim card not detected and it says actiation server is unavailable, what should I do?

    My phone was not hacked but it undergone private open line processed, and I don't have any idea how they make that. I tried other SIM on my phone but it really doesn't work? Do you have any idea what will I do to this? Thank you so much...

  • HT2534 i did not receive any email verifications? what will i do?

    i already made an apple id but i cannot use it bcoz i did not receive any email verification, what will i do about this?

    You've checked the spam folder on your rescue email account as well as its inbox, and tried clicking the reset link again ? If you still don't receive it then contact Support in your country, after confirming your id and that it's your account they should be able to reset them.
    Contacting Apple about account security : Contact Apple for help with Apple ID account security.
    When they've been reset check that your rescue email address is spelt correctly for potential future use : Manage your Apple ID primary, rescue, alternate, and notification email addresses.

  • What will be the output of this simple programm ?

    Class ABC
    public static void main(String args[])
    long i = 22222222222222222;
    System.out.println(i);
    Pls give me how to get rid of this problem.
    (Casting to long also doesnot make any effect.)
    I think range of long is very big..although i donot know exactly but bigger than what i wrote.
    so why this problem occurs that "value out of range."
    waiting...
    J stands for Java ONLY

    Change Class to class, then do this:
    long i = 22222222222222222L;

  • I'm about to buy a 27" i-Mac. I would like to connect my 30" Cinema Display to it as a second monitor. What will I need to do that? Will this slow down the overal performance?

    I'm about to buy a 27" i-Mac. I would like to connect my 30" Cinema Display to it as a second monitor. What will I need to do that? Will this slow down the overall performance?

    The new iMacs do not come with a MiniDisplayPort, they have Thunderbolt, so unless you are talking about purchasing one of the previous generation iMacs such as this refurbished model in the online Apple store, it won't work. And yes, if you are going to get the full range of video resolutions you will need the Dual-Link version.
    For details see the store's web page on the Dual-Link display adapter.

  • When I tried to open Lightroom 5.4 today I got a msg that says "Lightroom encountered an error when reading from its preview cache and needs to quit. Lightroom will attempt to fix this problem the next time it lauches". What do I do? I get the msg each ti

    "Lightroom encountered an error when reading from its preview cache and needs to quit. Lightroom will attempt to fix this problem the next time it lauches". What do I do? I get the msg each time I try to open it.

    It isn't a file, it's a folder. It will have the same name as your catalog, but will have the extension data. It will be in the same folder along with your catalog. If you need to use the search feature to search for *.lrdata.

  • What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..

    What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
    I try also my old icloud user but its not recognizing the accoun...

    What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
    I try also my old icloud user but its not recognizing the accoun...

  • I need to change my rescue email,but i forgot the password to that email,what will i do?and i have 25 ueros on this apple account so i dont want to make a new one!

    i need to change my rescue email,but i forgot the password to that email,what will i do?and i have 25 ueros on this apple account so i dont want to make a new one!

    Have you forgotten your password? - if so, you have a problem if the email address has gone dead.
    If you know your password, go to the iTunes Store, click on Account. log in and you can change the associated email address.
    If you don't know your password, and have no email address, you are going to have problems because it's difficult to see how Apple are going to identify you as the authorised owner of the account. Contact iTunes Support: go to http://www.apple.com/support/itunes/ - click on 'Other iTunes Store Features' in the list and then on 'Podcasts'. You will see a link to either 'Express Lane', which will guide you eventually to some contact options, or you may see a link to email them.

Maybe you are looking for