not able to run the cursor

declare
cursor ccns is
Select b.bname. 'borrowed ' | TO_CHAR (c.the_count) | Decode (c.the_count, 1, 'time', 'times')
Book b,.
(select count (*) the_count IDB
borrowing
Group submission
) c
where b.bid = c.bid
CTS ccns % rowtype;
Start
Open the ccns;
loop
ccns FETCH in cts.
When the exit ccns % notfound;
dbms_output.put_line(' ');
end loop;
close the ccns;
/


the o/p should be displayed as the bookname bought 1 times
BookName bought 1 times
BookName bought 1 times
can someone help me please?

You must give an alias for the selected expression, so you can reference it in the record type. I have an alias for 'val '. Then you can get out cts.val

set serverout on size 100000
declare
  cursor ccns is
  select b.bname || ' borrowed ' || to_char(c.the_count) || decode(c.the_count,1,' time',' times') val
  from books b,
      (select bid,count(*) the_count
      from borrowing
      group by bid
      ) c
  where b.bid = c.bid;
  cts ccns%rowtype;
begin
open ccns;
loop
fetch ccns into cts;
exit when ccns%notfound;
dbms_output.put_line(cts.val);
end loop;
close ccns;
end;
/
Hello borrowed 3 times
World borrowed 1 time

PL/SQL procedure successfully completed.

But it is better to use a cursor for loop - Etbin response on the other thread works, with the exception of DECODE it.

Tags: Database

Similar Questions

  • system is not able to run the Apple Application Support service

    I can't install itunes on windows 7 32 bit. Any suggestions on Apple Support do not work. The system is not able to run the Apple Application Support service. Any suggestiones?

    Can you post the error message you get when you try to install or launch iTunes?

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach.

    Review the other boxes and other support documents list to the bottom of the page, in case one of them applies.

    The more information box has direct links with the current and recent if you have problems to download, must revert to an older version or want to try the version of iTunes for Windows (64-bit - for older video cards) as a workaround for problems with installation or operation, or compatibility with third-party software.

    Backups of your library and device should be affected by these measures but there are links to backup and recovery advice there.

    TT2

  • MAF: Not able to run the sample project or a simple project with only one page

    Hi all

    I am trying to run examples of applications of the MAF delivered with Jdeveloper 12.1.3. I am not able to run these applications on the device in the emulator. They gets deployed successfully. However, when I try to open these applications, it hangs on the initial screen of the Oracle.

    I even tried to create a new MAF application with only a device with a page of the AMX. Tried to deploy, but still get the same result.

    No idea what could be the problem?

    Thank you

    Ajay

    Hello

    Problem has been resolved, after the re-installation of the Jdev and MAF extension.

    Understood that somehome, maf - application.xml couldn't refer to the features of the maf - feature.xml. When I created a new feature in the MAF - feature.xml, it was the adfmf - feature.xml and maf-application creation could refer to the functionality of this file.

    This seems to me an installation problem. I have therefore re-installed, now its works very well.

    Thank you

    AJ

  • Not able to run the NVL function in the data model

    I tried to use NVL today in the data model, but I got the error message.
    Here's the code: -.
    SELECT ROUND (WHEN BOX: MO_TARGET_DISP_RATE > = 100)
    THEN 100
    (TO ANOTHER NVL (: MO_TARGET_DISP_RATE, 1) END, 2) AS "TARGET_PC_MO".

    Y at - it another option to replace NVL here... that runs in the NOSE? Thanks in advance.

    Just a suggestion, try a view then refer to the display in the data model

    (SELECT (ROUND (CASE WHEN to_number(:MO_TARGET_DISP_RATE) > = 100)))
    THEN 100
    Of OTHER NVL (to_number(:MO_TARGET_DISP_RATE), 1) END 2)), double) My_field

    The error was not a tank for the error number was or media...! If so above should be ok...

  • I am suddenly not able to run the Defender on my system vista sp2 Home premium x 64.

    My Defender program does not work because of error - 0x800705b4.  I am running microsoft databases, but I recently had a problem with so-called trojan attack.  All clear now, but that's the problem of the Defender. Any thoughts?

    On Monday, August 16, 2010 18:43:20 + 0000, Scottvisdef wrote:

    My Defender program does not work because of error - 0x800705b4.  I am running microsoft databases, but I recently had a problem with so-called trojan attack.  All clear now, but that's the problem of the Defender. Any thoughts?

    It's not a problem. Microsoft Security Essentials disables Defender
    because it contains the same features. It's good, not bad.

    Ken Blake

  • Not able to run the digital cable Advisor in Windows Media Center

    Digital cable Advisor

    I can't get the digital cable Advisor in Windows Media Center in Windows 7 Home Premium.  After I installed Windows back me to the same Setup screen.  From what I read on the program, after installation it is supposed to start.  I checked the Extras Gallery and it does not appear there after installation.

    Chris-

    I started taking screenshots of the process tonight and of course the DCA installed successfully and actually worked!  My system has passed the test.  I tried installing in DCA 100 times before and never had that day!

    I suspect that the root cause was due to a problem with the motherboard that was recently repaired.  At least that's my story and I stick to it!

    Thanks again for your help.

    Buggy

  • Not able to run the bios 3CCN16WW update!

    I am trying to install the last update of the bios for lenovo S10 - 3 c o a windows system 7 (I have to update my RAM). But the update ends with the message that the program has stopped working. The details given by the system are also less

    Signature of the problem:

    Problem event name: APPCRASH

    Application name: 3CCN16WW.exe

    Application version: 0.0.0.0

    Application timestamp: 4b0f42d5

    Fault Module name: 3CCN16WW.exe

    Fault Module Version: 0.0.0.0

    Timestamp of Module error: 4b0f42d5

    Exception code: c0000005

    Exception offset: 00022523

    OS version: 6.1.7601.2.1.0.256.1

    Locale ID: 1033

    Information additional 1:8145

    More information 2: 8145a86498ea7bd7c4369bf5b1478377

    Information additional 3:4423

    Additional information 4: 4423454353e7fb7749521da45db49570

    Please someone help to solve this problem.


  • Not able to run the procedure

    Hello world

    I am trying to execute the procedure below,

    CREATE or REPLACE procedure test1 (n1 n2 in number, number, tot OUT number)
    is
    i the number: = null;
    Start
    loop
    If n2 > n1 then
    i: = i + 1;
    tot: = n1 + i;
    dbms_output.put_line (tot);
    elsif n2 < 1 then
    dbms_output.put_line ('enter a higher value for n2');
    end if;
    end loop;
    end;
    /

    All I'm trying to do is to print the numbers according to the values we give during execution, but doesn't seem to work for me.
    IE.,.

    N1 = 1;
    N2 = 5;
    tot = 1,2,3,4,5;

    I'm sorry if there is a mistake in the procedure and would be really grateful if you can help me with this. Thanks in advance for your help.

    Published by: Pravin on August 31, 2010 14:25

    If you want you can use this code it has the same logic

    CREATE OR REPLACE procedure test1(n1  IN number,
                                      n2  IN number,
                                      tot OUT number) is
      cnt number := 0;
    begin
      if n2 < n1 then
        dbms_output.put_line('Enter a higher value for n2');
      end if;
    
      for i in n1 .. n2 loop
        dbms_output.put_line(i);
        cnt := cnt + 1;
      end loop;
    
      tot := cnt;
    end test1;
    
  • not able to run micro security essentials says need to reinstall the client security micro

    not able to run the bases of microsoft security said that I need to install the microsoft security customer no idear was to conclude this

    Additional posts appear in the MSE Forum:

    http://answers.Microsoft.com/en-us/protect/Forum/protect_scanning/i-have-error-code-ox-80070715/578e0e44-99c9-4293-b75e-79e2ff1dc2b6

    http://answers.Microsoft.com/en-us/protect/Forum/protect_updating/not-able-to-uninstalll-micrisoft-security/f3bb8423-3671-453F-BB30-8b7f3e53daad

    Recommended as previously you could try to uninstall your MSE, then download and install a new copy of: File of Installation of MSE

    If it does not contact the MSE Support as previously suggested.

  • Not able to install the common module on satellite Pro A120

    Hi guys:
    I recently reinstalled xp professional on my satellite pro A120. I could download and install the main drivers of http://uk.computers.toshiba-europe.com and my phone is functional. However, I did not all sounds and (F6 & F7 and toggle) function keys not working, even after insalling the sound card. I read some of the posts on this forum and found that I needed insall the 'common' module to make them functional. I downloaded the driver from module common too, but when I run the Setup it starts initially, but fails both the configuration is complete.

    The same thing happens also with a few other drivers as saver of energy etc... I was not able to run the Setup program for the common module & driver power saver, basically, nothing happens after I have the respective installation.

    Can anyone help please?

    Pravesh

    As far as I know on the download page you can find the installation instructions with exact installation document order how to install drivers and tools specific to Toshiba and utilities.
    You have installed all the stuff after this installation order?

  • Not able to open the page in R12

    Hi all

    I developed a page in 9i jdevoloper, I registerd page in oracle applications.
    It works very well in 11i instance. But I'm not able to run the instance of R12 page.
    This is to show the error when I open the page in oracle below applications.

    oracle.apps.fnd.framework.OAException: could not load application module 'wnsgs.oracle.apps.sysadmin.employeeadvancerequest.server.EmployeeAdvanceRequestAM '.
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:279)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1300)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
    in OA. jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    in com.evermind.server.http.ServletRequestDispatcher.access$ 100 (ServletRequestDispatcher.java:51)
    to com.evermind.server.http.ServletRequestDispatcher$ 2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    to the RFjspService(_RF.java:225)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    to oracle.oc4j.network.ServerSocketReadHandler$ SafeRunnable.run (ServerSocketReadHandler.java:260)
    to com.evermind.util.ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
    # # 0 in detail
    Houston-30003: AppPool (wimuat1.wind.wnsgroup.netTESTFIN1529wnsgs.oracle.apps.sysadmin.employeeadvancerequest.server.EmployeeAdvanceRequestAM) failed at the checkout a module of application because of the following exception:
    oracle.jbo.JboException: Houston-29000: Unexpected exception caught: oracle.jbo.JboException, msg = Houston-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg = Houston-25002: type wnsgs.oracle.apps.sysadmin.employeeadvancerequest.server.EmployeeAdvanceRequestAM ApplicationModule definition not found
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)
    at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.useApplicationModule(OAHttpSessionCookieImpl.java:511)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:208)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1300)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
    in OA. jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    in com.evermind.server.http.ServletRequestDispatcher.access$ 100 (ServletRequestDispatcher.java:51)
    to com.evermind.server.http.ServletRequestDispatcher$ 2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    to the RFjspService(_RF.java:225)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    to oracle.oc4j.network.ServerSocketReadHandler$ SafeRunnable.run (ServerSocketReadHandler.java:260)
    to com.evermind.util.ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)


    Can someone help me on this issue... It is urgent

    Thank you
    NGO

    Published by: NGO on May 8, 2012 14:17

    Clear the cache in the responsibility of the functional administrator and not the bounce apache to apply the changes

  • Not able to run RealPlayer on the Windows XP machine, the file msvcp90.dll is missing

    Dear Sir / Madam,.

    Pls help advise the question of 'not able to run RealPlayer on Windows XP machine, file msvcp90.dll is missing'?

    Thank you!

    Hi EddieFang,

    Try to download and install real player http://www.real.com.au/.

    I hope this helps.

  • Why you're not able to get the new June 20th, 2016 updates on your creative cloud, if you are running Windows 7.

    Why you're not able to get the new June 20th, 2016 updates on your creative cloud, if you are running Windows 7.

    So I spent all day on this because Adobe did not anywhere that I could find it. But I'm hoping some of you to save a lot of time wasted... you can't upgrade to the latest version of the application if you have not all updates to Windows 7.


    If you're like me and do not want anything to do with the Windows updates... you may encounter the same problem. Summer/don't I am not at all interested in Windows 10 (who they are sneaking into regular updates) so I don't usually have enabled updates. If you don't... you cannot upgrade your program to the latest version. Creative cloud not even give the option.


    I think it's the Microsoft Visual C++ or something like that who needs update to run the latest version of the software... If you do not have it on your system, you do not install the new updates properly, but be careful not to download sneaky windows 10 "update." Know how it's called blindly here before update you.

    I hope that helps some of you save a whole day unnecessarily.

    Some programs on a win os to visual c ++ 2015, Download Visual C++ Redistributable for Visual Studio 2015 of official Microsoft Download Center

  • The host CPU is not able to run 64-bit virtual machines

    I am running VMWare Server Console on a Windows 2003 64 bit OS 1.0.3 and prepare to create a 64-bit VM server to test a new application on.  This forum server works on is a SuperMicro SuperServer 6025 B - TR +.  I entered the bios and activated the virtual bios in the CPU settings.  However, when I start my VM, I get the following error:

    «You have configured the virtual machine as an operationg system 64-bit client.»  However, this host processor is not able to run 64-bit virtual machines or this virtual machine has 64-bit support disabled.

    I looked online and saw some references to allow an EM64T which was to be activated but I do not see this option in my BIOS.  Someone at - it any other suggestions as to what I have to do to get the virtual machine to use the 64-bit compatibility.

    Unfortunately, the 1.x server logs are a little sparse in this regard.  However, it seems that you have mixed steppings of physical processors.  In this range of models, Intel changed the VMCS review between the Bx steppings and Gx steppings ID, making it incompatible for the execution of VT - x.  Realizing their mistake, Intel has provided to OEMS for a microcode patch that makes the revision ID the Gx stepping VMCS matches that of the Bx stepping.  OEMs distribute this patch of microcode as a BIOS update.

    In short, an update of the BIOS of your system provider should solve the problem.

  • I do not have the minimum memory required, I'll be able to run the SDK?

    Specifically, I only have 2 GB of memory, half of the 4 GB memory required. I'll be able to run the SDK? I anticipate performance issues, but it will hinder me to the point of unusable?

    It would be like any piece of software.  It is unlikely that the SDK will actually check the physical memory, simply use a lot and they recommend 4 GB or whatever.  My IDE runs a view C++ uses 500 MB.  But if you have a browser open (450 MB), you may have a lot of permutation (the hard disk used as extra memory).   The performance will depend on the speed of your hard drive and then (SSD or 7200/5400) when all apps/os reaches the limit of 2 GB system and thrash.

Maybe you are looking for

  • Problems of STR-DH750 subwoofer with PS4

    I had this problem about a year ago and fixed it, now he's back, and I don't remember what I did to solve this problem, LOL! My problem is the signal isn't getting my Sub. It's here, and he sees the system. But the level is not there. Now for the kic

  • Your comments on the description of the hotfixes in the drivers section

    I couldn't find a comment section so I'll leave my comments on section drivers here. Instead of putting the description of Windows patches in downloading files installation or anything that might be called Toshiba should put a brief description of wh

  • Stop: 0 x 00000050 (0xf05c371c, 0x00000000, 0x804e70dd, 0x00000000 during installation of Windows XP.

    Original title: 0 x 00000050 (0xf05c371c, 0x00000000, 0x804e70dd, 0x00000000 Stop: 0 x 00000050 (0xf05c371c, 0x00000000, 0x804e70dd, 0x00000000 Can someone help with this error. I have a model Assembly, so that the installer of Windows XP (sp3), this

  • BlackBerry 10 Setup Blackberry z10

    I totally forgot the password I used to set my z10 after reset, the anti-theft protection device. So I deleted my account and made another with the same email. again let me connect. Is that a way to factory reset? or is there a way around it. Thank y

  • Repository many-to-many relationship, a side not updated.

    Hello.We have a point called creditCardInstallments descriptor and in a list of products.< table name = "lc_install_products" type = "multi" id-column-names = "install_id" >< property name = data type "productList" = "dΘfinir" column-name = 'product_