Return to the right of the first white space values

Hello
I use Toad for Oracle 10.5 and cannot figure out how to return only the values after the white space for apple to field. I tried to trim, rtrim, ltrim leads; etc... I create table and some inserts to test if possible. Thanks for reading this thread.
select trim(leading '' from apple)
FROM tbl_test 
Create Table
CREATE OR REPLACE FORCE TABLE TEST
(
   APPLE  VARCHAR(20),
   ORANGE VARCHAR(20)
  
)
Inserts
INSERT INTO TBL_TEST 
(APPLE, ORANGE)
VALUES
('123 TEST3', 'TEST');

INSERT INTO TBL_TEST 
(APPLE, ORANGE)
VALUES
('4567 TEST2', 'TEST');

INSERT INTO TBL_TEST 
(APPLE, ORANGE)
VALUES
('1 TEST3', 'TEST');

INSERT INTO TBL_TEST 
(APPLE, ORANGE)
VALUES
('12 TEST4', 'TEST');
Not:
select apple from tbl_test

APPLE
123 TEST3
4567 TEST2
1 TEST3
12 TEST4
The results that I want:
select * from tbl_test
APPLE
TEST3
TEST2
TEST3
TEST4
select SUBSTR(apple, INSTR(apple, ' ')+1) from tbl_test;

Output:

TEST3
TEST2
TEST3
TEST4

Tags: Database

Similar Questions

  • The action of the button Back/will not return to the first page open on a tab

    From a few weeks ago (I believe that when 3.6.16 is released), I lost the ability to return to the first Web site loaded on any tab by using the previous button or right click-> menu back.

    I upgraded to Firefox 4 and I still see the same question.

    This happens if the new tab is created from a link on another tab of an item in my toolbar bookmarks, or if I have on a button open new tab, then the initial Web page in the address bar or in my bookmarks toolbar.

    When I navigate to the second site in this tab via a link, manual entry or a bookmark, the previous button is active.

    If I navigate to other pages and a right click on the back button, the first page I have loaded is not listed in the history.

    It is possible to my modules or something is causing this issue? I can't think of any possible configuration setting that would entail.

    If not, should I submit a report in Bugzilla? I couldn't find a corresponding bug report, but it seems that it would have been stated several times if someone else saw this question.

    Edited to stop scrolling - Maurane

    With the back button does not, problems are caused by the McAfee Site Advisor, if you uninstall or disable this extension, the back button should work again.

  • Video embedded do not return to the first image when navigating between pages

    Hi all

    I have a PDF with two embedded videos. The document is created in InDesign CS5.5 and output as an interactive PDF.

    However, I have two problems with the videos:

    1. If I pause a video to watch it halfway through and then go to another page and then return to the video page, the reading head is always suspended when he left. However, I would like that, so that the video will always return to the first frame when loading the page. Can someone help me with a way to get there?

    2. If I'm watching a video and then go to the next page, which doesn't have a video, I sometimes a box of blue key line appear which is the outline of the previous video. This looks like a bug any. Anyone know how I can avoid this?

    Your advice and guidance would be most appreciated.

    Thank you

    G

    If your video annot is set to 'Disable closing page' then it resets whenever you navigate away and vice versa. Change it with a right click / Properties.

    The default property in Acrobat is only to disable the video when the user chooses to do so - this keeps the position if they sail around, and this is intentional (find your position in a long video is a real pain!). If they press STOP instead of BREAK, they return of course initially.

    Setting the video to disable close on page, will present a delay during the navigation. Keep this in mind it can be annoying for users.

    As for the superposition of artifacts on the screen caused by active content on other pages, Yes, it's a known - but I can't say more than that.

  • Discover with function as datasource returns only the first line.

    Hello

    I created the following function to get the status of all the rules for the instances of SQL Server.

    The data type of the function output has been configured as 'List of SQLInstanceRuleStatuss', where SQLInstanceRuleStatuss is the custom type, I created in the same module.

    When I tested the function, it returns all instances of SQL Server with two other columns.

    But when I try to create a view with the Rows property that is configured to use the feature, it returns only the first line:

    sqlRules = new ArrayList();

    queryStatement = server. QueryService.createStatement ("(DBSS_Instance)");

    queryResult = server. QueryService.executeStatement (queryStatement);

    for (it in queryResult.topologyObjects)

    {

    sqlRule is functionHelper.createDataObject ("westjet_mark_dev:SQLInstanceRuleStatus", "none", "test");.

    sqlRule.instance = it;

    sqlRule.ruleName = 'test rule name';

    sqlRule.status = false;

    sqlRules.add (sqlRule);

    }

    Return sqlRules;

    Did I miss something?

    Thank you

    Mark

    Mark,

    I think I forgot something

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none","test");

    you create the test id

    change your line of

    sqlRule=functionHelper.createDataObject("westjet_mark_dev:SQLInstanceRuleStatus","none",null);

    This should allow the creation of a single object in your loop for

  • I can't my auto signature to look how I want that she keeps returning to the text without spaces

    I can't my auto signature to look how I want that she keeps returning to the text without spaces

    Put

    < br >

    everywhere, you want a line break.

    for example

    My phone number is 01937 534183 if you wish to discuss. < br >
    < br >
    Thank you, < br >
    < br >
    Oliver

  • Foreach returns only the first line of a dataset object

    Hello, guys.

    I am having trouble with a procedure in Oracle 9.2.0.1.0.

    I have a query that returns the number of lines, but whenever I try to browse by using a foreach loop, I only get the first line and then the loop is completed.

    For example, here's the query:

    select 
          (
            CASE
              WHEN
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') < DATE '2009-01-01'
              THEN DATE '2009-01-01'
              ELSE
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) startdate,
    
    
          (
            CASE
              WHEN
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') > DATE '2009-06-08'
              THEN DATE '2009-06-08'
              ELSE 
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) enddate
         
        FROM dual
        CONNECT by trunc(DATE '2009-06-08','dd') >= add_months(trunc(DATE '2009-01-01','dd'),level - 1)
    

    Who shows me this output:

    STARTDATEENDDATE
    01/01/20092009-01-31
    02/01/200928/02/2009
    03/01/200931/03/2009
    04/01/200930/04/2009
    05/01/200931/05/2009
    06/01/200906/08/2009

    But whenever I run this code:

      for rec in
      (
        select 
          (
            CASE
              WHEN
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') < DATE '2009-01-01'
              THEN DATE '2009-01-01'
              ELSE
                TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) startdate,
          (
            CASE
              WHEN
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'),'DD/MM/YYYY') > DATE '2009-06-08'
              THEN DATE '2009-06-08'
              ELSE 
              TO_DATE(
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level) -1,'dd') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'mm') || '/' ||
                to_char(add_months(trunc(DATE '2009-01-01','mm'),level - 1),'yyyy'), 'DD/MM/YYYY')
              END
          ) enddate
         
        FROM dual
        CONNECT by trunc(DATE '2009-06-08','dd') >= add_months(trunc(DATE '2009-01-01','dd'),level - 1)    
      )
      loop
        DBMS_OUTPUT.put_line(TO_CHAR(rec.startdate, 'YYYYMMDD') || '-' || TO_CHAR(rec.enddate, 'YYYYMMDD'));
      end loop;
    

    I get this result:

    20090131 20090101

    I tried debugging and I checked that the loop runs that once, and then passes the end of loop. I'm doing something wrong?

    Thank you!

    Best regards

    Vinicius

    Try:

    for rec in

    (

    Select * from (select

    (

    CASE

    WHEN

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "jj"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")< date="">

    THEN DAY ' 2009-01-01'

    ON THE OTHER

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "jj"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")

    END

    ) startdate.

    (

    CASE

    WHEN

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm') and level)-1, "dd"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), ' DD/MM/YYYY') > DATE '' 2009-06-08

    THEN DAY '' 2009-06-08

    ON THE OTHER

    TO_DATE)

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm') and level)-1, "dd"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), "mm"). '/' ||

    TO_CHAR (add_months (trunc (DATE ' 2009-01-01', 'mm'), level - 1), 'yyyy'), "DD/MM/YYYY")

    END

    ) enddate

    OF the double

    CONNECT by trunc (DATE 2009-06 - 08 ',' dd') > = add_months (trunc (DATE 2009-01 - 01 ',' dd'), level - 1)

    )   )

    loop

    Dbms_output.put_line (TO_CHAR (rec.startdate, 'YYYYMMDD') |) '-' || To_char (rec.enddate, 'YYYYMMDD'));

    end loop;

    SY.

  • Presentation of folio to return to the first page

    We are considering placing an iPad in a lobby space and allowing visitors to interact with our digital edition. Is it possible to return an item that is open to the first page? If someone is exploration of the problem and then walks away, the next person to use is likely to be lost if they come to the iPad and IE: page 4 of a story.

    Thank you.

    There is no way to do that, unfortunately.

    Neil

  • HttpService returning only the first result

    I have a http service and returns a result the first time, she is sent to retrieve the data from the php file.

    However, after each new. send(); brings back the same data even if the php file sends new data.

    I even use lastResult in Manager.

    < mx:HTTPService

    " url ="http://www.someaddress.com/php/abca/filldates.php"" "

    id = "testfilldates".

    useProxy = "false".

    showBusyCursor = "true".

    result = "testResults (event); »

    method = "POST" >

    < / mx:HTTPService >

    It's a browser problem capture calls to your httpservice, read this

    2901 http://www.Adobe.com/cfusion/CommunityEngine/index.cfm?event=showDetails&loc=en_US&PostID= & productId = 2

  • Quick query return only the first rank wo any Where clause.

    Hey all,.

    first I apologise for this announcement, if it has already been asked some time ago, but unfortunately research forum does not at least with my IE - Setup (configured to accept cookies by the beautiful admin of our society :). After getting the results of the search by clicking an entry returns the following error:
    ---
    ERROR
    The requested URL could not be found
    The following error was encountered:
    Invalid query: malformed request
    Some aspects of the HTTP request is not valid.
    ---
    I think that that, even with secure settings, a forum should be able to work... Maybe someone would like to investingate here, but this ist NOT my Question!

    ~~~
    Problem:

    When I execute
    _ Select * from - damncomplexexpressionwithleftjoinsandwhatever - where ID1 = 5
    the query is very effective-index and takes < 1 second to execute that ok ist for the size of the Tables (~ 500 MB). So far so good.

    -> NOW I need the fastest 1-line out of this query result. But when I do
    _ Select * from - damncomplexexpressionwithleftjoinsandwhatever - where ROWNUM < 2
    It takes about 15 seconds to run, what ist too long! Unfortunately I do not have the values to put in it, so I'm looking for the fastest way without any other conditions.

    The result is not ordered, or grouped by--> so why doesn't Oracle just choose the first row it gets and runs in 0.1 sec?
    Does anyone has an idea how to solve this problem?

    Many thanks for any help! Daniel

    Little entered, cannot send you an explain plan, or trace/tkprof output?

    But perhaps you could the / * + FIRST_ROWS * / Tip:

    select /*+ FIRST_ROWS */  * from -damncomplexexpressionwithleftjoinsandwhatever- where ROWNUM<2
    
  • Open site leads me to the next site-unable to return to the first site-not to the top or arrows back

    I was still able to knock an arrow to forward a page or move back a page-can't do it now so when I want to return to the previous page I have to leave the page I'm on and start all over again once, it never happened avant-comment do arrows front and rear returned to my office.

    As you can easily see that I am not very practical with the process.

    Them

    Do you mean that you no longer have the back and the next button in the Navigation toolbar?

    If the menu bar is hidden, then press the F10 key or hold down the Alt key to make the call of menu bar.

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible: "view > toolbars".

    • Open the Customize via "view > toolbars > customize.
    • Make sure the "Bookmarks Toolbar items" are on the personal bar
    • If the "Bookmarks Toolbar items" is not on the bookmarks toolbar, then FRY it in the toolbar palette in the window the bookmarks toolbar Customize
    • If other missing elements are in the palette of the toolbar and drag the window to customize the toolbar
    • If you do not see an item on a toolbar in the toolbar palette and then click the button "Restore default" to restore the default toolbar set up
  • WordPad, cursor returns in the first start, will not move to the next line when I hit enter

    I type a line and press ENTER if I can move to the next line, but the cursor jumps back to the first word I typed and I can't move to the next line

    Hello

     
    -You are aware of any changes made on the computer before this problem?
    -Respect the limit with the Wordpad?
    -Work on a laptop or desktop?

    Follow the steps mentioned below and check if the problem persists.

    System File Checker Scan (Scan SFC): Ihelp in the digitization of all immediately protected system files and it allows you to know the system files corrupted on your computer.

    (a) click on Start

    (b) choose run and type CMD

    (c) type sfc / Scannow

    For reference:

    http://support.Microsoft.com/kb/310747

    Response with more information to help you further.

  • I installed again by returning to the first CS6, but once again loads and a new project is created, it blocks (outputs) until I can do anything.

    I followed the procedure described on the first CC, installation first CS6 uninstall Web site, leaving still installed and reinstall CC first uninstall. I also installed the menu presets as described on another page of the website.

    Yet of the charges and I'm trying to create a new project by specifying the path and to project name. Until I can do something more, yet ends with a windows dialog on "Due to a problem must exit the program.

    I noticed that some of the text boxes were filled with the values corresponding to old projects so still contains the old configuration information from somewhere.

    Sorry; I missed what is obvious:

    See the Adobe Application preferences recreate here:

    Resolve system errors, freezes | Mac OS 10.x. Adobe software

    I think you can continued to have problems if you can not uninstall/clean/reinstall.

    If the preferences reset help, create a DVD, Blu - Ray not, for your first tests. Also, have no disc in your burner.

  • Search file, return of the other excel column value

    I tried the Excel research and this pension, but have not found something that can help yet. I have an Excel file which contains three columns. I want to find the first column with a value (1-99), and then returns the value of this same line, but the 3rd column. About the same as the VLOOKUP function, but I have not found a way to do in LV here is a basic example:

    Column1 | Column 2 | Column 3

    LB/01 PO2 3

    .

    .

    20 PEA 2

    For example, if '20' is entered, it will return the value "2".

    Thanks again

    buickgn wrote:

    About the same as the VLOOKUP function, but I have not found a way to do in LV

    Thanks again

    Well, use the VLOOKUP function then of _Application WorksheetFunction (a reference range for the Argument 2 pass).

    Ben64

  • Select the records from the first n distinct values of column

    I need to write a query in plsql to select records for the first 3 values distinct from a single column (example below, ID) and all lines for the next 3 distinct values of column and so on until the end of the number of distinct values in a column.
    for example:
    Age of name ID
    1 abc 10
    1 def 20
    2 IA 10
    2 20 JKL
    2 mno 60
    3 10 pqr
    4 the RST 10
    4 10 TÜV
    5 vwx 10
    6 10 XYZ
    hij 6 10
    7 lmn 10
    .
    .
    .
    so now... (up to a few County)
    Result must be
    1 the application should result->
    Age of name ID
    1 abc 10
    1 def 20
    2 IA 10
    2 20 JKL
    2 mno 60
    3 10 pqr

    Query 2 should lead to->
    4 the RST 10
    4 10 TÜV
    5 vwx 10
    6 10 XYZ
    hij 6 10

    Query 3 should lead to->
    7 lmn 10
    .
    .
    9... ..
    so now...
    How to write a query for this inside a loop.

    Hello

    Thus, a panel will consist of the lowest id value, the 2nd lowest and the 3rd lower, reggardless of how many lines is involved. The next group will include the 4th lowest id, the 5th lowest and the 6th lowest. To do that, you must assign the numbers 1, 2, 3, 4, 5, 6,... for the rows in order by id, with all lines with the same id, getting the same number and without jumping all the numbers.
    This sounds like a job for the analytical DENSE_RANK function:

    WITH     got_grp_id     AS
    (
         SELECT     id, name, age
         ,     CEIL ( DENSE_RANK () OVER (ORDER BY id)
                   / 3
                   )          AS grp_id
         FROM     table_x
    )
    SELECT     id, name, age
    FROM     got_grp_id
    WHERE     id     = 1     -- or whatever number you want
    ;
    

    If you would care to post CREATE TABLE and INSERT statements for your sample data, then I could test it.
    See the FAQ forum {message identifier: = 9360002}

  • the index of the first/last numerical value

    Hello

    I want to find the index of the first numeric value in a string. I can do this by using built-in features of Oracle? (Without creating a new function)

    I want to find the index of the first numeric value in a string

    regexp_instr could do (for the first digit):

    SQL> select regexp_instr('abc1def2', '\d') first_digit from dual
    /
    FIRST_DIGIT
    -----------
              4
    1 row selected.
    

Maybe you are looking for

  • Satellite A100: Dead battery + Random closures

    Hello everyone I'm having some trouble with my Satellite A100 after taking in a service center and I hope you can help. One of the brackets holding the button broke on my laptop so I took it to a service center to replace. Once I come back the laptop

  • Reset the resolution for the multimedia Dock

    Hello Recently, I received my multimedia Dock. I want to know how to change the resolution of the screen once not anchored. I increase the resolution, but have a problem with my TV it loses sync. Now is no synchronization at all. But I can not decrea

  • Mystery of boot: failing mobo?

    I wonder if my motherboard of Presario SR1913WM is a failure, because it is able to start continues to deteriorate. A few months ago, I mentioned here to start turning off Windows, I started to require Ctrl-Alt-Del (leave a message "DISK BOOT FAILURE

  • Error codes 12, 31 - PXI my system does not work

    I tried to solve the erros on my pxi system using the software compatibility MXI-Express BIOS 1.3 - Windows 7 64 bit/7 x 86/XP x 86/Vista Vista / x 86 x 64 This software is intended to solve error code 12 or 31 showing in windows Device Manager. But

  • Cannot add a bug in the incident handler in the BlackBerry Tablet OS project

    Hello I get an exception when you create a project in Flash Builder 4 (flex2/tools/oem/OEMException$ CircularLibraryDependencyException). I wanted to add it to the Manager of incidents under the BlackBerry Tablet OS Project (closest to you in the dev