CSV in a Column, Want to select one value at a time.

Hello ,
Oracle Database 11g.
I have a procedure in which i have to compare some value from a table. The problem is that the value in the table is in CSV ( Coma Separated Value).... see below
select parameter_name,description from t_mes_configurable_parameter
where parameter_name='DC_LOG_LEVEL'
        Parameter_Name                          Description
     DC_LOG_LEVEL                               DC log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3
Now as you can see the description column has a CSV's. Now i want to get the values individually.
In some different procedure i have to compare this value one - by - one.
If DESCRIPTION = 'DC log level' or 'ERROR=0' ...... then
-- some query --
end if;
Can i right any select query in which it will return me this column value as single value separating  from ' , ' (coma). ???
Thanks in advance .

Something like this ?
SQL> set line 1500
SQL> WITH test as 
  2     (SELECT 'DC_LOG_LEVEL' col1,'DC log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3' col2 FROM dual UNION ALL
  3      SELECT 'EF_LOG_LEVEL' col1,'EF log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3' col2 FROM dual UNION ALL
  4      SELECT 'GH_LOG_LEVEL' col1,'GH log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3' col2 FROM dual
  5     ) 
  6  ----End of Test data Creation -----
  7  ---- Actual Query -----------------  
  8     SELECT DISTINCT col1,regexp_substr (col2, '[^,]+', 1, level) col2 
  9     FROM test 
10     CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (col2, '[^,]+'))  + 1
11     ORDER BY 1;
COL1         COL2
DC_LOG_LEVEL DC log level
DC_LOG_LEVEL DEBUG=3
DC_LOG_LEVEL ERROR=0
DC_LOG_LEVEL INFO=2
DC_LOG_LEVEL SYSTEM=1
EF_LOG_LEVEL DEBUG=3
EF_LOG_LEVEL EF log level
EF_LOG_LEVEL ERROR=0
EF_LOG_LEVEL INFO=2
EF_LOG_LEVEL SYSTEM=1
GH_LOG_LEVEL DEBUG=3
COL1         COL2
GH_LOG_LEVEL ERROR=0
GH_LOG_LEVEL GH log level
GH_LOG_LEVEL INFO=2
GH_LOG_LEVEL SYSTEM=1
15 rows selected.
SQL> OR
SQL> WITH test as 
  2     (SELECT 'DC_LOG_LEVEL' col1,'DC log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3' col2 FROM dual UNION ALL
  3      SELECT 'EF_LOG_LEVEL' col1,'EF log level ,ERROR=4,SYSTEM=5,INFO=6,DEBUG=7' col2 FROM dual UNION ALL
  4      SELECT 'GH_LOG_LEVEL' col1,'GH log level ,ERROR=0,SYSTEM=1,INFO=2,DEBUG=3' col2 FROM dual
  5     ) 
  6  ----End of Test data Creation -----
  7  ---- Actual Query -----------------  
  8  SELECT col1,REGEXP_SUBSTR(col2,'[^=]+',1,1)col2,REGEXP_SUBSTR(col2,'[^=]$+',1,1) col3
  9    FROM (
10           SELECT DISTINCT col1,regexp_substr (col2, '[^,]+', 1, level) col2 
11           FROM test 
12           CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (col2, '[^,]+'))  + 1
13         )
14     ORDER BY 1,3;
COL1         COL2
COL3
DC_LOG_LEVEL DC log level
DC_LOG_LEVEL ERROR
0
DC_LOG_LEVEL SYSTEM
1
COL1         COL2
COL3
DC_LOG_LEVEL INFO
2
DC_LOG_LEVEL DEBUG
3
EF_LOG_LEVEL EF log level
COL1         COL2
COL3
EF_LOG_LEVEL ERROR
4
EF_LOG_LEVEL SYSTEM
5
EF_LOG_LEVEL INFO
6
COL1         COL2
COL3
EF_LOG_LEVEL DEBUG
7
GH_LOG_LEVEL GH log level
GH_LOG_LEVEL ERROR
0
COL1         COL2
COL3
GH_LOG_LEVEL SYSTEM
1
GH_LOG_LEVEL INFO
2
GH_LOG_LEVEL DEBUG
3
15 rows selected.
SQL> Edited by: Saubhik on Dec 20, 2010 6:17 PM

Similar Messages

  • I am trying to import photo's on i photo.  It downloads all of the pictures on my camera, how do i only select the photos i want?  Is there a way to do this without selecting one photo at a time? is there a way to select multiple images?  thanks!

    I am trying to import photo's on i photo.  It downloads all of the pictures on my camera, how do i only select the photos i want?  Is there a way to do this without selecting one photo at a time? is there a way to select multiple images?  thanks!

    To select consecutive images click and drag the cursor over multiple thumbnails to select all at once.
    To select multiple images that are randomly located hold down the Command(⌘) key and click on those images you want to select.
    Or to select consecutive images from a list of images that are together hold down the Shift key and and click on the first photo you want to select and the on the last photo you want in the list.
    OT

  • CS5 I want to select one person in a picture

    I want to select one person in a picture.  What tool do I use to remove everything around the picture and leave just the person.
    thanks
    Mike

    You could crop the picture like so:
    Or lose some distracting background so:
    Or did you want to extract the baby outline totally? 

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • Select more than one value at a time from an LOV?

    Is it possible to configure an LOV-based text field so more than one value at a time can be chosen from the drop-down LOV list? This is a user requirement for specifying multiple values in an SQL WHERE clause.

    Rather several select fields because single returned value is a functional limitation of <select>.

  • When trying to close one tab, i get the message "you are about to close 2 tabs" this is not what I want. I only want to close one tab at a time in English

    I only want to close one tab at a time

    ONLY 8 people have this problem?
    Look, virtually all Mozilla's potential users are coming from Internet Exploder, which gets this ALMOST RIGHT, while FireF*x does it totally wrong. Including in webmail: there's no way I could have got to this forum without leaving 4 windows active or closing everything, including closing my mail without logging out.
    ONLY 8 PEOPLE? How many thousand simply throw up their hands & uninstall yr f- nurdware over this one single issue? Not to bore you with details, but I'm hardly unsympathetic to open sources that don't look like the best argument for Micros**t and Google hegemony.
    Btw, I said they get it -almost- right... It would be really nice if IE or >somebody< offered a checkbox to NEVER close multiple tabs. Look, if this bug disguised as a feature is useful to a few nurds by all means keep it as an advanced option, but PLEASE set up FireFox so it at least defaults to the real world.

  • How to index a array to give it to for loop for one value at a time sequence to be ensured

    I need to give one number from a array at a time to a for loop. means the for loop have to execute one number at a time  from a array of numbers. How to do it

    Ranjeet,
    Ranjeet_Singh wrote:
    But question is same only. is in it ?
    With all due respect, NO.
    Please make sure you know what you are talking about before blatantly countering someone else's comment. Can you prove that your vi and TiTou's snippet will do the same thing?
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Selecting one cursor at a time and then reading its value

    I am a novice LabView user. I am trying to develop a program in which I have to select portions of a waveform and delete the outliers.  The problems I run into is selecting cursors at a time and then reading its value. I was using Active Cursor. Ideally what I need is to read read values of the first two cursors, cursor0 and cursor1 and remove outliers in the region and then move to region between cursor1 and cursor2 and so on. Is there a way to control which cursors are active, read its value and then move to the next set.

    Hi binc,
    I have attached a VI that should remove outliers. This may not be the best way to do it, but it is one possibility.
    Thanks,
    Paul B.
    Motion Control R&D
    Attachments:
    Remove_outliers.vi ‏20 KB

  • Bex query. Select single values in variable time out.

    I have created a variable on characteristic 0profit_ctr which works fine for all queries on all Infoproviders except for one.  With this particular Infoprovider, which is a DSO when the option to show u201CSingle Valuesu201D is selected in the variable screen the query just hangs and eventually time-outs. I have tried including the DSO in a mult-provider but still have the same issue. The variable works on other DSOu2019s with exactly the same settings. This DSO has less data than the other DSOu2019s which work fine.
    I know that 0profit_ctr is compounded with 0co_area which I have tried restricting with no change in the result.
    I would be grateful of any ideas.
    Thanks
    Jenny

    Hi Durgesh.
    I checked the settings and although they were the same as other infoproviders I changed the query filter value to use the values in the master data table and this has solved my problem.
    Thanks for your tip.
    Regards
    Jenny

  • Having problems with select-one-choice pull down component in an adf table

    all the values in the affected column come up the same. when any value in the column is changed all the values are changed. it's as if jdev doesn't realize the the column with the select-one-choice is really a column. what am i doing wrong?
    thanx

    Hi StuCoat,
    Did you have a look on this example from Steve Muench:
    http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/editabletabledropdown/dropdownlistineditabletable.html?_template=/ocom/technology/content/print
    Maybe if you post the part of code including your list into your table (from the <af:column ... to the </selectOneChoice>), we could find an explanation of this behavior.
    Regards,
    Tif

  • In photoshop elements 12 i try to select multiple people to view in organize but can only select one

    in photoshop elements 12 i try to select multiple people to view in organize but can only select one person at a time.  if I try to select two or more people to see their pictures, I get nothing.  I try to use CTL-click, but that does not work

    Hi,
    Try switching to Media view and then go to Find -> By Details.
    Set the field to People and select the persons name.
    You add further people by clicking on the + sign
    The two options above the search criteria allow you to select all photos containing at least one or only ones with all of your selections.
    The search can be saved in case you want to repeat it a later time.
    Hope that helps
    Brian

  • Multiple checkbox are to be checked when selecting one checkbox in formlayo

    Hi,
    I created the checkbox in apex 4.0, as LOV(list of value), I want to select multiple checkbox at a time ,when by selecting one checkbox among them.......

    Hey,
    try using APEX_ITEM.CHECKBOX.

  • Newbie question: Select one row from table in PL/SQL

    Hi,
    I want to select one row from the table Employee where Emplyoyee Number is say 200. This is a simple SQL query, but I don't know the equivalent PL/SQL format. I will have 3 out params here - Id itself, Name, Salary. I will then have to populate a java resultset object from these out params.
    Later, I'll have to use cursors to retrieve more than one row.
    Thanks for any help.

    Perhaps something like
    CREATE OR REPLACE PROCEDURE get_employee( l_id IN OUT employee.id%TYPE,
                                              l_name OUT employee.name%TYPE,
                                              l_salary OUT employee.salary%TYPE )
    AS
    BEGIN
      SELECT name, salary
        INTO l_name, l_salary
        FROM employee
       WHERE id = l_id;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How do I play one album at a time?

    I want to play one album at a time by artists for whom I have multiple albums. I have the newest generation ipod touch. One album at a time used to be the default mode, but with the new operating system iOS7, this is no longer the case.  Here's an example - I want to play the Pixies "Surfer Rosa," but when i click on the first song, it says it's playing 1 of 58 songs continuously - I want it to stop playing after "Surfer Rosa," I want it to say it's playing 1 of 14 songs.  Is there a simple fix for this?  Something in general settings or music settings that I have overlooked?
    I have found one way to play just one album, but it seems a bit complicated for what should be a simple fix.  I click on the first song on Surfer Rosa, then click on the 3 dot 3 line icon in the upper right corner, then click on another song, then back to the first song, then click done, and now it says it's playing 1 of 14 songs.  It's nice to have found this way around the issue, but, it's a lot of steps for something that used to be the default mode.

    Do you really mean upload as in transferring the files to another computer somewhere, or do you mean you ripped as in ripping a CD to copy the music to your computer?
    Select the tracks you want to edit, Get Info on them, then enter the desired album name.

  • How do I play one song at a time in Music on iPad

    First I DO NOT HAVE THE LITTLE SHUFFLE SYMBOL AND THE SHUFFLE IS NOT SELECTED in Songs on MY IPAD.  I have downloaded music from iTunes to my iPad in the Apple Music icon but all the songs seem to bunch together. I want to play one song at a time and NOT HAVE THE REST START PLAYING.

    Turn on *shuffle songs* and then start the Podcast episode you want. The display should say "1 of 1" because all Podcasts are set to *Skip on shuffle* so the one you're playing is the only option for the iPod.
    Phil

Maybe you are looking for

  • URG !!!!!!!! how do i add user defined information in a header

    suppose i have login page - , now i want to add login name as request header and pass it to servlet .. . i.e how do i send the login information in the headers.. plz help me

  • URL data type in CAML Query with Client side object model

    hi, How do I write a CAML query to filter list items based on the URL field using it's Description? Same with REST API. How do I construct a REST query so that filter list items based on the URL data type using it's Description.

  • Media not copying into event when drag and dropped

    When I add media files into an event by dragging and dropping the file into the project the file does not get moved/copied 'Macintosh's HD Projects' folder. Is there a setting somewhere I can change so dragging and dropping behaves the same way as wh

  • Saving A Dynamic Rights Enabled PDF as a Static PDF

    I'm searching for a solution to saving a dynamic rights enabled PDF order form as a state image once the user has completed the order form. I can do so via the Print Form button if I have an Adobe PDF print driver in my print list. But, if no print d

  • Moving Beyond Tables.  Understanding the DIV Part 2

    Hello, Unfortunately I was taught Dreamweaver sorta backwards and have always used tables for layout.  The advantage has been a grid layout where you can move things by sliding the guides around.  It works most of the time, but I am determined to mov