Solve this code

hai all
i solve a dayanamic "select" statement using ref cursor.but the output is displaying without spaces .i want to split the output.
see this code.i need a output in browser(using htp package).
declare
TYPE generic_rc IS REF CURSOR;
cv generic_rc;
column_list varchar2(500);
temp varchar2(500);
BEGIN
column_list:='select pname| |course| |splace from studies ';
OPEN cv FOR
column_list;
loop
fetch cv into temp;
exit when cv%notfound;
dbms_output.put_line(temp);
insert into tab1 values(temp);
end loop;
close cv;
commit;
end;
here i am selecting 3 columns.i got answer without space.how to split the answer.
advanced thanx for ur repply
null

Your code was :
column_list:='select pname| |course| |splace from studies ';
Try:
column_list:='select pname| |' '| |course| |' '| |splace from studies ';
For output in a browser, change dbms_output.put_line by htp.p
Hth,
Ton

Similar Messages

  • Can anyone help me to solve this code , its in a swing , jseparator...

    hey
    can any one solve this code ??
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class File1 extends JFrame
              public static void showgui()
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   JLabel emptyLabel = new JLabel("");
         emptyLabel.setPreferredSize(new Dimension(640, 480));
         frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
                   JButton b1= new JButton("JENIS");
                   add(b1);
                   b1.setBounds(350,220,120,20);
                   JSeparator jE =new JSeparator(JSeparator.HORIZONTAL);
                   jE.setBounds(350, 205, 120, 20);
                   add(jE);
                   add(new JSeparator(JSeparator.HORIZONTAL));
                   JButton b2= new JButton("MODI");
                   add(b2);
                   b2.setBounds(100,210,100,100);
                   frame.pack();
         frame.setVisible(true);
    public static void main(String[] args)
         javax.swing.SwingUtilities.invokeLater(new Runnable()
              public void run()
                   showgui();
    actually i want to use jseparator , so if this cant be solved , send me another code that uses jseparator and gives the vertical / horizontal line between two buttons??
    Its urgent ,
    waiting for reply............

    Hi,
    Is this ok?
    public class NewJFrameSep extends javax.swing.JFrame {
            public NewJFrameSep() {
            initComponents();
        private void initComponents() {
            jSeparator1 = new javax.swing.JSeparator();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            getContentPane().setLayout(null);
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().add(jSeparator1);
            jSeparator1.setBounds(110, 120, 170, 100);
            jButton1.setText("jButton1");
            getContentPane().add(jButton1);
            jButton1.setBounds(160, 80, 71, 23);
            jButton2.setText("jButton2");
            getContentPane().add(jButton2);
            jButton2.setBounds(160, 140, 71, 23);
            pack();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrameSep().setVisible(true);
       private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JSeparator jSeparator1;
    }regards
    dina

  • Plss help me solve this codes

    to those expert in java programming, i am new to java and i encounter a problem within my codes. You see, the program is supposed to be counting multiple numbers of the items as well as its price too. But i only can input 1 price i'll give you the code if you all don't really mind
    import javax.swing.JOptionPane;
    public class disc {
         public static void main (String[] args){
         String bil=JOptionPane.showInputDialog(null,"Bilangan barang ialah","Bilangan",JOptionPane.QUESTION_MESSAGE);
         int bil1=Integer.parseInt(bil);
         double jumlah=0; //jumlah harga
         double diskaun=0; //jumlah diskaun
         double jum=0; //jumlah selepas diskaun
         int i;
         int b=1;
         for (i=1; i<=bil1; i++){
         String Har=JOptionPane.showInputDialog(null,"Harga barang ke-"+b,"Harga",JOptionPane.QUESTION_MESSAGE);
         double harga=Double.parseDouble(Har);
         jumlah=jumlah+harga;
         b++;
         if (bil1>=1000){
              if (jumlah<=10.00)
              diskaun=jumlah*0.21;
              else
              if ((jumlah>=10.01) && (jumlah<=100.00))
              diskaun=jumlah*0.32;
              else
              diskaun=jumlah*0.43;
         else
         if ((bil1>=500) && (bil1<=999)){
              if (jumlah<=10.00)
              diskaun=jumlah*0.09;
              else
              if ((jumlah>=10.01) && (jumlah<=100.00))
              diskaun=jumlah*0.15;
              else
              diskaun=jumlah*0.21;
         else
         if ((bil1>=100) && (bil1<=499)){
              if (jumlah<=10.00)
              diskaun=jumlah*0.05;
              else
              if ((jumlah>=10.01) && (jumlah<=100.00))
              diskaun=jumlah*0.07;
              else
              diskaun=jumlah*0.09;
         else
         if ((bil1>=10) && (bil1<=99)){
              if ((jumlah>=10.01) && (jumlah<=100.00))
              diskaun=jumlah*0.02;
              else
              if (jumlah>=100.01)
              diskaun=jumlah*0.05;
         jum=jumlah-diskaun;
         JOptionPane.showMessageDialog (null,"Jumlah harga ialah RM" jumlah "Jumlah diskaun ialah RM" diskaun "Jumlah harga selepas diskaun ialah RM"+jum,"Jumlah",JOptionPane.INFORMATION_MESSAGE);
         System.exit(0);
    plss help me solve the prob

    I am having trouble understanding your code and question, partly to do with the formatting (as mentioned above), but also to do with the language barrier.
    I don't know what I am being prompted for, and the variable names mean nothing to me, so translating these (even into broken English) would be a good start.
    Secondly, you are saying you want two inputs (I think), but you only get to input bill once, this is because:
            String bil= JOptionPane.showInputDialog(null,"Bilangan barang ialah","Bilangan",JOptionPane.QUESTION_MESSAGE); is outside the FOR loop, so only run once. The only time you are asking for any input inside the loop is with:
                String Har=JOptionPane.showInputDialog(null,"Harga barang ke-"+b,"Harga",JOptionPane.QUESTION_MESSAGE);which is run several times.
    If you want to take more than one ?bill?, you need to either implement another loop somewhere (either two separate loops or nested, depending what you are trying to do), or have another input dialog inside the loop.
    I am sorry I cannot be more specific, this is only because I don't understand what you are trying to do.

  • I am unable to watch any tv channel due to the problem that it says is the source code is protected by html guardian. how to solve this problem?

    when i tried to watch a tv channel on livetvchannelsfree.in it says that the source code is protected by html guardian. in firefox 3.6 beeta5 i did not come across this problem. but now in latest version i am unable to watch any tv channel. canyou please tell me how to solve this problem?

    Forgotten Passcode or device disabled after entering wrong passcode

  • HT1918 I'm trying to update my credit card, but it won't let me input the security code.  Does anyone know how to solve this problem?

    I'm trying to update my credit card in ITunes, but it won't let me input the security code.  Does anyone know how to solve this problem?

    Could you give me more details on how it would let you put in the CVV?

  • I have to type my security code every time I turn on my ipad with ios6.0. I don' have to this with ios5.1. How can I solve this problem?

    I have two problems with IOS 6.0.
    1. I have to type my security code every time I turn on my ipad with ios6.0. I don' have to to his with ios5.1. How can I solve this problem?
    2. I can not send email via Yahoo as usual, Only Safari allow me to it.
    Accordingly, I am writting here to ask for to solve those problems.
    Thanks in advance.

    * Websites remembering you and automatically log you in is stored in a cookie.
    * You need an allow cookie exception (Tools > Options > Privacy > Cookies: Exceptions) to keep that cookie, especially for secure websites and if you let cookies expire when Firefox closes
    * Make sure that you do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    See also http://kb.mozillazine.org/Cookies

  • HT201303 My Visa Card was declined due to wrong security code entered by mistake. How I can solve this issue?

    My Visa Card was declined due to wrong security code entered by mistake. How I can solve this issue?  

    Welcome to the Apple Community.
    The following article(s) may help you.
    Credit card security code or postcode issues.     (10)

  • Threat Feed say my ipad2 got threats, memory corruption vulnerability exist, which could lead to remote code execution. How to solve this problem?

    Threat Feed (McAfee) say my ipad2 got threats, memory corruption vulnerability exist,
    which could lead to remote code execution. How to solve this problem?

    You can't solve this problem yourself. You would need to wait for apple to release a "fix" or for McAfee to revise their judgement.
    If you're worried about the threats, don't do things that would expose yourself to the vulnerability that they describe.
    Since I can't see what you're looking at, I can't give you any other advice.

  • I cant make restore for my iphone 3gs??,,,, needs restore and itunes cant make restore has an error code 2003... How can I solve this problem?

    i cant make restore for my iphone 3gs??,,,, needs restore and itunes cant make restore has an error code 2003... How can I solve this problem?

    See this support document for information about update and restore errors. Resolve iOS update and restore errors

  • TS3694 my i pad is showing connect to i tunes picture when i connect to i tunes it tells me i need to restore, but when i do it keeps coming up with error code!! which is a different one each time can anyone offer some advise to solve this frustrating pro

    my i pad is showing connect to i tunes picture when i connect to i tunes it tells me i need to restore to factory settings, but when i do it keeps coming up with error code!!   which is a different one each time can anyone offer some advise to solve this frustrating problem.

    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
     Cheers, Tom

  • TS3694 i am facing error code 1015 while restoring software 4.2.1 on my iphone 3g. please let me know how to solve this problem/error without losing my important time.

    good evening
    can u help me to solve this problem.

    Is the iPhone jailbroken or was jailbroken?. In the article " http://support.apple.com/kb/TS3694 " it says:
    Errors related to downgrading iOS
    The required resource can't be found: This alert message occurs when your device has a newer version of iOS than what is available in iTunes. When troubleshooting a device that presents this alert message, go toSettings > General > About and check the version of iOS on the device. If it's newer than the latest released iOS version, the device may have a prerelease developer version of iOS installed. Installing an older version of iOS over a newer version isn't supported.
    Error 1015: This error is typically caused by attempts to downgrade the software for an iPhone, iPad, or iPod touch. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version isn't supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you're now trying to restore to an authorized, default state.

  • Hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem pleas

    hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem please
    and this is an pic for the problem

    There is some troubleshooting for 0xE8 error codes on this page : http://support.apple.com/kb/TS3221 - you could see if anything on that page fixes it

  • See who can solve this problem

    Parameter name   || Typing     ||  Associated Type
    ACGL_ITEM         || Structure ||  ACGL_ITEM
    this give error ( Typing is only for Like,Type,Type Ref To )
    therefore i change it to Type
    but it telling me that the ( TABLES parameters are obsolete!)
    guys what can i do, is there a solution to solve this problem??
    Thank you.
    Edited by: guanwei su on Mar 10, 2008 7:05 AM

    The following code might be helpful:
    TYPES: types_t_acgl_item TYPE STANDARD TABLE OF acgl_item.
    DATA: gt_acgl_item TYPE types_t_acgl_item.
    PERFORM sub_perform USING gt_acgl_item.
    *&      Form  SUB_PERFORM
    *       text
    *      -->UT_ACGL_ITEM  test Table
    FORM sub_perform USING ut_acgl_item TYPE types_t_acgl_item.
    ENDFORM.                    " SUB_PERFORM
    Hope That Helps
    Anirban M.

  • Help me to solve this Jsp problem

    //Class1.java
    package p1.p2;
    public class Class1 implements Serializable
    private String name1,name2;
    public void setName1(String name)
    name1=name;
    public String getName1()
    return name1;
    public void setName2(String name)
    name2=name;
    public String getName2()
    return name2;
    //Class2.java
    package p1.p2;
    public class Class2
    String name1,name2;
    public String insert(Class1 c1)
    name1 = c1.getName();
    name2 = c2.getName();
    return name1;
    //Class3.jsp
    <%@ page import="p1.p2.*" %>
    <html>
    <form action="/bobby/Class3.jsp" method=post>
    Name1 : <input type=text name="cn1">
    Name2 : <input type=text name="cn2">
    <input type=submit value="Click"/>
    </form>
    </html>
    <%! String a,b,c; %>
    <%
    Class1 c1 = new Class1();
    Class1 c2 = new Class2();
    a=request.getParameter("cn1");
    b=request.getParameter("cn2");
    c1.setName(a);
    c1.setName(b);
    c=c2.insert(c1);
    out.println(c);
    %>
    WHEN I RUN THE JSP PROGRAM I GOT THE FOLLOWING ERROR.TELL ME THE SOLUTION TO SOLVE THIS PROBLEM.
    javax.servlet.ServletException:
    p1.p2.Class2.insert(Lp1/p2/Class1;)Ljava/lang/String;
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:825)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:758)
    org.apache.jsp.Class3_jsp._jspService(Class3_jsp.java:76)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    root cause
    java.lang.NoSuchMethodError: p1.p2.Class2.insert(Lp1/p2/Class1;)Ljava/lang/String;
    org.apache.jsp.Class3_jsp._jspService(Class3_jsp.java:67)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

    First, please put your code inside code tags. There's a nice little button. All you have to do is paste your code, highlight it and press the little code button. Thanks.
    I had to make some adjustments to your original post. Either you had some closing braces in the wrong place, or you hve no idea what you're doing. I'm going to assume that Class1 is in a file named p1/p2/Class1.java and Class2 is in p1/p2/Class2.java.
    //Class1.java
    package p1.p2;
    public class Class1 implements Serializable
        private String name1,name2;
        public void setName1(String name)
            name1=name;
        public String getName1()
            return name1;
        public void setName2(String name)
            name2=name;
        public String getName2()
            return name2;
    //Class2.java
    package p1.p2;
    public class Class2
        String name1,name2;
        public String insert(Class1 c1)
            name1 = c1.getName();
            name2 = c2.getName();
            return name1;
    //Class3.jsp
    <%@ page import="p1.p2.*" %>
    <html>
    <form action="/bobby/Class3.jsp" method=post>
    Name1 : <input type=text name="cn1">
    Name2 : <input type=text name="cn2">
    <input type=submit value="Click"/>
    </form>
    </html>
    <%! String a,b,c; %>
    <%
        Class1 c1 = new Class1();
        Class1 c2 = new Class2(); //<-- problem here, do you see it?
        a=request.getParameter("cn1");
        b=request.getParameter("cn2");
        c1.setName(a);
        c1.setName(b);
        c=c2.insert(c1);
        out.println(c);
    %>Note the I highlighted the problem above. HTH.

  • HT203421 i buy a macbook air with my friend and i changed the apple id also.at first i can update the application but now its impossible to update the application.when i clock to update it shows the id of my fren andsomebody do you have idea to solve this

    i buy a macbook air with my friend and i changed the apple id also.at first i can update the application but now its impossible to update the application.when i clock to update it shows the id of my fren andsomebody do you have idea to solve this problem.

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can boot from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted in Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. You will need the Apple ID and password that you used to upgrade. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.

Maybe you are looking for

  • Can't open or download on my macbook air

    I can't view or download docs from oracle on my Mac Book Pro

  • One Big ViewObject vs ViewObject with links to other ViewObjects

    Hi guys, I am trying to figure out the best practice to implement the following requirement; I have 4 different entity objects (let's say A-EO, B-EO, C-EO, D-EO). All of them are related by the same person_id, and the relationship is One to One. I ne

  • When does my AppleCare agreement start?

    If you buy an AppleCare agreement (from the online store) in the same order as, say, an iMac, but the computer doesn't ship right away, when does the agreement start? When the agreement is bought, or when the computer arrives and you register it? I b

  • Oracle Client for Windows 2008 R2

    is there a 10g or 11g cleint available for Windows 2008 R2? The latest Win64 or Windows 2008 clients all give me an error that saus it supports versions up to 6.0 and I have version 6.1

  • Opening new tabs in FF 6

    Upgraded 2 the 6.0 & ever since whenever I open a new tab I have to sign in all over again 2 my social media sites DIGG, Twitter, StumbleUpon using my AddThis addon What's Up? never had to do that before when activating additional tabs once I was sig