problem of counting of returns to the clob line with external tables

Hello

I want to count the number of lines (x0A) in a clob loaded from an external table.
This is the data of the file
d               2010-06-21 13:25:23               2               1073807679               0               4               1               1               0               415               348                mtp       16387 ALIGN TIMER 2 EXPIRED iacSt=8 (Lnk 1)


xx               2010-06-21 13:25:23               2               1073807679               0               4               1               1               0               415               348                mtp       16387 Sent SIOS (Lnk 1) (AlignNP in InitialAlign)
That's how the loaded hex of the clob looks like:
64 09 09 09 32 30 31 30 2D 30 36 2D 32 31 20 31 33 3A 32 35 3A 32 33 09 09 09 32 09 09 09 31 30 37 33 38 30 37 36 37 39 09 09 09 30 09 09 09 34 09 09 09 31 09 09 09 31 09 09 09 30 09 09 09 34 31 35 09 09 09 33 34 38 09 09 09 20 6D 74 70 20 20 20 20 20 20 20 31 36 33 38 37 20 41 4C 49 47 4E 20 54 49 4D 45 52 20 32 20 45 58 50 49 52 45 44 20 69 61 63 53 74 3D 38 20 28 4C 6E 6B 20 31 29 0A 0A 0A 78 78 09 09 09 32 30 31 30 2D 30 36 2D 32 31 20 31 33 3A 32 35 3A 32 33 09 09 09 32 09 09 09 31 30 37 33 38 30 37 36 37 39 09 09 09 30 09 09 09 34 09 09 09 31 09 09 09 31 09 09 09 30 09 09 09 34 31 35 09 09 09 33 34 38 09 09 09 20 6D 74 70 20 20 20 20 20 20 20 31 36 33 38 37 20 53 65 6E 74 20 53 49 4F 53 20 28 4C 6E 6B 20 31 29 20 28 41 6C 69 67 6E 4E 50 20 69 6E 20 49 6E 69 74 69 61 6C 41 6C 69 67 6E 29 0A 0A 0A 
You can see that there is a total of 6 '0 a' or 6 new lines. However, I get the following results:
select regexp_count(outputrow,'[[:cntrl:]]') control,regexp_count(outputrow,'[[:space:]]') space, regexp_count(outputrow,'[\n]') backslash_n, regexp_count(outputrow,'[\x0A]') x0A  
from BULK_BAD_FILE_EXTERNAL b;
   CONTROL      SPACE BACKSLASH_N        X0A
---------- ---------- ----------- ----------
        72        104           9         22
what I am doing wrong?

11g is not yet I'd

select length(outputrow) - length(replace(outputrow,chr(10))) num_of_rows
  from bulk_bad_file_external

Concerning

Etbin

Tags: Database

Similar Questions

  • Question: The Horizontal text tool enter key returns to the same line

    Hello

    This is my first post on this forum, and join me this Community aims to ask for help whenever I'm stuck all by learning Photoshop CS6 extended.

    I have been unable to find solution to this little problem... When you use the horizontal type tool I press ENTER key, the cursor returns to the same line and again write the previously written text. I did not have this problem while doing the same thing before, so I think I messed up a few parameters. Help, please.

    Also let me know how to set up Photoshop to its default settings, I mess up something else.

    Thank you.

    Your leader is off. Set it to automatic.

  • 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 need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    I need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    1. Draw a set of concentric half circles also spaced, stacked so that the outermost is the most remote.
    2. Use the text tool to add text to the outermost path, thus creating a PathType object.
    3. Select all the paths. Type > threaded text > create.
    4. Text tool: click at the end of the text in the object of PathType. Continue typing.

    > If I do that it will not type more.

    A Warp effect is a direct effect. When it is applied to the type of objects, they are still editable text. The chain will deform, however, the text also, not only the paths to which it is attached. Sometimes you want that, sometimes you don't have.

    JET

  • I use creative cloud of Adobe Premiere Pro and it does not allow me to drag. In the line of time, only the audio files of the video MXF files. Plays in the video source, but does not allow me to change on the time line with the. MXF files.

    I use creative cloud of Adobe Premiere Pro and it does not allow me to drag. In the line of time, only the audio files of the video MXF files. Video plays in the source window, but does not to drag me and thenedit on the time line with the. MXF files. audio will slide to the time line, but not the video. Interestingly, not later than end of December 2015 it allowed me to change with .mxf files, but no, it won't. Any help out there?

    Neil, get it fixed, I do not have the video channels set correctly on the left

    side of the line of the time. Learn the new adobe; Thank you

    Monday, February 15, 2016 13:20, R Neil Haugen [email protected]>

  • change the first line of a table to a cell style

    Hello

    I want to change the first line of a table to a cell style.

    Is this possible in javascript?

    Patrick

    Hi patrickbcm,

    Try the threshold.

    app.activeDocument.stories.everyItem().tables.everyItem().rows[0].cells.everyItem().appliedCellStyle = app.activeDocument.cellStyles.item("row1");
    

    THX,

    csm_phil

  • The line of the last line of each table page is going to be missing.

    Hi Experts,
    In OBIEE 11.1.1.6.0, I have a report contains more than one line. "When I click on" PDF "Print", the last line of each table page line will be missing. " Why?
    Are you facing the same case? How soluve this question? Thank you.

    Hey Kobe,

    The question, looks lke a bug. Here's the work around, change the table view, click the properties of content next to the text "Table" (at the top of the columns and measures) in the layout-> position In Border pane to choose custom and select only the bottom edge (horizontal line). Now export to pdf format, you must see the border for the last row on each page.

    Kind regards
    DpKa

  • How to fill out the "to:" line with a variable email address?

    I'm new to coding and am not sure how to ask my question. I have a link in an 'Email' symbol that I would like to have the window open to a 'mailto', but there are several instances of that symbol on the timeline, each using a different email address. If the [symbol]. Email.Click code reads as follows:

    Window.Open ('mailto:'+ sym.getVariable = ("emailWindow"), "_self")

    and the line in the Stage.creationComplete code that is supposed to call the variable code reads:

    sym.getSymbol("Details_David").$("Email").html ("[email protected]" "").setVariable("emailWindow","[email protected]");

    With this code, the browser opens a window of mailto, but the ' to: ' line readings, "indefinite".

    Either in the [symbol]. Email code. Click, I have:

    Window.Open('mailto:"emailWindow"',"_self")

    without the "emailWindow" as the variable name, the "to:" line to the mailto line reads, "emailWindow".

    How to fill out the "to:" line with a variable email address?

    Otherwise, it works better:

    1)

    replace

    sym.getSymbol("Details_David").$("Email").html ("[email protected]").setVariable("emailWindow", "mailto:[email protected]");

    with

    sym.getSymbol("Details_David").$("Email").html ("[email protected]");

  • How to recover the second line of a table

    Hello

    Could someone let me know how to recover the second line of a table without using the coumn the names of columns in the table.

    By default the table EMP or used in the case of scott connection can be used as an example of table.


    Concerning
    select e.* from(
    select e.*,  rownum rn from emp e)e
    where e.rn =2
    

    did you expect that?

  • -Order of the lines of external tables

    Hi all

    I have a request that copies of the user DB files and then system file it opens as external table... The following data flow is to copy the data from this external table and perform actions on this issue.
    My question is that I have to report line number, where an error has occurred and this line number must match the number of physical lines in the file... Can I rely on the fact that if I do something like
    SELECT rownum, t.* FROM ext_table t
    the ROWNUM will correspond to the line number in the file. I'm just a question because it is not documented anywhere.

    I'm under Oracle XE, but we will probably move to 11g (or something never) in the future.

    Thank you
    Adam

    You can add a column in the external table and use the RECNUM parameter to fill. Then use ORDER BY this column for lines in the same order that they are in the source file.

    SY.

  • Ask the CLOB column (with XML content)

    1. how to extract a particular xml tag value for a column with the CLOB data type.

    Example:

    < REQUEST_DETAIL >

    PR < GROUP_TYPE > < / GROUP_TYPE >

    < GroupName > ASSET MANAGEMENT TECHNICAL DATA < / GroupName >

    < BUS_UNIT_ACRN > SCS-FCAT < / BUS_UNIT_ACRN >

    < PROJ_MGR_ID > < / PROJ_MGR_ID >

    < PROJ_MGR_NAME > Roland Roy < / PROJ_MGR_NAME >

    < / REQUEST_DETAIL >

    Select

    XmlType (provable). Extract('/REQUEST_DETAIL/GROUP_TYPE/text()').getStringVal)

    e t

    /

    example above works.

    If I do not know the order of xml tag to ask how can I get the value.

    (/ * * / / * * / REQUEST_DETAIL/GROUP_TYPE / * / *)

    2 using the DBMS_LOB. SUBSTR takes longer to run and it never returns results and session will wait status for access to LOB_INDEX content (at the same time the CLOB column is used by the application).

    Y at - it another option for faster results.

    SELECT DBMS_LOB. SUBSTR (xml_blob, 4, DBMS_LOB.) INSTR (xml_blob, "< name >", 1, 1) + 6) name.

    status,

    CNT to COUNT (*)

    OF LOG_TBL

    WHEN TRUNC (IO_DATE) = TRUNC (SYSDATE)

    GROUP OF DBMS_LOB. SUBSTR (xml_blob, 4, DBMS_LOB.) INSTR (xml_blob, "< name >", 1, 1) + 6),

    status

    Kind regards

    Veera

    Adiitional your reuirement to omit the public areas

    2729533 wrote:

    Your 1 returln sql any domain name (p099 and public - seems to search all nodes in an xml file). I only need 1 domain name (and omit the public areas)

    1. SELECT X.*
    2. T
    3. , xmltable ('(//*[DomainName!="PUBLIC"]/DomainName) [1] ')
    4. PASSAGE xmlparse (document t.XML_BLOB)
    5. THE DOMAIN VARCHAR2 COLUMNS (15) PATH '.'
    6. ) X
    7. where t.no = 317663815
  • How to load the clob data in a table.

    Hello

    I loaded a column clob with a text file which has about more than 1000 lines, now the clob column has all the records as if it were a line... at the end of each record in the clob column, I think the value of this function: Chr (13)... I think it means end of line or new line something like that.. .my question is how can I move these data in a normal table... .i need a code which share this intro to data rows so I can insert them into a table...

    Thanks in advance...

    OAIS

    Sorry, but my code is designed to give you a starting point for how to address your problem, not a complete solution.

  • How can I return to the page newtabs with the panels of favorite site once it is taken over by a rogue site?

    A few days earlier, the page newtabs stopped showing Favorites panels that allowed me to click and go to my most frequently used site. It now displays a rogue site, for I have no use. I ran Malware Bytes (free) and let quarantine everything he found. Once I did, a second problem started when I open a program that I would get an error message saying that lacked some of the Solution Explorer. The program that I opened worked fine, so I considered as a nuisance. I was frustrated that it has not affected the problem of page newtab. I used a backup my Firefox profile since a few days ago, but that has not solved the problem either. Finally, I downloaded the latest version of Firefox (the same version I used) and installed it. Which seemed to cure the problem and I was happy until I rebooted my computer this morning, and the rogue page is back. How can I go back without a daily reinstall of Firefox?

    You managed to pick up the research you'll find browser hijacking.
    http://malwaretips.com/blogs/trovi-removal/

  • Return to the main VI with a HOME MENU button example

    Hello

    I am in the process of realization of a GUI. Under my in-VI, I want to put a HOME button to return to the main menu if user wishes.

    I went on while loops, saying as long as the button is not true, I continue. Then I tested with an event structure but it does nothing no folds.

    Do you have the explanations, information or examples?

    Thanks in advance,

    Hello

    Thank you for posting on the forum OR.

    Here is an example that could you help accessory.

    You will find attached 3 screws

    United Nations as the home page and so the vi open and a launch

    The other two are under 2 VI containing the 'Home' button pour main to return to the menu.

    All use the structure event.

    Kind regards

  • Anchor to return to the same line on the previous page

    Hello

    I saw 4 or 5 posts on this subject, but none of them does not seem to work for me.

    Here's what I would do:

    I use an interactive report that contains an overview of the tasks and the information about these tasks. In the report, there is a column "Edit task" where users can click to change several fields for the task.

    When the user clicks on the 'Edit' task - link, another page (of type 'Dynamic Form') is opened where the user can make adjustments and then save them.

    When the user clicks 'Save' (or 'Cancel', by the way) on the edit page, I want to redirect them to the previous page with the overview of all the tasks, but I want the page to move in roughly the same place as when the line where users you click on 'Special Edition' is located. So if I change a task that is in the middle of the report, I want to return to the middle of the report when the user has finished its adjustments.

    I have seen that it is possible using the anchors, but have not found a position that has worked for me.

    I think that there are three elements to make something with to operate:

    -The "Edit job" - link in relation to the overview of all tasks

    -The button 'Cancel' or 'Save' on the edit page

    -The page with the overview of the tasks that he knows which row to access

    Our end-users really want this feature, so any help would be appreciated.

    I run on APEX 4.2.

    Thanks in advance for your answers.

    Kind regards

    NDG

    Was the solution after several hours and it is actually not as difficult as it seemed during these hours.

    So for those looking for the way to do it, here it is:

    Make an anchor point in the query of your report which shows the overview of the tasks (or whatever the report will show to you, I use tasks for example) like this:

    Select..., task_code, '', 'Special Edition' task_id of task

    To the page with the overview of the tasks, change the Page attributes-online display attributes-online update of the slider to "don't focus of cursor.

    View the type of the column with the anchor: Standard report column

    It will not work if the column type is 'hidden' or if the column is not in the "selected columns" in your report ("Actions"-online "Select columns").

    'Special edition' is the link that I created to go to the edit form, this link goes task_code as an attribute to identify the unique tasks (do not know if the task_id column will work, I do not use it as ID to go to the edit page, I use the task_code.) It probably won't work with this task_id-column, but if not, create an another task_id column without the anchor and use that one to pass it as an attribute).

    To the page containing your form for editing tasks create the buttons/send-Cancel:

    -"Action when the user clicks on the button ' value 'redirect to the URL."

    -the "target URL" value: f? p = & APP_ID.: 11: & SESSION. : & DEBUG. #& P16_TASK_ID. (include the '. ' at the end)

    Where 11 there is the page you want to link to, and #& P16_TASK_ID. is the item that you will use to access the respective line in your report.

    There might be other ways to do it, but it works for me on APEX 4.2.

    Good luck.

Maybe you are looking for