Searching for BLOB xml file content

Hi Gurus,
I am having a table with a blob type column which is holding xml files. Is there a way to select records of the table based on specific words contained in the xml?
Many Thanks,
Napster

rp0428 wrote:
But if OP really wants to search the 'content' of the xml elements I don't see that working for them.
Sure, he can.  All you have to do is add auto_section_group to the index parameters, then you can search within any of the specific tags, as demonstrated below.
SCOTT@orcl12c> CREATE TABLE a_table
  2    (id          NUMBER,
  3      blob_type_column  BLOB)
  4  /
Table created.
SCOTT@orcl12c> INSERT INTO a_table VALUES (1,
  2  UTL_RAW.CAST_TO_RAW (
  3  '<a><b>something different</b><c>whatever you are looking for</c></a>'))
  4  /
1 row created.
SCOTT@orcl12c> INSERT INTO a_table VALUES (2,
  2  UTL_RAW.CAST_TO_RAW (
  3  '<a><b>something else</b><c>something different</c></a>'))
  4  /
1 row created.
SCOTT@orcl12c> CREATE INDEX test_index ON a_table (blob_type_column)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  PARAMETERS ('SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
  4  /
Index created.
SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
  2  FROM   a_table
  3  WHERE  CONTAINS
  4            (blob_type_column,
  5             '(whatever AND looking) WITHIN c') > 0
  6  /
        ID
UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
         1
<a><b>something different</b><c>whatever you are looking for</c></a>
1 row selected.
SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
  2  FROM   a_table
  3  WHERE  CONTAINS
  4            (blob_type_column,
  5             '(something different) WITHIN b') > 0
  6  /
        ID
UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
         1
<a><b>something different</b><c>whatever you are looking for</c></a>
1 row selected.
SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
  2  FROM   a_table
  3  WHERE  CONTAINS
  4            (blob_type_column,
  5             '(something different) WITHIN c') > 0
  6  /
        ID
UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
         2
<a><b>something else</b><c>something different</c></a>
1 row selected.

Similar Messages

  • How can I transfer a XML file content to a MS SQL database by stored procedure using LabWindows/CVI SQL Toolkit?

    Hi,
    I have a problem to transfer a XML file content to a MS SQL database by a given/fixed stored procedure. I'm able to transfer the content of the file by using following method ...
    hstmt = DBPrepareSQL (hdbc, EXEC usp_InsertReport '<Report> ..... </Report>');
    resCode = DBExecutePreparedSQL (hstmt);
    resCode = DBClosePreparedSQL (hstmt);
    ... but in this case I'm not able to fetch the return value of the stored procedure! 
    I have tried to follow the example of the stored procedure in the help documentation (DBPrepareSQL) but I miss a datatype for xml?!?
    Any idea how to solve my problem?
    KR Cake  
    Solved!
    Go to Solution.

    After some additional trials I found a solution by calling the stored procedure in this way
    DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBPrepareSQL (hdbc, "usp_InsertReport");
    DBCreateParamInt (hstmt, "", DB_PARAM_RETURN_VALUE, -1);
    DBCreateParamChar (hstmt, "XMLCONTENT", DB_PARAM_INPUT, sz_Buffer, (int) strlen(sz_Buffer) + 1 );
    DBExecutePreparedSQL (hstmt);
    DBClosePreparedSQL (hstmt);
    DBGetParamInt (hstmt, 1, &s32_TestId);
    where sz_Buffer is my xml file content and s32_TestID the return value of the stored procdure (usp_InsertReport(@XMLCONTENT XML))
    Now I face the problem, that DBCreateParamChar limits the buffer size to 8000 Bytes.
    Any idea to by-pass this shortage??

  • Searching for a good file manager

    I'm searching for a good file manager. Konqueror 3.5 is quite good, dolphin 4.1 and konqueror 4.1 are not. Since konqueror 3.5 is going to die due to lack of support in the future, I kind of need to find a new good file manager...
    Do there exist file managers with the following features?
    Many of these features are things I thought were quite logical to be in a file manager, but seem to be missing in most "modern" ones...
    -independent of any desktop (gnome or KDE), just a standalone program
    -preferably not being both a web browser and file manager in once, at least not in an annoying way. Konqueror 3.5 shows that being that combination is possible without being annoying.
    -ability to have a tree view of the folders on one side and list view showing the files and subfolders of the folder currently selected in the tree on the other side
    -detailed list view showing at least filename, type, date and size, and the ability to sort according to any of these properties
    -a non-detailed view showing image contents would also be nice, to browse folders of photos or other images
    -ability to open files in certain programs if you doubleclick the file, NOT open it by singleclicking, singleclicking may only select it
    -ability to select multiple files by dragging box around files or using keys like "ctrl" and "shift"
    -ability to do "open terminal here" or type terminal commands in the current open directory
    -must have ability to drag files from one folder to another, from list view to tree view and vica versa, to move or copy them
    -and must have ability to use "ctrl+c" and "ctrl+v" to copy files and foldes from here to there
    -multiple tabs is a huge plus
    -favorites (to local folder paths) is also a huge plus
    -preview of files when hovering the mouse over them is nice
    -must have ability to zip and unzip (or other compression formats) folders by just right clicking them and choosing a zip/unzip command there
    -in addition to that, must also have ability to browse through a zip file as you would through a normal directory, and drag files from the insides of the zip file to the tree view to automatically unzip those files there, and of course "ctrl+c"/"ctrl+v" should also work to copy a file from the inside of the zip file, to some other folder on your disk
    -no horizontal autoscrolling in the tree view, that is an invention straight from the abyss...

    I know exactly how you feel about KDE 4 vs. 3 -- Konqueror was the best part of KDE for me (pretty much the only part I ever used, actually; my window manager is a slightly modified version of WMII and I generally loathe "desktop environments"). KDE 4 ruined it, completely and utterly.
    I submitted about 20 different bug reports about Konqeuror 4, mostly features that they'd deleted or mangled; some of them are starting to be addressed now. I don't think they'll ever fix the speed issues though, because those are dependent on the underlying KDE 4 libraries as far as I can tell -- it's as if KDE 4 were purposely and deliberately designed to be slower than KDE 3. Even if they fix all of its deficiencies, that'll probably keep me from using it...
    Right now there's KDEmod, which will hopefully maintain its KDE 3 branch for a while longer. It's starting to show some problems, though; I haven't been able to get kdemod konqueror 3 to work fully out of the box (the settings pages are all blank). On my main machine, I somehow managed to hack together some of the KDEmod3 packages so that I have a functional konqueror 3 running alongside the Arch repository's version of KDE4. I'm afraid to pacman -Syu now, though, because it will probably break horribly :P
    I don't remember exactly how I got konqueror 3 going like that, as I did it in my initial fit of rage after I did the pacman -Syu that got me KDE4 (a decision I have regretted ever since), but it was something like this:
    1. move /opt to /opt.kde4
    2. make a new /opt
    3. download several KDE 3 packages from the KDEmod3 repositories manually
    4. extract those packages into the new /opt with tar -xzf (NOT pacman!)
    5. try /opt/kde/bin/konqueror
    6. read reams of error messages about missing libraries, segfaults, etc.
    7. try to supply the missing libraries by downloading other kdemod3 packages and manually extracting them
    8. goto 5
    Then, when everything worked (sort of), I renamed some stuff so that 'konqueror' is konqueror 4 (I think having it konqueror 3 broke something else, but I don't remember what), and konqueror 3 is called 'k3nqueror'.
    If KDEmod3 ever goes away and there's no other good replacement file manager by then, I'll probably take the source code of KDE3 and try to make a standalone version of konqueror out of it. (Which will probably be quite a project because of how interdependent all the KDE components are.)
    Some features I "need" in a file manager, besides the ones you mentioned:
    - Konqueror's tree view (where you can expand folder branches in the file list)
    - Infinite view splitting -- I frequently have my konqueror windows split into 4, sometimes as many as 6 or 7 view panes. Very useful for sorting out files.
    - Selection rectangles are sensitive only over files -- I find full-row-select really annoying, because there are no guaranteed "blank" areas that you can click on to clear a selection. I also use this behaviour to grab long-named files that are interspersed with short ones, because they hilight first when the rectangle touches them (you wouldn't think this very useful, but surprisingly often you do want to do something to all the long-named files...)
    - Right-clicking on a folder and clicking "Paste" pastes into that folder, not the current one -- you'd be amazed at how many file managers get this wrong. I shouldn't have to cd into a folder just to paste some files there.

  • Streaming XML file content to a HTTPS servlet..

    Hi,
    I want to stream the contents of a XML file , which I have generated through XDK for PL/SQL, to a HTTPS address for a servlet.
    This HTTPS connections uses certifcates for user authentication. I have the certifcate on my local machine. Is there anyway of doing this through PL/SQL? Are there any packages available in Oracle 8.1.6 for this purpose? Can somebody tell me if there is a better way of doing this?
    Any help will be greatly appreciated.
    Thanks.

    After some additional trials I found a solution by calling the stored procedure in this way
    DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBPrepareSQL (hdbc, "usp_InsertReport");
    DBCreateParamInt (hstmt, "", DB_PARAM_RETURN_VALUE, -1);
    DBCreateParamChar (hstmt, "XMLCONTENT", DB_PARAM_INPUT, sz_Buffer, (int) strlen(sz_Buffer) + 1 );
    DBExecutePreparedSQL (hstmt);
    DBClosePreparedSQL (hstmt);
    DBGetParamInt (hstmt, 1, &s32_TestId);
    where sz_Buffer is my xml file content and s32_TestID the return value of the stored procdure (usp_InsertReport(@XMLCONTENT XML))
    Now I face the problem, that DBCreateParamChar limits the buffer size to 8000 Bytes.
    Any idea to by-pass this shortage??

  • How to insert External XML file content into XMLTYPE through Pro*c

    Could any one sugest me how to insert a external XML file content into Db
    into XMLTYPE datatype through Pro*c program.
    Thanks for any help...... who has done this
    Ghanta Tagore

    Hi
    After some good fight of 3 days, I have done it through Pro*c
    This is the way to handle this
    Buffer-->Temporary Clob-->XMLTYPE(using CreateXml)
    Pasting my piece o code to do this
    ===============
    OCIClobLocator *license_txt;
    varchar h_ttt[1024] = {'\0'};
    ub4 amt;
    int i;
    EXEC SQL ALLOCATE :license_txt;
    EXEC SQL LOB CREATE TEMPORARY :license_txt ;
    GetName(name); /*Gets Name to insert into name column in License Table*/
    for(i=0; i<4;i++)
    GetXMLL((char *)h_ttt.arr); /*Gets a string value of XML into this example*/
    /*<Tagore>Is From TCS Delhi</Tagore>*/
    /*This can be changed to get buffer from FILE */
    h_ttt.len = strlen((char *)h_ttt.arr);
    amt = sizeof(char) * h_ttt.len ;
    EXEC SQL LOB WRITE APPEND :amt FROM :h_ttt INTO :license_txt;
    EXEC SQL
    INSERT INTO license_table VALUES (:sss, :name, sys.xmltype.createXML(:license_txt))
    ================
    Thanks For ur Help
    Tagore Ghanta

  • XML publisher report not generating output for huge XML files

    Changed Depreciation Projections Report output type to XML.
    Defined a Data Definition and a new Data Template (RTF) for this report.
    Ran the Depreciation Projection Report to generate the XML output.
    Ran the XML Report Publisher report to generate teh PDF/Excel output of the above report.
    Output generated for smaller XML files. When XML size is big, the program is running for hours without generating the output.
    Teh RTF template is basically a matrix report in which the number of columns in the report is based on the number of periods the report is run for.
    The same is not working in the Desktop version also. The system is hanging when i try to view the preview pdf.
    The XML file size is approximately 33 MB.
    Please let me know if there is any way we can increase the memory size to see the output.
    Thanks,
    Ram.

    for publisher use Category: E-Business Suite

  • Function module for transfering a file contents into another?

    Hi all,
       Is there a Function module for transfering a file contents into another?That is the whole content from a file to other??
    Regards,
    Shashank.

    Hi,
    I think there is no such FM. You need to read the data in internal table and then write it in another file.
    Regards,
    Atish

  • Unable to establish a for loop in custom rtf template for seeded xml file

    Hi Experts ,
    I am Unable to establish a for loop in custom rtf template for seeded xml file. i am using <?:for-each:G_BSALINE?> FORM FIELD .....<?:FOR-EACH?END> .AM i missing something?
    Please help.
    Thanks

    Hi,
    Need more information about your XML data structure; however based on the code you provided, the synax does not look right; you have some colon sign where it is not needed etc... You could use the following (although not quite sure if you want to use Form Filed to group by or just display), but look at the example provided below.
    <?for-each-group:G_BSALINE?> FORM FIELD .....<?end for-each-group?>
    Example code:
    <?for-each-group:G_INVOICE_NUM;./INV_TYPE?>
    xxxxxxxxxx
    <?end for-each-group?>
    Thanks!

  • How Can I stop Elements 7 from searching for a memory file?

    Recently, every time I turn on Elements 7 it starts searching for a missing file each time it encounters a photo with a "?" in the corner. I must have pressed a key somewhere to start this function but now I can't get it to stop. I can only continue to another photo if I press cancel while it is searching but I have to do this for each "?" marked picture. Is there any way of cancelling this feature? Thanks in anticipation.

    Two solutions:
    1. Uncheck the option Edit > Preferences > Files > Automatically Search For And Reconnect Missing Files.
    2. Either reconnect the missing files or delete them from the catalog, using the File > Reconnect > All Missing command.  See this FAQ for tips on how to use the command:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Quickly_reconnecting_large
    Leaving missing files in your catalog doesn't have any benefit.

  • When I open iMovie, the app searches for missing iPhoto files.  These are files I deleted.  I have to close about 30 dialog boxes before I can start using iMovie.  How do I make this stop?

    When I open iMovie (09), the app searches for missing iPhoto files.  These are files I deleted.  I have to close about 30 dialog boxes before I can start using iMovie.  How do I make this stop?

    So it seems the issue is when iMovie is wanting to creat thumbnails, if I ask it to ignore then it's fine but if not it hangs up searching for the video file.

  • Working on a script to search for and move files - need Guru help!

    Hi, I'm trying to help my dad with a task and my outdated Applescript knowledge isn't helping me much.
    Here's what I need to do in a nutshell:
    FolderA contains a bunch of JPG files.
    FolderB is the root of a hierarchy of folders containing DNG files.
    Each file of FolderA has a mating file (same name but with .DNG) somewhere in the hierarchy of FolderB.
    The goal is to move each JPG file from Folder A to the folder containing it's mate.
    So, the basic flow is:
    1. Get list of files in folderA
    2. Looping through list, strip out file name (fileA) and find the DNG file somewhere inside FolderB
    3. Get the path of the folder containing the matching DNG file
    4. Copy/move FileA to the folder.
    5. Loop back to #2
    OK, so here's where I am:
    tell application "Finder"
    set JPEGfolder to "Macintosh HD:DadTest1:DadA"
    set DNGfolder to "Macintosh HD:DadTest1:DadB"
    set a_list to every file in Afolder
    repeat with i from 1 to number of items in a_list
    -- Everything happens within this loop
    set a_file to (item i of a_list)
    set fileInfo to info for a_file
    set theName to displayed name of fileInfo as string
    -- now theName contains the actual file name minus the extension
    At this point I don't know how to search for the mating file using Applescript. If I was in UNIX I could do a "find . -name filename" and parse out the path, but I don't know how this works in Applescript.
    I think I can figure out how to move the file once I have the path, but the search routine has me stumped for now.
    Any thoughts?
    Thanks!

    In my opinion your best bet is to take a 180° turn and simplify things significantly.
    Your current approach involves multiple file searches - for each file in the JPEG folder, search all the DNG folders looking for a match. That's an large number of searches, and a large number of something that AppleScript isn't great at.
    Instead you'd be far better off walking once through the DNG folders. For each DNG file look for a matching JPG file in the one folder that contains JPEGs. This would be exponentially faster - one walk through the filesystem vs. one walk through the filesystem for every JPEG.
    This should give you an idea of what I'm talking about (untested):
    global JPEGfolder
    on run
      set JPEGfolder to alias "Macintosh HD:DadTest1:DadA"
      set DNGfolder to alias "Macintosh HD:DadTest1:DadB"
      processAFolder(DNGfolder)
    end run
    on processAFolder(theFolder)
      tell application "Finder"
        repeat with eachItem in folder theFolder
          if class of eachItem is file and name extension of eachItem is "dng" then
            set basename to characters 1 through -5 of (get name of eachItem)
            try
              move file (basename & ".jpg") of folder JPEGfolder to folder theFolder
            end try
          else if class of eachItem is folder then
            my processAFolder(eachItem)
          end if
        end repeat
      end tell
    end processAFolder
    The idea here is that you start off in the top folder and iterate through each item. If the item is a file and it's name extension is DNG then try to move a corresponding file from the JPEG folder to the current folder. This is wrapped in a try block so the script doesn't fail if there is no corresponding JPG.
    If the current item is a folder then the script descends into that folder by calling itself.

  • Source Reformat menu item disabled for some XML files, but not all

    For some reason, the 'Reformat' option isn't available for some of my XML files (in Source menu it's disabled, in the right-click pop up menu it's not even there). For example in my META-INF folder it's enabled for .wsdl files but not .xml files. In the same project, it's enabled for all .xml files in the WEB-INF folder.
    Any idea what's going on?
    TIA

    Thanks to everyone for their response. But - it is NOT a copyright issue , it is NOT a DRM issue, it is not a Faber College double secret probation encoding issue.
    This is a simple .wmv file, that I have copied, burned, created a disk image, made a copy of and sent to the UK, Germany, Ireland and even New Jersey. It has been played on a MacBook Pro, a MacBook, a Dell whatever, a Sony stand alone DVD player, an LG DVD player. At least three nieces or nephews, and at least 2 canines have put it through ISO 9XXX rigors.
    The problem is that Apple Quick Time 7 Pro with Flip4Mac Pro "can't handle it"
    It opens fine, it plays fine --- but when I try to "output" it via the FILE menu - all of the options
    Share ...
    Export ...
    Export to Web ...
    are greyed out.
    I know nothing abour codecs and wrappers but I tihnk that this is the problem.
    What should I know about the file?
    Ffor example, years ago, all you needed to know about a Mac file was the "Creator" and the "Type" - both were 4 character codes. something like ADOB for Adobe and PMK2 for Pagemaker 2.0.
    Any help identifying the file and what I can use to get it onto my iPhone will be appreciated.
    Thank you.

  • Correct adapter to use for an XML file

    Hi,
    My current scenario for our business partner is that we are sending them an 850 and 856 then an XML file.
    For 850 and 856, we are using AS2 adapter. For the XML file, could I still use the same adapter?  Or I need to use File adapter instead?
    My scenario for the xml file is that an IDoc is converted to an XML file.  This XML file is then sent to the business partner.
    Please advise.
    Thanks very much.
    Regards,
    Lex

    Hi VJ,
    I just found out that I could also use the AS2 adapter to send the xml file to the trading partner.
    Thanks for your kind response.
    Regards,
    Lex

  • Can we do a Secure FTP for an XML file from ABAP when firewall is enabled?

    Hi all,
    I have a requirement to send an XML file to an External FTP Server which is out of our corporate network and our firewall is enabled.
    I have to send an XML file with Purchase Order details. I completed that with the help of this blog https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2657. [original link is broken] [original link is broken] [original link is broken]
    Now I need to FTP the XML file that is generated. How should I be doing this? Can some of help me with this?
    I need to do a Secure FTP to the external non SAP server which is out of our corporate network and our firewall is enabled. Can some one tell me if SFTP is possible in ABAP.
    This is not a web service. I am working on dropping an XML file in an external FTP serveru2026 I have searched the forums but still in a confusion if weather Secure FTP is possible in ABAP  or not when our company firewall is enabledu2026
    If some one encountered this situation earlier please help,,,..any help will be highly appreciated.
    Regards,
    Jessica Sam

    Thanks a lot for your valuable suggestions Richu2026
    I agree with you Rich that web services would be a better option. But I need to send this file to an external third party and they dont have web services.
    They are telling us that either we can send them an XML file or a CSV file in the format that they want. We decided to go with XML file format.
    I am done with formatting the Purchase Order details in the format that they want. Now the challenge is that I need to send this FTP file to them and it should be a Secure FTP when our fire wall is enabled,
    When you say
    1) Run an ABAP program to generate the XML file and put it on the local PC
    2) Log into the FTP site via some FTP client, could simply be windows as well.
    3) Manually cut/paste the file from the PC to the FTP site.
    For Step 1 running ABAP Program can I schedule a batch job?
    For Step 2 and Step 3 can I automate it in any other way..if not in ABAP?
    Can I advice my company to follow any alternate method in which they can automate this step 2 and step 3u2026if not in ABAP can it be possible in any other way as the third party does not have web services I now have no other alternative.
    Please Helpu2026
    Regards,
    Jessica Sam

  • EC SALES LIST - Belgique: XML file: Content not accepted in prolog

    Hy tou you all,
    We've implemented all Ec sales list note oss for Belgium but at the upload in the delcaration vat system the xml file is not accepted : "Content not accepte in prolog"; Did this message encured to you ?
    Thanks,
    TF

    HI,
    I hope you are asking about below legal changes
    http://www.minfin.fgov.be/portail2/fr/e-services/intervat/calendrier.html
    and SAP DS colleagues are working on same and they are planning to release the note
    within soon.
    For same information will check the service market place.
    Thank you.
    Regards
    Madhu M

Maybe you are looking for

  • HT1766 my iphone 4s is in recovery mode after trying to un - jailbreak my phone im at school is there any way to get it to normal without losing data

    so i tried to un jailbreak my iphone by deleting cydia and everything else so my phone froze and the apple logo appeared for about 30 mins i tried putting it in  recovery mode which succeded but is there anyway to get it back to normal with all my da

  • ABAP-DICTIONARY PROBLEM

    I have created one Z-Table with following fields Fields                                          Data Elements MANDT                                       MANDT WERKS                                      WERKS_D MATNR                                 

  • JDBC comm.channel issue with MS SQL select statement

    Hello, We are using JDBC adapter to connect to an MS SQL database. This is the comm.channel config. com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://<DNSname>:1433;databaseName=PSMI Activation of channel is successful. But when starting

  • Problem of buffer overflow in Iplanet 6.0sp1

    Hi, I am getting these following error messages in the logs [30/Mar/2004:12:55:06] warning (19529): flex log buffer overflow- greater than 4096 characters Also I am getting a error in logs like filename.ext is temporarly not available I am not able t

  • Serial number needed to try flex automation

    I'm running the Flex Automation Installer to install the plugins needed to evaluate use of QuickTest Professional for automated Flex 2 testing. The Installer requires entry of a Flex Data Services serial number. (The applications I want to test do no