Combination of substring and instring in RTF - dynamic signature images url

I am unable to use a combination of substring and instring in RTF model.

I have a BUYER_LAST_NAME column, which has a Jean Dupont value. I like to shoot 'john' on this channel.

I tried to create a variable using <? xdoxslt:set_variable($_XDOCTX,_'new_name',_'')? >

So I want to do a get variable using substr and InStr.

<? xdoxslt:get_variable (substring _XDOCTX, BUYER_LAST_NAME, $(DOCUMENT_BUYER_LAST_NAME, 1, instring(BUYER_LAST_NAME,' ')-1))? >

The command above does not work as a substring and instring aren't xdoxslt operations.

I tried to do this using xdofx: <? xdofx:substr (BUYER_LAST_NAME, 1, Instr(BUYER_LAST_NAME,' ')-1)? >

The above work, but I don't know how to make a variable defined using xdofx. Please help me on this.

Published:

I want to use this field in a dynamic signature display. But I can't call substring-before command as part of the url.

URL: {(concat('${OA_MEDIA}','/purchase_order/signatures/',.//BUYER_FIRST_NAME,'_',.//BUYER_LAST_NAME,'.jpg')}

I want to change the BUYER_LAST_NAME here.

I'm working on

URL: {concat (' ${OA_MEDIA} ',' / purchase_order/signatures /',. / / DOCUMENT_BUYER_FIRST_NAME, "_",. / /, '.jpg')}

But it does not work.

->

URL: {concat (' ${OA_MEDIA} ','/ purchase_order/signatures /',. / / DOCUMENT_BUYER_FIRST_NAME, '_', substring-before(.//DOCUMENT_BUYER_LAST_NAME, ' '), '.jpg')}

who is working for me

Tags: Business Intelligence

Similar Questions

  • Need help with Substr and Instr

    I have a request

    Select msg

    from table_a

    She returned as log messages below

    Continued in logid = > 241153 < for oid = > 1621 <, GoC = > 795, bday = > 01.04.2013 <

    If the message contains logid = > then I want to display

    Continued in logid = > 241151 <

    for example

    case

    When the msg like ' % logid = > %'

    then

    I tried the combinations of substr and instr, but cannot make it work

    Any help appreciated

    Gus

    SQL >-samples:

    SQL > with t as

    2 (choose "continued in logid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013")<;' str="" from="" dual="" union="">

    3 select "continued in pid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013"<;' str="" from="">

    4)

    5. Select case-sensitive

    6 when instr (str, 'logid') > 0

    7 then substr (str

    8, instr (str, ' > ', 1, 1) + 1

    9, instr(str, '<', 1,="" 1)-instr(str,="" '="">', 1, 1)-1

    10                      )

    11 another null - or what you want / need

    12 end str

    13 t;

    STR

    ------------------------------------------------------------------------

    241153

    2 selected lines.

  • How to use substr and instr, where the line of input Multi text

    Hi all

    with

    data in the form of)

    Select ' Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234..' double val

    Union of all the

    Select 'Bill Johnson.Apartment 3 b. Sterling.VA.20166.3 Plaza Falke' of the double

    )

    Select

    regexp_substr (shipping_instructions, "[^ #] +' 1, 1") name

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 2") address

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 3") city

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 4") State

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 5") zip

    , regexp_substr (shipping_instructions, "[^ #] +' 1, 6") County

    FROM (select REGEXP_REPLACE (val, ' \.)) () [^.])', ' #\1 ") data shipping_instructions)

    (1)'Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234..'

    (2)'Bill Johnson.Apartment 3 b. Sterling.VA.20166.3 Falke Plaza. »

    "Mary America. 1234 Southridge Park Dr. Samna Lorie. MO.31234..'

    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Married America 1234 Southridge Park Dr.    Samna Lorie MO 31234  NULL VALUE

    "Bill Johnson. Apartment 3B. Sterling. VA. 20166. Falke Plaza 3... "

    NAME ADDRESS CITY ZIP County SATE

    ----------------      -----------------        -------       -----        ---         --------

    Bill Johnson apartment 3B Sterling, WILL 20166 3 Falke Plaza.

    Problem

    ---------

    (1) if the value, if the County (if null) value then it shows the ZIP with dot's (.) value, in the 31234 above..,.

    How to solve this problem?

    (2) another possible to fix the code, I want to use substr and InStr.

    (3) who is the best approach?

    Conditions:

    --------------

    (1) shipping_instructions column has the value with "Mary America.1234 Southridge Park Dr... Samna Lorie.MO.31234... »

    This means it combined all the similar name, address, city, State, zip

    (2) we insreted in the table separately.

    =========================

    / * Use Substr and Instr * /.

    =========================

    I used substr and instr, but I'm getting the money results (no point in the address).

    "America Mary. 1234 Southridge Park Dr. Samna Lorie.MO.31234..'


    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Mary America 1234 Southridge Park Dr. Samna Lorie MO 31234  NULL VALUE

    But I need the results (no point in the address)

    NAME ADDRESS CITY ZIP County SATE

    ---------                  --------                                ------------           ------           -------    -- -----

    Mary America 1234 Southridge Park Dr.    Samna Lorie MO 31234  NULL VALUE

    Hello

    994122 wrote:

    Hello

    (1) how do to do this, use the substr and instr functions?

    Thank you

    You can't do all the work with SUBSTR and INSTR; you need regular expressions to obtain a string delimited by a #.

    Once you have such a string, then you can use SUBSTR and INSTR (instead of REGEXP_SUBSTR) to get the separate secondary strings:

    WITH got_delimited_string AS

    (

    SELECT REGEXP_REPLACE (val

    , '\. ([^ .]| $)'

    , '#\1'

    ) AS delimited_string

    FROM the data

    )

    got_pos AS

    (

    SELECT delimited_string

    , INSTR (delimited_string, "#", 1, 1) AS pos_1

    , INSTR (delimited_string, "#", 1, 2), pos_2

    , INSTR (delimited_string, "#", 1, 3) AS pos_3

    , INSTR (delimited_string, "#", 1, 4) AS pos_4

    , INSTR (delimited_string, "#", 1, 5) AS pos_5

    , INSTR (delimited_string, "#", 1, 6) AS pos_6

    OF got_delimited_string

    )

    SELECT SUBSTR (delimited_string, 1, pos_1 - 1) AS the name

    SUBSTR (delimited_string, pos_1 + 1, pos_2 - (pos_1 + 1)) AS address

    SUBSTR (delimited_string, pos_2 + 1, pos_3 - (pos_2 + 1)) AS city

    SUBSTR (delimited_string, pos_3 + 1, pos_4 - (pos_3 + 1)) AS State

    REPLACE (SUBSTR (delimited_string, pos_4 + 1, pos_5 - (pos_4 + 1))

    , '.'

    )                                                           AS zip

    SUBSTR (delimited_string, pos_5 + 1, pos_6 - (pos_5 + 1)) AS the County

    OF got_pos

    ORDER BY delimited_string

    ;

  • substr and instr - get all the characters after the last.

    I have a few fields tbl as follows

    ABC, 123, xyz, 234

    123, ggg, ppp, rrr

    SSS/bbb/444/a

    BB/11

    XX/bb/f

    I want to choose any characters after the last.

    so the above might give

    234

    RRR

    one

    11

    f

    played with substr and instr but have not been able to figure it out yet. He should get one after last chain / no matter where / is or how they are.

    Here is an example

    Select

    substr ("123/dd/gg ', instr (substr (" 123/dd/gg ', instr ("123/dd/gg ', ' /'") + 1 "), ' / ') + 3")

    of the double

    substr ("123/dd/gg ', instr('123/dd/gg','/',-1,1) + 1")

  • substr and instr EQL

    Another question EQL. Is there an equivalent to substr and instr EQL?

    Published by: bewise on June 28, 2012 17:39

    Not at the moment. Discover the v2.3 EQL language reference guide here for more details.

    http://docs.Oracle.com/CD/E29805_01/QueryLangRef.PDF

  • Substr and InStr

    Hi all

    I have a table where a column has a data character in the format below:

    * '00003434' *.
    * '00123' *.
    * '0000045' *.

    If I want to eliminate all zeros on the left, how can I do using substr and instr? or is there an easier way?

    Thank you

    KK

    Try again with

    Select ltrim ('00003434 ', ' 0') of double;

  • data of cutting using substring and instring, and storage in a new table

    Hi all

    I have an emp_address 2tables, address as below:
    ---------------------------------------------------------------
    create the table emp_address (emp_id varchar2 (10), address varchar2 (100));

    Insert into EMP_ADDRESS
    (EMP_ID, ADDRESS)
    Values
    ('101', 'street1 fremont CA 94538');
    Insert into EMP_ADDRESS
    (EMP_ID, ADDRESS)
    Values
    ("102", "Street.2 fremont, CA 94537');
    COMMIT;


    create the address table (emp_id varchar2 (10), street varchar2 (20), city varchar2 (15), State varchar2 (10), zip varchar2 (10));

    -----------------------------------------------------------------------------
    Emp_address data as below:

    emp_id address

    street1 101 fremont CA 94538

    102 fremont, CA 94537 Street.2

    ------------------------------------------------------------------------------
    now I read data emp_address and split the data of the address column and record these data in the address table like as below

    emp_id Street City State Zip Code
    street1 101 fremont, ca 94538
    102 fremont, ca 94537 Street.2

    -------------------------------------------------------------------


    I'm trying to divide these data using substring and instring. Actually my problem was between the data a few times I have 1tab or 2tabs and sometimes 3tab. If the number of tab spaces is not constant.

    So can u help me in this case.

    Thanks in adavnce

    position of reference BluShadow

    WITH emp_address AS (SELECT   '101' emp_id,
                                  'street1 fremont CA 94538' address
                         FROM     DUAL
                         UNION ALL
                         SELECT   '102',
                                  'street2  fremont CA 94537'
                         FROM     DUAL),
        emp_address_list_temp AS
          (SELECT       emp_id,
                        SUBSTR (
                          address,
                          DECODE (LEVEL,
                                  1, 1,
                                  INSTR (address, ' ', 1, LEVEL - 1) + 1
                                 ),
                          DECODE (
                            INSTR (address, ' ', 1, LEVEL),
                            0,
                            LENGTH (address),
                            INSTR (address, ' ', 1, LEVEL)
                            - DECODE (LEVEL,
                                      1, 0,
                                      INSTR (address, ' ', 1, LEVEL - 1)
                                     )
                            - 1
                          )
                        )
                          address,
                        LEVEL rn
           FROM         emp_address
           CONNECT BY   LEVEL <=
                          LENGTH (address) - LENGTH (REPLACE (address, ' ')) + 1
           GROUP BY     emp_id, address, LEVEL),
        emp_address_list AS
          (SELECT   emp_id,
                    address,
                    ROW_NUMBER () OVER (PARTITION BY emp_id ORDER BY rn) rn
           FROM     emp_address_list_temp
           WHERE    TRIM (address) IS NOT NULL)
    SELECT     emp_id,
               (SELECT   address
                FROM     emp_address_list e2
                WHERE    e2.emp_id = e1.emp_id
                     AND rn = 1)
                 street,
               (SELECT   address
                FROM     emp_address_list e2
                WHERE    e2.emp_id = e1.emp_id
                     AND rn = 2)
                 city,
               (SELECT   address
                FROM     emp_address_list e2
                WHERE    e2.emp_id = e1.emp_id
                     AND rn = 3)
                 state,
               (SELECT   address
                FROM     emp_address_list e2
                WHERE    e2.emp_id = e1.emp_id
                     AND rn = 4)
                 zip
    FROM       emp_address_list e1
    GROUP BY   emp_id
    
  • SUBSTR and INSTR function

    Hi gurus,

    I have the data as follows:

    data
    -----------------------------------------------------------------------------------------------------------------------
    ' BIDIE01H / TXT:ZUNE = HA011, CellIndex = 144 /CAI:452 - 01-32201-47001 / CAI:45201F7dc9b79a'
    ' BIDIE01H / TXT:ZUNE = HA111, CellIndex = 124 /CAI:452 - 01-32201-471 / CAI:45201F7dc9b79b'


    and I'm writing a SQL results:

    CAI
    ---------
    452 01-32201-47001
    452 01-32201-471

    Any idea to do? I tried around with SUBSTR and INSTR functions but not yet sucessed.

    Thank you
    Alex

    something like:

    with my_tab as (select 'BIDIE01H/TXT:ZUNE=HA011, CellIndex=144 /CAI:452-01-32201-47001/CAI:45201F7dc9b79a' col1 from dual union all
                    select 'BIDIE01H/TXT:ZUNE=HA111, CellIndex=124 /CAI:452-01-32201-471/CAI:45201F7dc9b79b' col1 from dual)
    -- end of mimicking your data: USE SQL below:
    select substr(col1, instr(col1, '/CAI:', 1) + 5, instr(col1, '/CAI:', 1, 2) - instr(col1, '/CAI:', 1) - 5 ) CAI
    from my_tab
    
    CAI
    --------------------------------------------------------------------------------
    452-01-32201-47001
    452-01-32201-471     
    
  • A string into the text and numbers using SUBSTR and INSTR

    I have the sample data. I know it's terrible database designed for a combination of text and numbers in the same field, but I can't change the business process.

    That's what I have so far:

    set linesize 5000
    
    WITH table_data
         AS (SELECT 'R: JASON BOURNE 12341560' str FROM DUAL UNION ALL
             SELECT 'R: FATS DOMINO 23432342' str FROM DUAL UNION ALL
             SELECT 'R: MARTIN LUTHER KING 3334156' str FROM DUAL UNION ALL
             SELECT 'R: TOM CRUISE 6547123' str FROM DUAL UNION ALL
             SELECT 'R: TOMMY DE GROOT 1212124' str FROM DUAL UNION ALL
             SELECT 'R: GRIM REAPER 1345245' str FROM DUAL UNION ALL
             SELECT 'R: DOCTOR DEATH THE FIRST SMITH 24356178' str FROM DUAL)
    SELECT str
         , TRIM(SUBSTR(str, INSTR(str, ' ', 1, 1), INSTR (str, ' ', 1, 2) - INSTR (str, ' ', 1, 1))) first_name
         , REPLACE(SUBSTR(str, INSTR (str, ' ', 1, 2)+1, 999), SUBSTR(str,LENGTH(str)-6,7), '') last_name
         , SUBSTR(str,LENGTH(str)-6,7) emp_num
      FROM table_data;
    
    STR                                      FIRST_NAME    LAST_NAME                 EMP_NUM
    ---------------------------------------- -----------------------------------------------
    R: JASON BOURNE 12341560                 JASON         BOURNE 1                  2341560
    R: FATS DOMINO 23432342                  FATS          DOMINO 2                  3432342
    R: MARTIN LUTHER KING 3334156            MARTIN        LUTHER KING               3334156
    R: TOM CRUISE 6547123                    TOM           CRUISE                    6547123
    R: TOMMY DE GROOT 1212124                TOMMY         DE GROOT                  1212124
    R: GRIM REAPER 1345245                   GRIM          REAPER                    1345245
    R: DOCTOR DEATH THE FIRST SMITH 24356178 DOCTOR        DEATH THE FIRST SMITH 2   4356178
    
    7 rows selected.
    

    I need to:

    1 extract the first name - which is always the first name after the 'r' - I've got that little works very well.

    2 extract the name - should be the last word before the number, if e.g. for the last night, I wish only that 'SMITH' and 'KING' for the 3rd line and "GROOT" for the 5th line.

    3. remove the number at the end, regardless of the length - some of the examples above are 8 long numbers so my attempt above does not work.

    I can't use any REGEXP or REGEXP_SUBSTR because they are not registered in the EUL I'm using discoverer, I can only use INSTR AND SUBSTR.

    I was wondering if someone might be able to help please?

    Any advice much appreciated.

    Thank you

    AW, go on them, as it's Christmas, I'm feeling generous...

    SQL > ed
    A written file afiedt.buf

    1. WITH table_data (SELECT "r: JASON BOURNE 12341560' DOUBLE UNION ALL STR ')
    2. SELECT "r: FATS DOMINO 23432342' str OF DOUBLE UNION ALL.
    3. SELECT "r: MARTIN LUTHER KING 3334156' str OF DOUBLE UNION ALL.
    4. SELECT "r: TOM CRUISE 6547123' str OF DOUBLE UNION ALL.
    5. SELECT "r: TOMMY GROOT 1212124' str OF DOUBLE UNION ALL.
    6. SELECT "r: GRIM REAPER 1345245' str OF DOUBLE UNION ALL.
    7. SELECT "r: DOCTOR DEATH FIRST SMITH 24356178' FROM DUAL str.
    8                     )
    9 select substr (str, 1, instr(str,' ')-1) as a first name
    10, substr (substr (str, 1, instr(str,' ',-1)-1), instr (substr (str, 1, instr(str,' ',-1)-1),' ', 1) + 1) as last_name
    11, substr (str, instr (str, ' ',-1) + 1) as emp_num
    12 years of (select replace (str,'R: ') as str)
    table_data 13
    14*        )
    SQL > /.

    FIRST_NAME LAST_NAME EMP_NUM
    ---------------------------------------- ---------------------------------------- ----------------------------------------
    JASON BOURNE 12341560
    FATS                                     DOMINO                                   23432342
    MARTIN                                   KING                                     3334156
    TOM                                      CRUISE                                   6547123
    TOMMY                                    GROOT                                    1212124
    GRIM                                     REAPER                                   1345245
    DOCTOR SMITH 24356178

    7 selected lines.

  • Help on using substr and instr functions

    Hello

    I'm trying to go back to the first three letters of the first word and all the last word in a description field. For example, if the description is 'grilled steak' the query should return "steak gri. That's what I have so far:

    SELECT SUPPLIER_ID, PRODUCT_CODE, SUBSTR (DESCRIPTION, 1, 3). ' ' || SUBSTR (DESCRIPTION, INSTR (DESCRIPTION, ' ', 3)) AS A DESCRIPTION
    OF L_FOODS;

    Unfortunately, if the first word is the final word, it returns something like "sod soda." Does anyone have any advice or suggestions? Any help would be appreciated.

    Hi and welcome to the forum!

    It is always helpful if you identify your version of Oracle. The solution below depends on 10.1 and upward.

    What you could do is include a conditional around your instr/substr functions that checks the number of spaces between words. If it is greater or equal two one then there are at least two words. For example:

    WITH test_data AS
    (
         SELECT 'grilled steak' AS DESCRIPTION FROM DUAL UNION ALL
         SELECT 'large pepperoni pizza' AS DESCRIPTION FROM DUAL UNION ALL
         SELECT 'soda' AS DESCRIPTION FROM DUAL
    )
    SELECT     (CASE
              WHEN LENGTH(REGEXP_REPLACE(TRIM(DESCRIPTION),'[^[:space:]]','')) > 0
              THEN SUBSTR(DESCRIPTION,1,3) || SUBSTR(DESCRIPTION,INSTR(DESCRIPTION,' ',-1))
              ELSE SUBSTR(DESCRIPTION,1,3)
         END) AS DESCRIPTION
    FROM     test_data
    

    Results

    SQL> /
    
    DESCRIPTION
    -----------------------
    gri steak
    lar pizza
    sod
    

    : EDITION:

    I also wanted to add this:

    SUBSTR(DESCRIPTION, INSTR(DESCRIPTION, ' ', 3))
    

    May not return the expected results. If your description field contains more than two words he will return all remaining words not only the LAST Word. See my solution above for what I believe is the correct version.

    HTH!

  • substring and instring

    Hi all

    I am very new to oracle. I am now learning oracle. I have little doubt could someone can help me.

    I have a string like "" alias robert: 09-047 position now: CLARK ".

    now I need to store the word
    ' 09-047' in a variable x
    and clark in a variable y

    IE x I should store the word ' alias robert:' until just before the word "position now:' so my put's '09-047'."
    for this, I tried like below

    Select trim (substr ("alias robert: 09-047 position now: CLARK',"))
    InStr ("alias robert: 09-047 position now: CLARK ',':', 1") + 1)) twice;

    "I now get the o/p as position ' 09-047: CLARK"
    But I have to me ' 09-047' only. For this I need to give the length of the 3rd parameter IE chain.
    In my substring I used single string IE 2parameter and position now, I have to give the length.

    Could you please help me.

    Thanks and greetings
    Dilip
    test@ORA10G>
    test@ORA10G> with t as (
      2    select 'robert alias: 09-047 position now: CLARK' x from dual)
      3  --
      4  select x,
      5         substr(x,instr(x,':',1,1)+2,instr(x,' position now')-instr(x,':',1,1)-2) y,
      6         substr(x,instr(x,':',1,2)+2) z
      7    from t;
    
    X                                             Y          Z
    --------------------------------------------- ---------- ----------
    robert alias: 09-047 position now: CLARK      09-047     CLARK
    
    test@ORA10G>
    test@ORA10G>
    

    isotope

  • using substr and instr

    Hi all

    create table abc (str varchar2 (10))

    insert into abc values ('ABC - DEF')

    Insert into abc values('ABC/DEF')

    Insert into abc values ('ABC DEF')

    Insert into abc values('ABC.) DEF')

    insert into abc values ('ABC DEF')

    I need to put as ABCDEF for all values, if possible using sustr and instr

    Thank you

    Three ways:

    Select replace (str, translate(str,'~ABCDEFGHIJKLMNOPQRSTUVWXYZ','~')) in abc;  -assuming a single character is there in your data...

    -generic way to remove all of the other characters keeping uppercase alphabets

    SELECT TRANSLATE (str, ' ~' |) TRANSLATE (str, ' ~ ABCDEFGHIJKLMNOPQRSTUVWXYZ ',' ~'), ' ~') of ABC;

    -Using regular expressions

    Select regexp_replace(str,'[^[:alpha:]]') in abc;

    See you soon,.

    Manik.

  • How to use Substr and Instr to get data from a file

    Hi I have a script

    I get a file like this

    1.20, ram, sales

    I get a file as these data as a column

    I want to divide these data into 4 different columns as

    1 20 sales of ram

    Hello

    This query will help you.

    Select

    SUBSTR (C1, 0, INSTR(C1,',')-1).

    SUBSTR (C1, INSTR (C1, ',') + 1, INSTR(C1,',',1,2)-INSTR(C1,',',1,1)-1),

    SUBSTR (C1, INSTR(C1,',',1,2) + 1, INSTR(C1,',',1,3)-INSTR(C1,',',1,2)-1).

    SUBSTR (C1, INSTR(C1,',',1,3) + 1, INSTR(C1,',',1,4)-INSTR(C1,',',1,3)-1)

    SUBSTR (C1, INSTR(C1,',',1,3) + 1)

    BeO

    Select 1, 20, ram, C1 double sales

    )

    Remember that a comma is not really safe as field separator

    Post edited by: DecaXD

  • How to make a combination substr and instr in javascrip

    Hi all

    I need to extract information in a javascript function.

    In sql, we can do as this substr (: P1_ITEM, 1, instr(:P1_ITEM,'.',1,4)-1)

    f.e.
    01.02.03.04.05-> 01.02.03.04
    001.002.003.004.005-> 001.002.003.004


    How do I do it in javascript.

    Thanks in advance

    lukx

    Hi lukx,

    You can use the following javascript function:

    function processText(pString, pSearchString, pOccurrenceNum)
    {
      var j = 0;
      for(var i = 0; i < pOccurrenceNum; i++)
      {
        j = pString.indexOf(pSearchString,j) + 1;
      }
      j = j - 1;
      return pString.substr(0,j);
    }
    

    To treat, for example, the second example, you've shown, you would have to make the following call:

    processText("001.002.003.004.005", ".", 4)
    

    Maybe this isn't the best solution, but as I saw it in the JavaScript API that indexOf and lastIndexOf are only for the first and the last accident, that's why I included the loop for. I hope this helps.

    Kind regards

    Sergio

  • Problem with substr and instr

    create table ztest1 (descrr varchar2 (40));

    values in ztest1
    ===============

    123/09-00
    1234345/66-44
    1/8-00000
    345656676/555555555-222222

    I want to separate the values of slash and hyphen.

    I am able to do first and last as
    123 00 null
    123345 44 null
    1 null 0000
    345656676 null 222222
    With the following query

    can you please advise me where I am doing wrong.

    Select TRIM (SUBSTR (mck.descrr,
    1,
    INSTR (mck.descrr, "/")-1
    )
    ) 'type ',.
    TRIM (SUBSTR (mck.descrr,
    INSTR (mck.descrr, '-') + 1.
    INSTR (mck.descrr, '-', - 1).
    -INSTR (mck.descrr, '-')
    -1
    )
    ) "part2"
    TRIM (SUBSTR (mck.descrr,
    INSTR (mck.descrr, '-',-1) + 1
    )
    ) "T"
    of ztest1 mck

    Thanks in advance.

    You are close with your attempt. You have to find the starting position of the /, then calculate the length between the / amd t he... So:

    SQL> l
      1  with mck as (
      2    select '123/09-00' descrr from dual union all
      3    select '1234345/66-44'  from dual union all
      4    select '1/8-00000'  from dual union all
      5    select '345656676/555555555-222222' from dual)
      6  select TRIM (SUBSTR (mck.descrr, 1, INSTR (mck.descrr, '/') - 1)) "type",
      7         TRIM (SUBSTR (mck.descrr, INSTR (mck.descrr, '/') + 1,
      8                       INSTR (mck.descrr, '-') - INSTR (mck.descrr, '/')-1)) "part2",
      9         TRIM (SUBSTR (mck.descrr, INSTR (mck.descrr, '-', -1) + 1)) "T"
     10* from mck
    SQL> /
    
    type                       part2                      T
    -------------------------- -------------------------- --------------------------
    123                        09                         00
    1234345                    66                         44
    1                          8                          00000
    345656676                  555555555                  222222
    

    @Kim:
    "Regular expressions will be easier," well, that's a little matter to debate ;-) they can get real ugly looking very quickly.

    John

Maybe you are looking for

  • Libretto U100 - error if I use the SD memory Boot utility

    Hello I'm trying to format and install a starter BACK on a 2 GB SD system. Laptop is a Libretto U100. I can read and write the 2 GB SD used in my digital camera cards. As far as I can tell the SD memory card Format program works well. But when I run

  • Everyone try to use app VLC with Airport Extreme by car?

    I have the new VLC app installed on my Apple TV4. I also have a USB drive connected to my current gen Airport Extreme. I have a video file (Video_TS) residing on the drive from the airport. When I run VLC on the ATV4, under the "local network" menu,

  • While time loop clock pc

    Hi guys I have a code that uses a while (currently) loop to open a file and read from time to time (in its simplest form... and... the details are not German to this post) The requirements are now tight and the loop (While or Timed?) should play the

  • E1200 Cisco must serve as a thread with no internet connection

    I have a Cisco E1200, I want to use it as a local area network wireless. I want to start it in my car while my children can play minecraft wireless set on the same LAN with out having to use an Internet connection.If it is possible to explain it plea

  • I can not connect by CCA administrator

    I just uninstall some programs from my computer hp pavilion dv4 laptop, then I restart it...reboot at the end, I can not connect my admin VAC, my admin acc must put the password, but when I put the password it doesn't work, so I just connect you in g