Limit the Total number of characters between double Quotes using Oracle 11 g PL/SQL

Hello

I need a way to apply a limit of 32 substring for each group of data inside double quotes, with Oracle 11 g PL/SQL.

Essentially using the following example string that much for me, I have no control of how this string is built:

str := "AAAAAAA BBBBBBB CCCCCCC DDDDDD1","AAAAAAA BBBBBBB CCCCCCC DDDD",”QWERTY”,”N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1”’;

I need to go through each group of values between each double quote, for example ("QWERTY") and apply a substring of 32 to each group found.

So, using the example above of the chain, it's as if I need to do the following:

str := "substr(‘AAAAAAA BBBBBBB CCCCCCC DDDDDD1’,1,32)","substr(‘AAAAAAA BBBBBBB CCCCCCC DDDD’,1,32)",”substr(‘QWERTY’,1,32)”,”substr(‘N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1’,1,32)”’;

So in the end, my final result for the str would be composed of four groups where the length of each grouping is less than or equal to 32.

Any help would be great.

Thank you.

Try this (replace with your actual table):

with the temp as

(

SELECT substr (REGEXP_SUBSTR (str,'[^,] +', 1, LEVEL) 1, 32) r

OF THE TEST

connect IN REGEXP_SUBSTR(str, '[^,]+', 1, LEVEL) IS NOT NULL

)

Select replace (listagg (r, '"," ') in the Group (order by null),' ' "','" ' ")

temp

output:

"VIEN BBBBBBB CASTILLO DDDD", "VIEN BBBBBBB CASTILLO DDDDDD1", "N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N", "QWERTY".

Tags: Database

Similar Questions

  • How to get the total number of pages have been printed using the pl/sql

    Dear all,

    I want to store the total number of physical pages printed in a database table, how could retrieve the value of the total number of pages.


    I am using Oracle 6i report

    thnxxx in advance :)

    At the end of your report (i.e. After all the images from your data model), place a dummy field. You can get the page number with srw.get_page_num in the trigger of the format of this field. Since it is the last field of your report, it is also the last page number.

  • Limit the maximum number of characters per line in the TextField, help please

    Hello Livecycle designers!

    It would be great if you could help me with the following problem. I have a TextField with 5 lines (limit of the viewable area and the exact height) and I want to limit the maximum number of characters per line up to 10 (as well as the total in this field at 50, but I'm able to do with the option "time limit, max characters").

    As far as I know can be done only by the script so if you change that I wrote:

    lines of the var = xfa.event.newText.toString().split('\n');

    i = Lines.Length,
    maxChar = "10";

    If {(maxChar)
    While (I--> 0) {}
    If (rows [i] .length == maxChar) {}
    XFA. Event.change = "\n";
    }
    }
    }

    and actually who works very well when instead of '\n' in the 1st line, I put any character (e.g. ' |' and I won't pretend that ' |' is my new \n).

    So the main problem is to split the text entered by the user in lines (the '\n' is unfortunately not working). So the solution to this problem would somehow split my Textbox in lines (in table) after the user presses ENTER.

    I'd appreciate any help here, so if you have just 2 minutes of your time, please help me.

    Hello

    I have rebuild your idea... that is the result.

    var Input = xfa.event.fullText;

    var FullLength = Input.length;

    var SplitLength = 10

    var SplitParts = Math.ceil(FullLength / SplitLength)

    var JoinString = "";

     

    for (var i = 0; i)<= splitparts;="">

    {

    SplitString = Input.substring (0, SplitLength);

    Entry = Input.replace (SplitString, "");

    JoinString = JoinString + SplitString + "\u000a";

    }

    xfa.resolveNode("Textfield2").rawValue = JoinString;

  • How can I limit the total number of hours per day, that my child may be on the computer?

    Summary of the issue
    Other issues of Windows Live family safety

    What version of Windows Live Family Safety do you use?
    Version 2011 (15.4.3538.513)
    Choose your operating system version:
    Windows 7

    Additional details
    How can I limit the total time per day my kind that can be on the computer? I see only menu in which I can determine which hours of the day, they are allowed to access. Concerning the lower self, for example him limit total daily in any hours 1 hour.

    Hello

    The feature of time safely of the family has changed recently. For more information, please see this sticky post:

    How to work the allocation of time and curfew? 

    You can also consult this thread. It has information on how parental control has changed and how to put in place.

    Thank you!

  • Extract the given string a String between double quotes

    Hey guys,.

    I am doing a project open source to help lovers of ADS - B to store data on Oracle Database XE (11.2.0.2)

    I need to retrieve a string, but I didn't know how, please can someone help me.

    Chain: [{'id': 'PR - GIG', 'label': "PR-CONCERT - E47EB2 - BS Airlines - Boeing 737 - 73 S (29077)", "value": 'PR - GIG' "}]

    KeyString: "label".

    Output: ' PR-CONCERT - E47EB2 - BS Airlines - Boeing 737 - 73 S (29077) '


    And if possible put this string in multiple strings

    String1: PR-GIG

    Channel 2: E47EB2

    String3: BS Airlines

    String4: Boeing 737 - 73 S

    String5: 29077

    Thanks for the help.

    Select x.*

    t,.

    XMLTable)

    "ora: tokenize($s,"-").

    from regexp_substr (str,'"label": "([^"]+) "', 1,1,null, 1) as"s ".

    ) x

    /

    COLUMN_VALUE
    -------------------------
    PR - GIG
    E47EB2
    BS Airlines
    Boeing 737 - 73S (29077)

    SQL >

    SY.

  • Display the total number of allowed characters

    I have a text field multi-line with a limited number of characters. I would like to let people know how many characters they have typed so far, and the total number of characters allowed.

    Does anyone know of a script that could be used to do this?

    I use Acrobat X on Windows.

    No, that would be a custom validation script. To enter a custom key script combination, go to the Format of the field properties dialog box, select a custom fo format category and you will see where you can write a custom typing script. In your case, it should be:

    remaining_count("ShowCharCount");
    
  • What is the maximum number of characters that a 2D barcode can have with the symbology PDF417 Matrix? How to solve the problem of code bar having too much data?

    What is the maximum number of characters that a 2D barcode can have with the symbology PDF417 Matrix? How to solve the problem of code bar having too much data? I'm incorporating data of the bar code under a button field. But when the data is large, the problem occurs.

    Apparently the theoretical capacity of the PDF417 barcode is 1850 characters or numbers in 2710. Of course, the actual capacity depends on the size - more square inches, more data. But before the theoretical limit, that you can reach practical limits in scanning technology so test carefully with all models of planned barcode scanner.

  • When you use find on the page (ctrl + F on Windows) it is a message indicating the total number of matches. What does the first number?

    When you use find on the page (ctrl + F on Windows) it is a message indicating the total number of matches. What does the first number?
    I'm more interested in the case when this number is smaller than the total.

    Hello

    I think you mean the text stating "x of there matches", to the right of the box where you entered the search term.

    The first number ("x" in my example above) indicates the current entry highlighted on the page that matches the search phrase. If you use the upper and down arrows to navigate through the instances of this term on the page, you will see this number go up and down.

    I hope this helps, but if not please come back here and we can look at another solution for you.

  • In 12.4.1.6, where do you see the total number of songs in your iTunes library?

    In 12.4.1.6, where do you see the total number of songs in your iTunes library?

    In my case (iTunes on OS X 10.9.5 12.4.1), in the library section of the box I choose songs and the number appears in the status bar at the bottom of the iTunes window.  If you do not have the visible status bar, it can be activated from the iTunes menu bar, display > show status bar.

    Good luck

    SRB

  • How can I find the total number of contacts on the iPhone 6 s?

    I used to be able to see the total number of contacts on my iPhone 6s, however, does not appear more.  How can I fix it?

    Go to iCloud.com then in contacts and made scroll down - it's the only place where I was able to find

  • How can I find the total number of items in a dim multi table

    How can I find the total number of items in a simple Sun table or multi?

    For example, a table 2 x 3 has 6 elements, and a 2 x 3 x 4 to 24. How can I calculate this very easily - is there a single VI do that?

    David

    Use "table size" (palette table) followed by "multiply the elements of the array" (digital palette)

    (Also works well for 3D arrays and higher)

  • Function to count the total number of data channels

    I know that I had stumbled on a tiara function that returns the number of data in all of my data channels.  I can't seem to find the thread where I had seen it.  I'm looking to replace a script a long time user with this simple function in my future coding.

    Thank you!

    Hi CrshTstr,

    I actually still use GlobUsedChn for that.  In more recent versions of DIAdem, you can use commads as GroupChnCount() or Data.Root.ChannelGroups (1). Channels.Count to return the number of channels in a particular group.  But regardless of which group the channels are in the GlobUsedChn variable always returns the total number of channels currently on the data portal.

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • How to query the total number of columns and lines filled with data?

    How to get the number of rows and columns in Exel file data using Excel report?

    Since you have posted this question in the forum of LabWindows/CVI, I guess you want to know how to do with CVI.

    You need to know how to open and activate the Excel data file.

    Depending on the function returns the total number of columns and lines col_count row_count, respectively.

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

    int CountColumnsAndRows (void)
    {
    Error HRESULT = 0;
    CAObjHandle rangeCurrentRegionHandle = 0;
    CAObjHandle rangeColumnsHandle = 0;
    CAObjHandle rangeRowsHandle = 0;
      
    unsigned long col_count = 0, row_count = 0;
      
    Must use the 'A1' property and CruuentRegion count the total of columns and lines, including the drafts!
      
    error = CA_VariantSetCString (& MyCellRangeV, 'A1');
      
    error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, & ExcelRangeHandle);
    If (error<0) goto="">
      
    error = Excel_GetProperty (ExcelRangeHandle, & ErrorInfo, Excel_RangeCurrentRegion, CAVT_OBJHANDLE, & rangeCurrentRegionHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeColumns, CAVT_OBJHANDLE, & rangeColumnsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeColumnsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & col_count);
    If (error<0) goto="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeRows, CAVT_OBJHANDLE, & rangeRowsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeRowsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & row_count);
    If (error<0) goto="">

    Error:

    CA_VariantClear (& MyCellRangeV);
    CA_VariantClear (& MyVariant);
    ClearObjHandle (& ExcelRangeHandle);
    ClearObjHandle (& rangeCurrentRegionHandle);
    ClearObjHandle (& rangeColumnsHandle);
    ClearObjHandle (& rangeRowsHandle);
      
     
    If (error<>
    ReportAppAutomationError (error);
      
    error return;
    }

  • Is there a way to get the total number of samples to a TDMS file?

    I'm looking at the documentation for the function of properties Get TDMS and I see that it has a property: wf_samples which "represents the number of samples in the first data segment. Is it possible to get the number of samples in, say, the second segment of data? My goal is to get the number of samples in all segments of data for a single channel.

    To retrieve the total number of samples, I use the properties of 'NI_ChannelLength' to be linked to the function of TDMS properties get.

    The I64 outbut gives you the total number of samples of the selected channel.

    See attachment so useful

    Marco

  • HP Officejet Pro 8610: How can I get a report with the total number of pages printed on my HP Officejet Pro 8610?

    The number of pages that print is so critical to a choice to use the "HP Instant ink Plan' or not, how can I find the total number of pages that I printed on my brand new (installed 2 days ago) 8610?  And if I can, there are a total of 'resettable' or working capital?  Don't see anything in the user guide and a search gives nothing usable on this blog.

    Wireless printer installed on an old PC with Windows XP SP3.  I also of course install with cable network but so far it works well on my home network without a network cable.  Is there any operating system, I also have a laptop Lenovo Vista on which I can install this printer.

    Please do not answer I can find total by counting the number of pieces of paper that I have.  Surely the inner workings of this beautiful machine must have the requested data as well as HP can say my consumption if I select the monthly plan of ink!

    This 8610 was a good buy (net $89,00 after the resumption of my six years, Deskjet J36xx) at Office Depot/Max who has of course influenced my decision to purchase.  So far, I am very happy with the print quality and speed, have not yet tried the scanner and will probably never use the fax machine since I have no land line phone.

    Thank you

    Harry

    Hello

    Article #2 of the report printer Ststus will tell you. Please try:

    Printer status report

    The printer status report to view current information about the printer and the status of the ink cartridges. Also use the report to State printer for you help to solve the problems associated with the printer.

    The printer status report contains also a log of recent events.

    If you need to call HP, it is often useful to print the printer status report before calling.

    To print the printer status report

    1. in the Control Panel printer display, press and drag your finger on the screen and then press Setup.

    2. press on printing reports and then tap Printer Status Report.

    Kind regards.

Maybe you are looking for