Selecting 1 char at a time.

So I'm trying to do a lookup on a column that has multiple values in it. For example the column could have the letters FGNC. Each one of these letters represents a country. I’m trying to find a way to read each char from the column one at a time and display the results, but I haven’t a clue as to where to start on something like this. Anyone have any ideas?

Maybe something like this ?
test@ORA10G>
test@ORA10G> -- iterating through the characters of a string
test@ORA10G>
test@ORA10G> with x as (
  2    select 'abracadabra' as str from dual union all
  3    select 'abcdFNGCabcd' from dual union all
  4    select 'MoulinRouge' from dual)
  5  --
  6  select t.str, substr(t.str,run.idx,1) as mod_str
  7  from (select str from x) t,
  8       (select level as idx from dual connect by level <= (select max(length(str)) from x)) run
  9  where run.idx <= length(t.str)
10  order by t.str,run.idx;
STR          M
MoulinRouge  M
MoulinRouge  o
MoulinRouge  u
MoulinRouge  l
MoulinRouge  i
MoulinRouge  n
MoulinRouge  R
MoulinRouge  o
MoulinRouge  u
MoulinRouge  g
MoulinRouge  e
abcdFNGCabcd a
abcdFNGCabcd b
abcdFNGCabcd c
abcdFNGCabcd d
abcdFNGCabcd F
abcdFNGCabcd N
abcdFNGCabcd G
abcdFNGCabcd C
abcdFNGCabcd a
abcdFNGCabcd b
abcdFNGCabcd c
abcdFNGCabcd d
abracadabra  a
abracadabra  b
abracadabra  r
abracadabra  a
abracadabra  c
abracadabra  a
abracadabra  d
abracadabra  a
abracadabra  b
abracadabra  r
abracadabra  a
34 rows selected.
test@ORA10G>
test@ORA10G>pratz

Similar Messages

  • JTextArea and typing one char at a time!

    Hi everyone!
    I'm developing an small app. In certain cases, the user may want to edit a little piece of text. For this, I show a new Frame with a JTextArea with the selected text, so the user can edit it...
    But I want to control this edition: the user only can type one char at a time, disable selecting text and waiting a short time (250ms) between char and char...
    Some ideas? Some suggestion?
    Should I use keylistener and wait for the KeyPressed event and wait inside 250 ms?
    The reason for the waiting: when the user type a new char (or delete an existing one), I need to do some calculations. And it must be char by char, if the user select text and replace it, or if the user type fast... my program crash.
    Thanks in advance!

    Use a DocumentFilter and add the character yourself one at a time.
    Or better perform the calculation there.
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#filter
    Also perform the calculation in the Event Dispatch Thread so it will wait until the calculation is finished before accepting new input.

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    List and table controls -> listbox..is that what you are thinking of?
    The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
    If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
    MTO
    Attachments:
    Listbox_example.vi ‏34 KB

  • SELECT query taking long time

    Hi All,
    I am trying to run one SELECT statement which uses 6 tables. That query generally take 25-30 minutes to generate output.
    Today it is running from more than 2 hours. I have checked there are no locks on those tables and no other process is using them.
    What else I should check in order to figure out why my SELECT statement is taking time?
    Any help will be much appreciated.
    Thanks!

    Please let me know if you still want me to provide all the information mentioned in the link.Yes, please.
    Before you can even start optimizing, it should be clear what parts of the query are running slow.
    The links contains the steps to take regarding how to identify the things that make the query run slow.
    Ideally you post a trace/tkprof report with wait events, it'll show on what time is being spent, give an execution plan and a database version all in once...
    Today it is running from more than 2 hours. I have checked there are no locks on those tables and no other process is using them.Well, something must have changed.
    And you must indentify what exactly has changed, but it's a broad range you have to check:
    - it could be outdated table statistics
    - it could be data growth or skewness that makes Optimizer choose a wrong plan all of a sudden
    - it could be a table that got modified with some bad index
    - it could be ...
    So, by posting the information in the link, you'll leave less room for guesses from us, so you'll get an explanation that makes sense faster or, while investigating by following the steps in the link, you'll get the explanation yourself.

  • SELECT statement takes long time

    Hi All,
    In the following code, if the T_QMIH-EQUNR contains blank or space values ,SELECT statement takes longer time to acess the data from OBJK table. If it T_QMIH-EQUNR contains values other than blank, performance is good and it fetches data very fast.
    Already we have indexes for EQUNR in OBJK table.
    Only for blank entries , it takes much time.Can anybody tell why it behaves for balnk entries?
    if not T_QMIH[] IS INITIAL.
            SORT T_QMIH BY EQUNR.
            REFRESH T_OBJK.
            SELECT EQUNR OBKNR
              FROM OBJK INTO TABLE T_OBJK
              FOR ALL ENTRIES IN T_QMIH
              WHERE OBJK~TASER = 'SER01' AND
             OBJK~EQUNR = T_QMIH-EQUNR.
    Thanks
    Ajay

    Hi
    You can use the field QMIH-QMNUM with OBJK-IHNUM
    in QMIH table, EQUNR is not primary key, it will have multiple entries
    so to improve the performance use one dummy internal table for QMIH  and sort it on EQUNR
    delete adjacent duplicates from d_qmih and use the same in for all entries
    this will improve the performance.
    Also use the fields in sequence of the index and primary keys also in select
    if not T_QMIH[] IS INITIAL.
    SORT T_QMIH BY EQUNR.
    REFRESH T_OBJK.
    SELECT EQUNR OBKNR
    FROM OBJK INTO TABLE T_OBJK
    FOR ALL ENTRIES IN T_QMIH
    WHERE  IHNUM =  T_QMIH-QMNUM
    OBJK~TASER = 'SER01' AND
    OBJK~EQUNR = T_QMIH-EQUNR.
    try this and let me know
    regards
    Shiva

  • How to see all image types when saving an image without selecting "all files"every time

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/951766]]</blockquote>
    Hallo, and thank you for reading this.
    I am a person who saves a lot of images online and renames them in different folders in different names like B - 34 or G - 56. I have been working with firefox 10 for quite some time and it had a pretty handy bug (I guess) where I could save an image and firefox would just save the image in it's original type (JPEG,PNG etc) while "save as type" was empty.
    It also always has shown all the image types in the folder where I save the images (except for GIF) and that helpes me quite a lot by saving me the trouble of selecting "all files" every time I save or going to the folder to rename every image.
    Now this seems to be lacking in the newest firefox versions and my question is if I can set firefox to always show me all the image file types when saving an image, instead of only showing JPEG's when I try to save a JPEG.
    Thank you for your time.

    I suspect this is a Windows problem. I am surmising the FilePicker uses the Operating System or Desktop facilities. Does Windows 7 offer any other file categories like ''images'' ?
    I do not normally use Windows 7, but may the option depend upon the directory being an indexed one, I ask after finding this thread ''Bring File types tab back'' [http://www.windows7taskforce.com/view/819]
    This question is a duplicate of [/questions/951764]
    Normally I would lock the duplicate question, but in this instance I will leave it open as it is unanswered and someone may give a better reply.

  • HP OJP 8600 - 1970's Style Poll/Select UDP hundreds of times a second

    My new HP OJP 8600 is connected by ethernet to my router, wireless is turned off.  
    My new Apple MacBook Pro, with OS X9.5 has downloaded the latest HP OJP 8600 software.  So why does the OJP 8600 use UDP to communicate 1970's style poll/select messages several hundred times a second to my Mac?
    Example message follows:
    ,æÏ·¯§]63‡fEXÁç@ˇ¿®v¿®B°Œ4D÷0Ç8public¢Ç)7 `0Ç0Ç + ÇMFG:HP;MDLfficejet Pro 8600;CMDCL3GUI,PCL3,PJL,JPEG,PCLM,URF,DW-PCL,802.11,802.3,DESKJET,DYN;CLSRINTER;DES:CM749A;CID:HPIJVIPAV2;LEDMDIS:USB#FF#CC#00,USB#07#01#02;SN:CN39AEWJHW05KC;S:038080C484201021005a00800004518005a441800504618005041180450;Z:0102,0500000900000100000100000100000d,0600,0700000000000000000000,0b00000000000000000000993a000000009938000000009938000000009938,0c0,0e00000000000000000000,0f00000000000000000000,10000002000008000008000008000008,110,12000,150,17000000000000000000000000000000,181;
    It is mostly meaningless crap that keeps repeating and repeating and repeating for no apparent reason.  How do you shut this off?

    Hi @GlobalRoamer ,
    I have sent you a private message. If you are not sure how to check your private messages then this post has instructions that will guide you through the process.
    Regards,
    George
    I work for HP

  • How do I make my selected Persona appear every time Firefox opens?

    In an earlier Firefox version, my favorite selected Persona always appeared at the top every time I opened Firefox. I now have version 4.0.1. What can I do so a Persona is automatically shown? In other words, I'm getting tired of selected a Persona every time I open a new Firefox page, so is there a setting within Firefox 4.0.1 to automatically show the Persona used in my prior Firefox window?

    If you lose the toolbar customization then you do not have a problem with places.sqlite, but with the file localstore.rdf in the [[Profiles|Profile folder]].
    * http://kb.mozillazine.org/Corrupt_localstore.rdf
    Use the Google cache in case of problems accessing the MozillaZine KB (prefix links with cache:):
    *http://www.google.com/search?hl=en&ie=UTF-8&q=cache:http://kb.mozillazine.org/Corrupt_localstore.rdf

  • Select query to take time

    Hi to all.
    in table am using xmltype column.
    table Test designed as
    empid int
    type int
    doc xmltype
    Test table contains 2 laks records.
    select query is
    Select empid,type, doc from Test Where empid=2;
    while this qry execute more time. without doc select performance is fast. am find out doc selection only take more time
    any other alternate way to reduce time..

    Note the name of this forum is SQL Developer *(Not for general SQL/PLSQL questions)* (so for issues with the SQL Developer tool). Please post these questions under the dedicated SQL And PL/SQL forum (you've posted there before).
    Regards,
    K.

  • Count (*)  for select stmt take more time than  execute a that sql stmt

    HI
    count (*) for select stmt take more time than execute a that sql stmt
    executing particular select stmt take 2.47 mins but select stmt is using the /*+parallel*/ (sql optimer) in that sql  command for faster execute .
    but if i tried to find out total number of rows in that query it takes more time ..
    almost 2.30 hrs still running to find count(col)
    please help me to get count of row faster.
    thanks in advance...

    797525 wrote:
    HI
    count (*) for select stmt take more time than execute a that sql stmt
    executing particular select stmt take 2.47 mins but select stmt is using the /*+parallel*/ (sql optimer) in that sql  command for faster execute .
    but if i tried to find out total number of rows in that query it takes more time ..
    almost 2.30 hrs still running to find count(col)
    please help me to get count of row faster.
    thanks in advance...That may be because your client is displaying only the first few records when you are running the "SELECT *". But when you run "COUNT(*)", the whole records has to be counted.
    As already mentined please read teh FAQ to post tuning questions.

  • How to view the first and the last frame of a clip or a selected range in the time line?

    How to view the first and the last frame of a clip directly or in a selected range in the time line ? Up arrow and down arrow keys changes only between the first frame of the consecutive clips. Even ; and ' does the same. I mean what is the shortcut keys for first to last and last to first frame of a clip? Help please.

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How do I set up a rating scale so that respondents can only select each option one time?

    How do I set up a rating scale so that respondents can only select each option one time?

    hi there,
    in the LV VI, function & how-to help open the item
    Building the front panel -> Front panels controls and indicators -> Array & Cluster controls and indicators -> Arrays -> Tabbing through Elements of an Array or Cluster
    or see attachment
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    TabbingThroughArrays_Help.jpg ‏96 KB

  • Selective Char's on the Material

    Experts,
    Have the following requirement:
    Certain set of materials need to have a limited number of characteristics under the same class, while others (in the same class) need to show more characteristics. This depends on the requirement for having different number of characteristics as needed in the "configuration" process of the products.
    So, if a class was created as SAMPLE_CLASS, with 5 char's inside, Matl A needs only 3 of those, while B needs all 5.
    How to add selected char's from a class to the materials? is there a control?

    Hi Andy
    I don't think this option available,  you have to go for different class only.
    Regards
    Bala

  • Why do I have to select "continue allowing" every time I visit certain sites in order to be able to type into flash based form fields?

    Why do I have to select "continue allowing" every time I visit certain sites in order to be able to type into flash based form fields?
    See attached image for reference to what button I am referring to. Until i hit the "continue allowing" button I can not type into the form fields. I have tried removing and reinstalling flash. refreshing firefox, and clearing cache and cookies, and deleting the permissions.sqlite file. Nothing has worked. This issue just started happening a few days ago. Please let me know what I might be able to do to fix this.

    That full page including the form is a Flash object.
    I didn't see this doorhanger opening when I tried the URL in a new profile.
    Did you previously created an exception or is the default selected if you check the permissions for the Flash plugin?
    You can inspect and manage the permissions for the domain in the currently selected tab:
    *Click the "[[Site Identity Button|Site Identity Button]]" (globe/padlock) on the location/address bar
    *Click "More Information" to open "Tools > Page Info" with the Security tab selected
    You can go to the Permissions tab (Tools > Page Info > Permissions)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Exception in prepared execute on table SystemEvents: SELECT eventname,type,enabled,times,target,params FROM SystemEvents

    Hi all,
    I am trying to instal oracle webcenter in win server 2008 r2.
    but I am getting this exception (in "sites.log") and installation fails.
    Here's my stack trace.
    Any kind of help is appreciated.
    [2013-12-20 03:27:12,141 PST] [ERROR] [pool-7-thread-1] [fatwire.logging.cs.db] Exception in prepared execute on table SystemEvents: SELECT eventname,type,enabled,times,target,params FROM SystemEvents
    java.lang.NullPointerException
    at COM.FutureTense.Servlet.JDBCTable.prepare(JDBCTable.java:1767)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery_trans_logic(JDBCTable.java:1628)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery_trans(JDBCTable.java:1590)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery(JDBCTable.java:1430)
    at COM.FutureTense.Servlet.JDBCTable.SelectRow(JDBCTable.java:1025)
    at COM.FutureTense.Common.ftDBTable.selectTo(ftDBTable.java:2229)
    at COM.FutureTense.Event.ftEvent.getEventsList(ftEvent.java:309)
    at COM.FutureTense.Platform.SystemEvents.SystemEventFactoryImpl.getSystemEvents(SystemEventFactoryImpl.java:62)
    at COM.FutureTense.Platform.SystemEvents.HeartBeat.run(HeartBeat.java:43)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662) less…
    java.lang.nullpointerexception

    Hi all,
    I am trying to instal oracle webcenter in win server 2008 r2.
    but I am getting this exception (in "sites.log") and installation fails.
    Here's my stack trace.
    Any kind of help is appreciated.
    [2013-12-20 03:27:12,141 PST] [ERROR] [pool-7-thread-1] [fatwire.logging.cs.db] Exception in prepared execute on table SystemEvents: SELECT eventname,type,enabled,times,target,params FROM SystemEvents
    java.lang.NullPointerException
    at COM.FutureTense.Servlet.JDBCTable.prepare(JDBCTable.java:1767)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery_trans_logic(JDBCTable.java:1628)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery_trans(JDBCTable.java:1590)
    at COM.FutureTense.Servlet.JDBCTable.executeQuery(JDBCTable.java:1430)
    at COM.FutureTense.Servlet.JDBCTable.SelectRow(JDBCTable.java:1025)
    at COM.FutureTense.Common.ftDBTable.selectTo(ftDBTable.java:2229)
    at COM.FutureTense.Event.ftEvent.getEventsList(ftEvent.java:309)
    at COM.FutureTense.Platform.SystemEvents.SystemEventFactoryImpl.getSystemEvents(SystemEventFactoryImpl.java:62)
    at COM.FutureTense.Platform.SystemEvents.HeartBeat.run(HeartBeat.java:43)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662) less…
    java.lang.nullpointerexception

Maybe you are looking for