Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

INTO clause inside a FOR loop's SELECT query

Boobal GanesanAug 11 2015 — edited Aug 13 2015

Guys,

When i accidentally happen to place an INTO clause in the select query placed in the FOR loop's cursor section, it worked fine! but the variable N always had NULL value in it. I have posted the script and its output below.

Script:
DECLARE

  n NUMBER;

BEGIN

  FOR i IN

  (SELECT dummy INTO n FROM dual

  )

  LOOP

    dbms_output.put_line('n value is '||NVL(TO_CHAR(n),'Null'));

  END LOOP i;

END;

Output:

anonymous block completed

n value is Null

Is this a defect in PLSQL or is this functionality meant for something really appropriate?

Thanks,

B

Comments

Hello

As per

https://docs.oracle.com/cd/E19121-01/sf.x4200/819-4346-20/819-4346-20.pdf

The Sun Fire X4000 series server supports the following Microsoft Windows

operating systems at the time of publication of this document:

■Microsoft Windows Server 2003, SP1 or later, Standard Edition (32-bit)

■Microsoft Windows Server 2003, SP1 or later, Enterprise Edition (32-bit)

■Microsoft Windows Server 2003, Standard x64 Edition (64-bit)

■Microsoft Windows Server 2003, Enterprise x64 Edition (64-bit)

The updated lists of supported operating systems are at the following URLs:

For the Sun Fire X4100 server:

http://www.sun.com/servers/entry/x4100/os.jsp

For the Sun Fire X4200 server:

http://www.sun.com/servers/entry/x4200/os.jsp

Hope this helps

Thank You
Best Regards,
Gabriel

ClaudiuO-Oracle

Hello

Welcome to the community! Thank you for your post. One thing that we do ask all community members to do prior to participating in the community is to Update Your Community Display Name and Avatar! so we can easily identify who you are. Please go ahead and make this update.

Regarding your query this can be verified from 2 sources:

https://www.windowsservercatalog.com/item.aspx?idItem=cb4a2f04-b668-cc8b-9b67-afda91e4d853&bCatID=1333

and/or:

https://docs.oracle.com/cd/E19121-01/sf.x4100m2/820-5837-10/Chap_Intro.html#0_pgfId-1001741

I need to remind you that this is an End Of Life product so no new certifications/drivers or enhancements will be available.

Best regards,

Claudiu

MOSC Community Moderator

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 10 2015
Added on Aug 11 2015
14 comments
5,414 views