Need help to extract the data into a string of separate brackets

Hello

I have a scenario where I have to extract data into a string that is enclosed in [].

Here's what I want to do...

entry:

[name_first] [name_mi] [name_last]

required output: this must return all data that are placed between square brackets.
name_first
name_mi
name_last

I tried the "REGEXP_SUBSTR' but my version of the database is 9i, and it is available only from 10 g.

Thanks in advance.

Hello

You can use SUBSTR and INSTR
This should work in Oracle 9:

WITH     cntr     AS
(
     SELECT     LEVEL     AS n
     FROM     dual
     CONNECT BY     LEVEL <= 3
)
,     got_pos          AS
(
     SELECT     x.txt
     ,     c.n
     ,     INSTR (x.txt, '[', 1, c.n)     AS l_pos
     ,     INSTR (x.txt, ']', 1, c.n)     AS r_pos
     FROM           table_x  x
     CROSS JOIN    cntr     c
)
SELECT        txt
,        n
,        SUBSTR ( txt
               , l_pos + 1
            , r_pos - (l_pos + 1)
               )     AS sub_txt
FROM        got_pos
ORDER BY   txt
,             n
;

Sorry, I don't have an Oracle 9 database now; I had to test this in Oracle 10.

jimmy437 wrote:
... I tried the "REGEXP_SUBSTR' but my version of the database is 9i, and it is available only from 10 g.

It's true. Regular expressions are very useful, but they are not available in Oracle 9 (or earlier).
Oracle 9 has a package supplied by Oracle, OWA_PATTERN, which provides regular expression features:
http://docs.Oracle.com/CD/B12037_01/AppDev.101/b10802/w_patt.htm
I know it's the Oracle 10, documentation, but there are in Oracle 9, too.

Oracle 9 is very old. You should consider the upgrade.

Tags: Database

Similar Questions

  • Need help to load the data from the Excel data to oracle tables

    I need to load an Excel worksheet to the Oracle table.

    The worksheet contains 20 columns, the first 8 columns contains basic information, but the rest 12 columns contains info like
    1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    So what I have to do is:

    break only one record (with 20 fields) in Excel to 3 files for each fiscal year in the Oracle table for each record in the database table will look like

    8 base field + fiscal_year + 1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    8 base field + fiscal_year + 1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    8 base field + fiscal_year + 1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    There are about 10000 rows in the data file, so how can I use sqlldr to perform this task? beside sqlldr, other good suggestions?

    THX

    External tables is just an API Oracle sqlloader. If you are about to load this data over and over again, the external tables would be a good idea, but if it's a one time thing, sqlldir is more simple, unless you want to just learn to use external Tables.

    I used to run a data warehouse, so I did it, the less similar to what you do in the past.

  • Need help to extract the Exif data

    I can't wrap my brain on how to get an individual item in a generated table. Here's what I'm trying to do: I have a script that will read all the information of an image file's exif header. It traverses the list and display each element exif very well. If I keep stuck trying to extract specific items such as copyright, artist, and description. I took the script out of the php.net site and I understand well enough how it works completely.

    Can someone break it down by the measures taken by the script? I think that if I understood it better that I could figure out how to get what I need. For example, should I loop through the $exif table before I can point to the specific exif info I want? I also don't understand the exif_read_data() function parameters (I read what php.net, but it is clear to me).

    Thanks in advance for any help.
    Mike D

    I finally got. The code in the previous post works as what. I had the wrong variable in the "alt" tags It should have been $image_description. Problem solved.

  • How to extract the data in a grid format in an area of the bean in forms 6i?

    Hello

    I need help from all the gurus and the experienced people in forms 6i. I'm currently building the shape that will have certain text fields and a bean area that displays the records that I had entered. Suite to the essentials is the basic form structure, I am developing

    1. There will be a search form that will have two text fields 'Emp ID' and 'Name Emp' and two buttons 'New' and 'find '.
    2. There is an alternative, which will have an area of bean that allows to display the following columns in it in the form of a GRID
    a. Emp ID
    (b) name of the Emp of
    This form will be also two 'Emp ID' and 'Name Emp' text fields.
    3. when I press 'New' in the search engine so the second form should open and it will be empty. I can enter data into text fields and save the form. The area of the grid (the bean area) must be empty.
    4. when I reopen the search form and enter the 'Emp Id' I just created in the previous step and click on the "Search" button then the following form should open and the "Emp Id" and the text "Emp name" fields must be populated with the data that I created in step 3 and the bean area must also display the record in the form of a grid.

    I'm ok with all parties except the part of area of bean. Can you help me hpw to develop the form with the area of the bean and extract data when wanted and display as a grid?

    Take a look at the link I provided. Francis already has an example of implementation of a Java data grid on a form. The direct link is: http://forms.pjc.bean.over-blog.com/article-1830062.html

    Craig...

  • I need help to Flash the bios. I have an Aspire 5810TZ. I start and it just says: "acer".

    I need help to Flash the bios. I have an Aspire 5810TZ. I start and he just says "acer" and goes no further. I went to the download page for BIOS on us.acer.com and it has a zip file with 5 files:
    JM4151135.exe
    IN FLORIDA...
    GPC_V135.bin
    Readme.txt
    FLASH. BAT
    What should I do? I tried to copy the files on a USB key and turn on/off with Fn + ESC key. After the release the power button and pressed Fn - Esc another screen appears after 30 seconds. I gave up and gave her 30 minutes but it does nothing. I read another person that should be flashing power button online. I have to rename one of the files. Help, please!

    Aspire 5810TZ menu of frozen startup.

    I finally understand it.

    I couldn't start a back b/c drive, it me did not start anything.

    I followed this chain of logic:

    -Downloaded the bios (2.35 is the one that worked for me)
    -Find the exe file in the winflash file.
    -Extract the files in archive exe using the 7-Zip program
    -Find the .fd file and rename it to JM41X64. FD (I read in a forum was unique in my laptop)
    -Copied JM41X64. FD and FLASH it is. EXE on a USB
    -A the battery and the hard drive out.
    -With its trendy diet I supported Fn + Esc and that you press the power button once while ensuring that the Fn + Esc has been always held down.
    -J' waited 6 seconds and release the Fn + Esc and seen the flashing flash player
    -After about 10 minutes, restarted the machine and the bios as like new.

    Later, I found that there was a hard drive problem.

    I want you guys should help more. All I needed was the name of the JM41X64 file. FD and you don't know how many hours I put into trying to find how simpy bios flash. It is not that difficult for someone with a b.s. in computer science to learn how. Couldn't we a m.s. back b/c the bios drive was messed up. F12 didn't work.

  • Need help to retrieve the XML file

    Hello

    I'm new to xml query and I need help badly. I have a file xml with the following content. I need help to extract data as:

    beginTimelocalDnmeasObjLdnhdlcRxErrAborthdlcRxErrCRChdlcRxErrLackOfBufs
    2015 07-28 T 14: 45:00 + 03:00ERSGSN01MagId.SlotId.E1/T1Trunk.FractionId=2.8.6.1240010200
    2015 07-28 T 14: 45:00 + 03:00ERSGSN01MagId.SlotId.E1/T1Trunk.FractionId=2.9.3.1000
    2015 07-28 T 14: 45:00 + 03:00ERSGSN01MagId.SlotId.E1/T1Trunk.FractionId=2.9.4.1000

    and the XML data I have are:

    <? XML version = "1.0" encoding = "UTF-8"? >

    <? XML-stylesheet type = "text/xsl" href = "MeasDataCollection.xsl"? >

    " < measCollecFile xmlns =" http://www.3GPP.org/FTP/specs/archive/32_series/32.435#measCollec ">

    < fileFormatVersion = "32.435 V9.0" fileHeader vendorName = "Ericsson" >

    < fileSender / >

    < measCollec beginTime = "2015-07 - 28 T 14: 45:00 + 03:00" / >

    < / fileHeader >

    < measData >

    < managedElement localDn = "ERSGSN01" / >

    < measInfo measInfoId = ' E1/T1, hdlc' >

    < job jobId = "Meas_E1T1_all" / >

    < duration granPeriod = "PT900S" endTime = "2015-07 - 28 T 15: 00:01 + 03:00" / >

    < duration repPeriod = "PT900S" / >

    < p measType = "1" > hdlcRxErrAbort < / measType >

    < p measType = "2" > hdlcRxErrCRC < / measType >

    < p measType = "3" > hdlcRxErrLackOfBufs < / measType >

    < p measType = "4" > hdlcRxErrMaxFrameLen < / measType >

    < p measType = "5" > hdlcRxErrNonOctetAlign < / measType >

    < p measType = "6" > hdlcRxErrQueue < / measType >

    < p measType = "7" > hdlcRxOK < / measType >

    < p measType = "8" > hdlcRxOctets < / measType >

    < p measType '9' = > hdlcTxOK < / measType >

    < p measType = "10" > hdlcTxOctets < / measType >

    < measValue measObjLdn="MagId.SlotId.E1/T1Trunk.FractionId=2.8.6.1" >

    < p r = "1" > 2400 / < r >

    < p r '2' = > 1020 / < r >

    < p r = "3" >/< r > 0

    < p r = "4" >/< r > 0

    < p r = "5" > </r > 0

    < p r = "6" >/< r > 0

    < p r = "7" >/< r > 0

    < p r = "8" > 0 </r >

    < p r '9' = > 295 / < r >

    < p r = "10" > 4130 / < r >

    < / measValue >

    < measValue measObjLdn="MagId.SlotId.E1/T1Trunk.FractionId=2.9.3.1" >

    < p r = '1' >/< r > 0

    < p r = "2" >/< r > 0

    < p r = "3" >/< r > 0

    < p r = "4" >/< r > 0

    < p r = "5" > </r > 0

    < p r = "6" >/< r > 0

    < p r = "7" >/< r > 0

    < p r = "8" > 0 </r >

    < p r '9' = > 295 / < r >

    < p r = "10" > 4130 / < r >

    < / measValue >

    < measValue measObjLdn="MagId.SlotId.E1/T1Trunk.FractionId=2.9.4.1" >

    < p r = '1' >/< r > 0

    < p r = "2" >/< r > 0

    < p r = "3" >/< r > 0

    < p r = "4" >/< r > 0

    < p r = "5" > </r > 0

    < p r = "6" >/< r > 0

    < p r = "7" >/< r > 0

    < p r = "8" > 0 </r >

    < p r '9' = > 295 / < r >

    < p r = "10" > 4130 / < r >

    < / measValue >

    < / measInfo >

    < / measData >

    < fileFooter >

    < measCollec = endTime "2015-07 - 28 T 15: 00:01 + 03:00" / >

    < / fileFooter >

    < / measCollecFile >

    Help, please. I tried to select a value using the following xml query which does not lead to any output:

    WITH t AS (SELECT xmltype (bfilename('SGSN_STAT_ERICSSON', 'A20150728.1445+0300-20150728.1500+0300_Meas_E1T1_all.52'), nls_charset_id('UTF-8')) FROM dual xmlcol)

    SELECT beginTime, localDn, measObjLdn, hdlcRxErrAbort, hdlcRxErrCRC, hdlcRxErrLackOfBufs

    T, XMLTABLE

    (XMLNAMESPACES ('http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec' as 'ns1'), )

    ' / measCollecFile'

    passage xmlcol

    columns

    beginTime PATH VARCHAR2 (32) ' / measCollec/@beginTime',

    localDn PATH VARCHAR2 (32) ' / measData/managedElement@localDn',

    measObjLdn PATH VARCHAR2 (32) ' / measData/measInfo/measValue@measObjLdn',

    ["hdlcRxErrAbort PATH VARCHAR2 (32) ' / measData/measInfo/measValue/r[@p="1 ']',

    ["hdlcRxErrCRC PATH VARCHAR2 (32) ' / measData/measInfo/measValue/r[@p="2 ']',

    "[" hdlcRxErrLackOfBufs PATH VARCHAR2 (32) ' / measData/measInfo/measValue/r[@p="3 ']"

    )

    Sincere greetings

    Either way, using an XQuery FLWOR expression:

    select x.*
    from xmltable(
           xmlnamespaces(default 'http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec')
         , 'for $h in /measCollecFile
              , $v in $h/measData/measInfo/measValue
            return element row {
              $h/fileHeader/measCollec/@beginTime
            , $h/measData/managedElement/@localDn
            , $v/@measObjLdn
            , element r1 {$v/r[@p="1"]}
            , element r2 {$v/r[@p="2"]}
            , element r3 {$v/r[@p="3"]}
            }'
           passing xmltype(bfilename('TEST_DIR', 'test.xml'), nls_charset_id('AL32UTF8'))
           columns beginTime           timestamp with time zone path '@beginTime'
                 , localDn             varchar2(32)             path '@localDn'
                 , measObjLdn          varchar2(80)             path '@measObjLdn'
                 , hdlcRxErrAbort      number                   path 'r1'
                 , hdlcRxErrCRC        number                   path 'r2'
                 , hdlcRxErrLackOfBufs number                   path 'r3'
         ) x ;
    
  • Need help to modify the Script to find the number of vCPU and reservation of memory in VC

    Hello

    Need help to modify the script so that his can person report to the vc all focus level instead of each level of the Cluster.

    Thank you

    KR

    Try this instead:

    $vmsInfo = Get-VM
    #Creating array to place new object
    
    $reportdata = @()
    
    Foreach ($vm in $vmsInfo)
    {
    #Creating new object
    $vmInfo = "" | Select Name, CPUReservationMHz, MemoryReservationGB
    $vmInfo.Name = $vm.Name
    $vmInfo.CPUReservationMHz = $vm.ExtensionData.ResourceConfig.CpuAllocation.Reservation
    $vmInfo.MemoryReservationGB = $vm.ExtensionData.ResourceConfig.MemoryAllocation.Reservation / 1024;
    #Inserting data into new object.
    $reportdata += $vminfo
    }
    $reportdata
    
  • HOW TO EXTRACT THE CONTENT INTO RECOVERY?

    Hi all

    I use HP Pavilion 5vt. My laptop is composed of 3 partitions: C, D and E (what is disk backup.).

    I decided to get my laptop to the initial state of the plant. However, before I receovered, I copied a folder of my own - no HP factory - e software (I didn't know that the E partition could not be reached). Then I successfully recover my laptop.

    The problem is, my own folder software disappeared, even if the partition of size E again proved existence of this file. When I clicked to E, no there wasn't a warning appeared which said that "this partition must not be delete alter.

    I'm not good in IT: this is why, I really need your help to extract the folder I was stupidly cut and paste for before E.

    I highly appreciate your help.

    Best regards

    Hello

    I guess the recovery procedure has recreated the E:\ partition and the folder you are looking for is no longer exists.  As you probably know, D:\ and E:\ partitions may not be changed.

    If you want to check, a utility to find files, folders, etc is called Commander free of charge, on the link below.  It displays the files that the operating system normally hides and has a search function.

    http://www.SnapFiles.com/PHP/download.php?id=107872&a=7122339&tag=601108&loc=10

    It is a zipped file.  If you do not have an extraction utility installed, download and install 7-Zip , which can be used to open it so that you can run the Setup program.  Run the program and select the drive E:\ in the toolbar to display the content.

    Best wishes

    DP - K

  • Need help to install the network on laptop drivers

    I have a laptop of HP 2000-239WM and recently erased due to trying to sell. However, when I reinstalled everything back on the PC, no network drivers have been installed, so I have no access to the internet, wireless and wired. Should what programs I install via USB in order to solve this problem?

    The network adapter driver specifically requests the Ethernet, wifi and it...

    Hello McKinley,

    Thank you for visiting Microsoft Community and we provide a detailed description of the issue.

    According to the description, I understand that you need help to install the network drivers into the laptop.

    Certainly, I understand your concern and will try my best to help you.

    In order to install the NIC drivers in the system, I suggest to visit the link below and check if that helps.

    http://support.HP.com/us-en/drivers/selfservice/HP-2000-200-notebook-PC-series/5091493/model/5119030

    Note: Make sure you have access to the internet to another computer and download the network drivers using the USB and install on your laptop.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • Need help to solve the problem with the margin at the bottom of the converted pdf file.

    Need help to solve the problem with the margin of the converted CEO down. What caused the change in format?

    Hi jerrio1949,

    There is no way to change the margin, you settle back into your original file & then convert to PDF format.

    Kind regards
    Nicos

  • ADF progress indicator to insert the data into the file table.

    I have a requirement where the progress bar should indicate the percentage of completion to insert the data into the tables of database files in a given folder path. I found an article that explains how to get the progress indicator when downloading a file in
    http://www.gebs.ro/blog/Oracle/Oracle-ADF-progress-indicator-in-Fusion-Middleware-11g/. I believe that I must first get the total number of files in the folder and then begin to compare with the number of files that are inserted into the table similar to what is done by downloading (getting the file size and download size), but I don't know how to do this. Can anyone help?

    May be that this example allows you to

    * 042.     Dynamically change the color of progress bar based on its current value *.

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html

  • * Need help with importing partial data of RDBMS table NHI repository *.

    Hello

    I need help to import the partial table RDBMS data, I tried the content in the logical source but still show me all the data available in the database.

    The table contains the partitioned data for which I want to only import single partion according to the partion of function value.

    IE contry = 'Fr '.

    Thanks in advance.

    See you soon,.
    Rajeev

    One possibility is to do the filtering on the physical level itself. You could use a physical table of type 'Select' and filter the data.

    Thank you!

  • Need help to diagnose the regular system analysis on iMac - processors maxed out

    I need help to identify the cause of a problem that occurs at least 2 - 3 times per day using my iMac (27-inch, mid 2010) running 10.11.5.

    I will use my iMac and then all at once things will start to really trolling. To the point of being completely unusable. Even if I'm able to move my cursor, then click to drag the windows around the screen nothing does really.

    I have iStat menus running so that can see graphics in my menu bar that all 4 cores are completely overfished. Occasionally, I was fast enough to launch the activity monitor to try to see what applications / services are responsible for, the use of % CPU column is completely empty of values, so I can't identify the culprits in a reliable way. I try to keep that column sorted by % CPU use in the hope that he could reveal something and normally it's the kernel_task who is up there.

    I use a Wacom Bamboo dated Tablet (MTE - 450 has) instead of a mouse, and at one point, I was convinced the pilot of PenTabletDrive it is based on was to blame. I contacted Wacom on this subject, and although there is no known issues they pointed out that although the latest drivers will allow me to use the tablet that they no longer support older devices. I was wondering if there was a problem of communication between the device and a driver that is no longer supported. I installed the latest driver supported for my tablet, but the problems persist.

    It may be interesting to note that, when my computer is in this semi-frozen state, I am able to launch the window enough force and quit all open applications leaving me with only the Finder. I guess that means that there are none of my apps running and it is probably one of the services. If I restart the Finder system grinds to a completely enclosed holt.

    I hope someone can let me know what I can find in the Console or elsewhere to help me finally zero in on what is to blame. I can share a log if that helps.

    Thank you in advance!

    Information that might be useful:

    Kept by I tend to be running: Adobe InDesign, Photoshop, Acrobat (all CC 2015), Mail, Safari with several tabs & Dropbox sync constantly.

    Download and run EtreCheck, created by one of his own assistants here in CSA. It is a diagnostic tool that is very useful for us to find problems. It will also give us additional specifications on your Mac. After his execution after the logfile here. It will never contain any personal information.

  • Need help to remove the zeros on the right

    Hello.

    I need help to replace the zeros in the string.

    I have a string which is the output of the network packet. There are a few trailing zeros in the package.

    I don't see them in normal mode, but the size of the string tells me that it's bigger then it looks like.

    When I pass in hexadecimal mode, you can see zeros.

    I tried to use the find/replace function allows you to search for 0 and replace it with an empty string constant. But, for some reason any, that he took no zeros.

    I need to stop the string that follows * 69.

    Show your code.  You won't find and replace with all zeroes.  These 00 in hex mode they are null characters.  (not printable byte with a value of zero).  You need search and replace on that character.  (replace string should look like 00, when it is set to display the hexadecimal code.

  • cq57: need help cq57 enter the password administrator or power on password... deisabled system 58555314

    need help cq57 enter the password administrator or power on password... deisabled system 58555314

    Thank you!!!

    @clatimer

    Enter 47433930

    REO

Maybe you are looking for