Number - string question

Hello,
I have the next problem:
I have cursor that contains the next thing:
WHERE LKP_INDUSTRY1_ID IN ( p_sector )
p_sector is being delivered in varchar: '23;22;36'
My question is: is it possible to manipulate p_sector in a way that I can paste it in my cursor? I can replace the ';' with ',' but I don't know how I can make it read the numbers as numbers and not as strings.
Thanks in advance.
Oli

Does this solve your problem ?
SQL> create or replace type tab_n is table of number;
  2  /
Type created.
SQL> declare
  2   p_sector varchar2(20) := '7369;7499;7521';
  3   t tab_n := tab_n();
  4   element number;
  5   pos integer := 0;
  6   cursor a is select ename from emp where empno in (select * from table(t));
  7  begin
  8   for i in 1..length(translate(p_sector || ';',';0123456789',';')) loop
  9    t.extend;
10    t(t.count) := substr(p_sector,pos+1,instr(p_sector || ';',';',1,i)-pos-1);
11    pos := instr(p_sector,';',1,i);
12   end loop;
13   for v in a loop
14    dbms_output.put_line(v.ename);
15   end loop;
16  end;
17  /
SMITH
ALLEN
WARD
PL/SQL procedure successfully completed.Rgds.

Similar Messages

  • I want to cut and paste iCal entries on iPad.  Have seen a number of questions raised but no definitive answer - is it possible or not?  (I use Bento but that doesn't sync with ICal now so can use that solution)

    I want to cut and paste iCal entries on iPad.  Have seen a number of questions raised but no definitive answer - is it possible or not? 
    (I use Bento but that doesn't sync with ICal now so can use that solution)
    Hope to hear helpful news soon....
    C

    No, the camera connection kit only supports the copying of photos and videos to the Photos app, it doesn't support copying content off the iPad. For your second camera instead of the SD reader part of the kit, does the iPad to camera cable not work with it for direct transfer to the iPad ?
    For Lightroom and Nikon software again no - you can only install apps that are available in the iTunes app store on your computer and the App Store app on the iPad, 'normal' PC and Mac (OS X) software are not compatible with the iPad (iOS). There are some apps that perform fairly basic editing functions that are available in the store, but nothing as sophisticated as, for example, Lightroom.

  • How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    Use a normal question, and do not add the score to the total score. That will give you a correct score at the end. But the total number of questions, that system variable will still take into account all questions. You'll need a user variable, and calculate its value by subtracting 1 from the system variable cpQuizInfoTotalQuestionsPerProject. Same for the progress indicator if you want to show it?
    Customized Progress Indicator - Captivate blog
    If you want to allow Review, you'll have to tweak as well. You didn't specify the version, and all those questions I now mentioned.
    And my approach, since you talk about only one question: create a custom question, because you'll have total control then.

  • Incorrect number of questions being displayed

    I have created a set of 12 question in Captivate 4 (Windows XP), and the "number of questions" indicated both on the final "summary" slide and also the slide counter (slide x of y) both say  there are 13 questions yet there are only 12 questions.
    There are only 12 questions...anyone have any ideas why this is and how to fix it?
    Noel
    Staffordshire
    England

    Hi Noel
    Does the link below help?
    Click here to view the Frequently Encountered Issues page at Question Count
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Is there a limit of number of questions in this forum?

    Because I posted some questions which were removed..

    Is there a limit of number of questions in this forum? No, but forum etiquette strongly suggests you keep a thread on any individual topic continuous (that means together no matter how long that thread might become). So, you should NOT post separate individual questions for every tiny nuance you might have.
    The inherent nature of a forum is that thread topics get spread far apart as time goes by. If your inquiry is splattered into individual new posts, they WILL get scattered and your topic will no longer make any sense.
    Anyone you hope to respond to you will lose all focus on the topic and will just no longer try to give you answers.

  • Max number of questions in Studio forms

    Hello all,
    Is there is a limit to the number of questions you can add in a Studio form?
    Thanks,
    J. Underwood

    J,
    I'm not sure if there is a max number of questions in a form, but we have encountered issues when using Studio on a SQL server with a max amount of data being stored in a record.
    It seems that SQL server can only store a max of 8060 bytes per row. This has caused us a few headaches, especially after the studio wizard allows the form, but when you go to
    submit the form you get an error message.
    Its not an issue with an Oracle database though!

  • Number of Questions - 1Z0-031

    Hi all,
    I'm looking for Number of Questions in the Oracle site, but I'm not found. :(

    What is 42?42 is literally the answer to life, the universe and everything.
    Cheers, APC

  • Splitting a Number String without using split()

    What is the better way of converting a number string where the numbers are seperated by a white space into an array without using the split() method or tocharArray e.g numberString = "12 13 14" numberArray[0] = 12, numberArray[1] = 13, etc

    If you know the number of elements in the string, you can create a predefined fixed array. You can also search for empty spaces.
    String text = "12 13 14";
    int COUNT = 3;
    public void doit() {
      int[] arr = new int[COUNT];
      int sub1 = 0;
      int sub2 = 0;
      for(int i=0; i<COUNT - 1; i++) {
        sub2 = text.indexOf(" ", sub2 + 1);
        arr[i] = Integer.parseInt(text.substring(sub1, sub2));
        sub1 = sub2 + 1;
      arr[COUNT - 1] = text.substring(sub1, text.length());

  • How to parse a BigDecimal from a localized number String

    I want to be able to build a BigDecimal instance from a localized String.
    i.e.: From a string like "2.123,45123" I want to get when I get by doing: new BigDecimal("2123.45123");
    The NumberFormat parse(String) method answers doubles, so I lose presition. When I do nf.parse(2,0000000000000000001) y get a Double representing 2. I can't make a BigDecimal from such a string afaik.
    The problem is the localized version on the number (in the string) otherwise it works fine (with the US locale).

    >>
    So you only can't convert a string to a BigDoublethat
    uses the ',' for the decimal place and the '.' forthe
    real number separators? If that's the case, whycan't
    you use a String buffer then to strip out all the
    periods and replace the comma with a period so it
    looks like a US decimal string then use that?Thank you very much for your answer. That would have
    been a workaround. I found a BigDecimal parser that's
    absolutely perfect for the task.
    http://users.belgacombusiness.net/arci/math/
    Gives to BigDecimals what java standard gives to all
    the other Number subclasses. Good! Frankly, I'm usually just lazy enough to hack a solution.... because I like to say that I hack. evil laugh

  • Two String questions

    Hi!
    I have two questions:
    1) Can I do toString() on a null value?
    2) Is there any difference in writing:
    String s = new String();
    and
    String s;

    isnt it true that in the first case s -object of
    String class is created??Yes, the empty string, length zero, as he said.
    >
    in second case just defining a variable type String??Yes. It will either be null or have an udefined value, depending on whether it's a member variable or a method variable.

  • Convert string question... "\"

    I try the below code on jsp, but result is : a , a\b
    but I want the result is : a\\b, a\\\\b
    Thanks !
    <%
         String str = "a\b, a\\b";
         String outStr = "";
         for (int i=0;i<str.length();i++){
              char c = str.charAt(i);
              if (c == '\\'){
                   outStr += "\\";
              else{
                   outStr += c;
    %>
    <%=outStr%>

    Right, because the compiler interprets "\\" as an escape character, indicating that you want a backslash. (If you tried to just use a String "\", you'd probably get a compilation error, since the compiler would think you were trying to escape the second quotation).
    I think you're going to need to use RegExp... this question has been asked a bunch before, so search through the forums for an answer.

  • Urgent String question

    The effect of repeated concatenation of Strings can cause a lot of unwanted objects in memory. If I am creating a query statement as follows:
    String query = "Select * from"+tablename+"where something "+x+"something"+y.......(All in a single statement)
    Willl this also create a lot of unwanted objects before query finally gets its value? Should I do this concatenation with a stringbuffer?

    I found the following listing and hope it helps...
    http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39990
    15.18.1.2 Optimization of String Concatenation
    An implementation may choose to perform conversion and concatenation in one step to avoid creating and then discarding an intermediate String object. To increase the performance of repeated string concatenation, a Java compiler may use the StringBuffer class or a similar technique to reduce the number of intermediate String objects that are created by evaluation of an expression.
    For primitive types, an implementation may also optimize away the creation of a wrapper object by converting directly from a primitive type to a string.
    Hope this also helps.

  • Contact number for questions on customer hierarchy

    Hi All,
    If anybody doesn't mind then is it possible to get the contact number, as I have lots of questions on Customer hierarchy. I am not able to put them properly on the forum?
    Regards
    Rajesh

    Hi
    If you have query in customer hierarchy, feel free to contact.
    send me ur personal e mail id, will update the contact number.
    Reward if it helps
    Regards
    Prasanna R

  • Binary or number string

    Hi...
    How can I know if a string is a binary or number?
    thank you.

    You can only test for a String not containing a binary number like this..
    boolean isNotBinary = ( someString.indexOf( "0" ) == -1 && someString.indexOf( "1 ) == -1 );As a number can be anything with "-012345678eE." and has to adhere to a specific format to qualify as a number AND the fact that the radix makes everything ambiguous determining if a String contains a number and is binary becomes horribly complicated.
    Your definition of number needs to be more tightly defined, integer/long, float/double, fixed decimal and integer/long numbers with different radix need to be considered before you can test for numberness.

  • Newbie String Question

    * @(#)NumberBox.java 1.0 03/11/03
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    import javax.swing.*;
    import java.util.*;
    public class NumberBox extends JApplet
                             implements ActionListener{
         JButton medianButton;
         JButton avgHighLowButton;     
         JTextField inputNumbers;
         ArrayList userInput;
         public void init() {
              Container c = getContentPane();
              inputNumbers = new JTextField(100);
              avgHighLowButton = new JButton ("List Details");
              medianButton = new JButton("Get Median");
              userInput = new ArrayList();
              c.add(avgHighLowButton);
              c.add(medianButton);
              c.add(inputNumbers);          
              getContentPane().setLayout(null);
              inputNumbers.setBounds(150,50,300,30);
              avgHighLowButton.setBounds(390,260,100,30);
              avgHighLowButton.addActionListener(this);
              avgHighLowButton.setActionCommand("avg");
              medianButton.setBounds(10,260,100,30);
              medianButton.addActionListener(this);
              medianButton.setActionCommand("median");
         public void actionPerformed (ActionEvent e){
         if ("median".equals(e.getActionCommand()))
    System.out.println("median pressed");
    JOptionPane.showMessageDialog(null, "The Median of this Set is: \n");
    else
              System.out.println("avg pressed");
              JOptionPane.showMessageDialog(null, "The Average of this Set is: \nThe Highest Number is: \nThe Lowest Number is: \n");
         public void ActionPerformed (ActionEvent e){
         //String = string;
              JOptionPane.showInputDialog(null,inputNumbers.getText());
              //string = " " + inputNumbers;
              //System.out.println("User Input"+ string);
    basically i want the user to type in a comma seperated list of numbers into a JtextField and tokenise this for manipulation. what i don't really know (and can't seem to find a simple answer too) is how to convert this input text into a String in the first place. either my basic understanding of the language is skewed (very likely) or i'm missing something very simple (also very likely).
    any suggestions, other than STFW. java.sun/google is good and all but as stated i can't seem to find a simple answer.

    yeah, but my problem is that i don't know how to do
    any sort of manipulation. say i wanted to trim the
    string, String inputNumbers = inputNumbers.trim()
    doesn't work. what i actually want to know is how to
    access the string.
    If you look at the API documentation for JTextField, you will see that JTextField inherits the method getText() from JTextComponent. getText() returns a String representation of the characters entered in the JTextComponent.String inputstring = inputNumbers.getText(); //get text into a String
    inputstring = inputstring.trim(); //for example

Maybe you are looking for

  • Single Sign On and SEM

    Hi Guys,   I have implemented the SSO for BW 3.5 and SEM 4.0 with Enterprise Portal 5.0. For BW work very well, but with SEM it is still asking the user and pass. The strange is if I execute first a BW report and next access SEM it work, but if i exe

  • Missing data in ap_check_stocks after R12 upgrade

    Hello, We are currently in version R12.1.2 and I have an existing query from R11 which gets data from ap_check_stocks table. I am however not able to find any data on ap_check_stocks after R12 upgrade. Has this table been discontinued? I do not find

  • Arabic PDF characters are disjointed and reversed!

    Hello guys, I have a serious and urgent issue and I hope this expert community could help me out in finding a solution for it. I have a magento CMS ecommerce based group buying deals website based in UAE and my developers have coded it in a way to se

  • Seeburger BIC Mapping Designer-Project Explorer.......

    Hi Everyone,       I have a Problem with Seeburger BIC Mapping Designer. The problem is All the Projects/Mappings that i have done are suddenly disappeared in the Project Explorer, but my projects are available in the C:\Program Files\SEEBURGER\Mappi

  • Locale Resource Bundle Best Practice

    Hi I have a Flex application that loads it's locale resource bundle from a service. So when the httpservice loads the bundle it populates an instance of a class "I18NBundle" that contains all the bundle properties. For instance you could do: i18nBund