How to retrieve the content of the indexed column

In Oracle UltraSearch, how to retrieve the content of the file in the indexed column cache_file_path.
we try the flowing sql
SELECT cache_file_path FROM mytable
WHERE contains (mytable.cache_file_path, 'viet', 1) > 0
but we only have the cache_file_path column, not the content of the file were indexed.

I think this is what you're looking for:
DECLARE @table TABLE (amountPaid FLOAT, datePaid DATE, memberID INT)
INSERT INTO @table (amountPaid, datePaid, memberID) VALUES
(10.00, '2014-01-01',1),(10.00, '2014-02-01',2),(10.00, '2014-03-01',3),(10.00, '2014-04-01',4),(10.00, '2014-05-01',5),(10.00, '2014-06-01',6),(10.00, '2014-07-01',7),(10.00, '2014-08-01',8),(10.00, '2014-01-01',9),(10.00, '2014-10-01',10)
SELECT *
FROM (
SELECT *, SUM(amountPaid) OVER (ORDER BY datePaid ROWS UNBOUNDED PRECEDING) AS runningTotal, ((SELECT SUM(amountPaid) FROM @table) / 100) * 50 AS percentileAmount
FROM @table
) x
WHERE percentileAmount >= runningTotal
It depends upon SQL Server 2012's windowed functions. It would be possible to also do this with a rCTE in earlier versions.
Giving your code an eyball, I think I see what it's doing. Unfortunately, I'm stuck using 2008 R2, so I don't have access to UNBOUNDED or PRECEDING. I'll have to research rCTE - I know what a CTE is, but not the 'r' prefix.

Similar Messages

  • Retrieve the content of the file in the indexed column

    In Oracle UltraSearch, how to retrieve the content of the file in the indexed colun cache_file_path.
    we try the flowing sql
    SELECT cache_file_path FROM mytable
    WHERE contains (mytable.cache_file_path, 'viet', 1) > 0
    but we only have the cache_file_path column, not the content of the file were indexed.

    Please post on the UltraSearch forum.

  • How to display the contents of the database values which are retrived.

    how to display the contents of the database values which are retrived in servlets and i am able to display the contents in the servlets and if forward to jsp using requestdespatcher,the values are to be shown in jsp one below the other.please suggest me in these........the servlet code is as shown
    while(rs.next()){
                        buffer.append(rs.getString(1));
                        buffer.append(rs.getString(2));
                        buffer.append(rs.getString(3));
                        buffer.append(rs.getString(4));
                        buffer.append(rs.getString(5));
                        buffer.append(rs.getString(6));
                        buffer.append(rs.getString(7));
                        buffer.append(rs.getString(8));
                        buffer.append(rs.getString(9));
                        buffer.append(rs.getString(10));
                        request.setAttribute("result1",buffer);
                        RequestDispatcher rq=request.getRequestDispatcher("/results.jsp");
                        rq.forward(request,response);
    in jsp iam using the getAttribute to retrieve the values as shown
    <% StringBuffer sb=(StringBuffer)request.getAttribute("result1"); %>
    <%= sb %>
    but getting the results in the stretch,i need to display the result one below the other.

    if you load it all into the buffer that is going to be very difficult. I would suggest loading it into some sort of collection. I like using an ArrayList.
    Then pass the arraylist.
    you will then on the jsp iterate through the arrayList using what every you want.. el, logic tags, scriplets.
    so something like
    ArrayList arrayList = new ArrayList();
    while(rs.next()){
    arrayList.append(rs.getString(1));
    //or possibly an arrayList of String arrays
    //maybe using nested for loops.  Inner for loop adds result to string[] then //outer adds string[] to arrayList.
    //can be done any number of ways based on your expected result set.

  • Retrieving the contents of the address book on mobile phone

    Please can somebody help me on how I can programmatically (through codes) retrieve the content of the address book (i.e name and numbers) from mobile phones? Thanks for your anticipated response.

    Export the existing iMac contacts, export the existing MBP contacts, import the MBP contacts on the iMac, import the iMac contacts on the iMac.

  • I have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code?

    i have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code? thank you!

    i inherited the website. It’s for a non-profit and is not very
    sophisticated, and neither am I in webdesign. It currently has multiple
    pages that are identical except for that body section, so whenever i change
    the navigation (in the sidebar) I have to update every html page.  I want
    to have one basic page, and just call in the different body content based
    on the link the user selects from the nav bar. How can i do that using a
    script? i am using Dreamweaver.
    ~ in love and light ~
    Jeannie
    On Sat, Feb 7, 2015 at 4:07 AM, Ben Pleysier <[email protected]>

  • I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  The title is there but no contents.  It won't even play the playlist.  How do I get the contents of the book?

    I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  It won't even play the book, there are no contents.  How do I get the contents of the book?

    I'm guessing this is a problem unique to me as there have been no replies at all...  Thanks a bunch folks

  • Hi, I have a new cell phone, I wanted to give my iphone to my father, instead of deleting the content on the iphone I have deleted the entire iphone. It starts up no more. iTunes will not recognize the iphone. How do I get my old data back onto the phone?

    Hi, I have a new cell phone, I wanted to give my iphone to my father, instead of deleting the content on the iphone I have deleted the entire iphone. It starts up no more. iTunes will not recognize the iphone. How do I get my old data back onto the phone?

    Place the device in DFU mode (google it) and restore as new.

  • How to import and make the content of the original PDF document editable and preserves the pdf appearance and retains existing fields and formatting in LiveCycle

    Can someone tell me how I can see my content (artwork and text) after I import  it into LiveCycle Designer ES4?  I like to import and make the content of the original PDF document editable; preserves the pdf appearance and retains existing fields and formatting, then allow me to do the modifications and save it back into the original PDF document with changes. I have tried everything but still cannot see my content(artwork and Text) of my original PDF after importing it into LiveCycle. All I see are is a blank page with the formatting and layout of where my artwork and text should be. I like to see everything if possible so after I make my change I will know how it will look when I save it back into the PDF and open it in Acrobat Reader.

    Can someone tell me how I can see my content (artwork and text) after I import  it into LiveCycle Designer ES4?  I like to import and make the content of the original PDF document editable; preserves the pdf appearance and retains existing fields and formatting, then allow me to do the modifications and save it back into the original PDF document with changes. I have tried everything but still cannot see my content(artwork and Text) of my original PDF after importing it into LiveCycle. All I see are is a blank page with the formatting and layout of where my artwork and text should be. I like to see everything if possible so after I make my change I will know how it will look when I save it back into the PDF and open it in Acrobat Reader.

  • How To Print the contents of a BLOB Column on a report?(Word Document)

    Requirement: The word document will be inserted in a BLOB Column and the data in the word document has to be shown on the reports or the user should be able to see the word document (atleast he should be able to view the contents)?
    The data is getting loaded in the database but not sure how to proceed further.
    Any inputs on how to proceed will be appreciated.
    Thanks.

    in JComponent there is a method called print(Graphics g)
    you can use that with a Printable class
    read bout the java.print package in the java doc

  • How to create a jar having the contents of the jar in a byte array?

    Hi,
    I have a server and client application. My server returns the contents of the jar in the form of byte array to the client on a particluar method call. Now at the client end, i want to reconstruct the jar to be used. How do I do this?
    The server uses the JarInputStream to read the contents of the jar to be returned. I have tried using the JarOutputStream, but looks like this works fine if we have spearate class files to be added to the jar. Now that I have the contents of the jar itself, how do i recreate the jar?
    Can anyone please help me with this?
    Thanks
    Rajani

    Have you ever gotten the raw byte copy to work? If so, how?
    I download a jar via InputStream and save into a jar file via fileoutputstream. It always gets corrupted in the process. The new Jar file has the exact same number of bytes, but doesn't get past the Manifest on a -tvf. In fact, Winzip can open it fine, but can't extract. So close...yet so far.
    Here is a snapshot of my code:
    BufferedInputStream data1=new BufferedInputStream(con.getInputStream());
    DataInputStream data=new DataInputStream(data1);
    StringBuffer buf=new StringBuffer();
    try{
    while((theChar=data.read()) != -1)
    { buf.append((char)theChar); }
    } catch (Exception z){ logger.info("UpdateThread.read Done Reading jar file");}
    data.close();
    File newFile = new File("C:/MyJar.jar");
    FileOutputStream outstream2 = new FileOutputStream(newFile);
    DataOutputStream outstream1 = new DataOutputStream(outstream2);
    BufferedOutputStream outstream = new BufferedOutputStream(outstream1);
    byte [] bytes = buf.toString().getBytes();
    logger.info("Bytes of new Jar file = " + bytes.length);
    int i;
    for(i=0;i<bytes.length;i++){
    outstream.write(bytes);
    outstream1.close();
    outstream.close();
    Any ideas where I'm going wrong?

  • How to read the contents of the Uploaded file ?

    hi @,
    I have used the File upload and Download UI elements as per the tutorial available. Now my requirement is to read the contents of the file and transfer it to the Backend system.
    How can I achieve the desired fucntionality.
    Thanks in advance,
    Regards,
    Amit

    try this code to store image file in back end system.
    IWDResource res=wdContext.currentMyDataElement().getPictureres();
              InputStream in=res.read(false);
              ByteArrayOutputStream bout=new ByteArrayOutputStream();
              int length;
              byte[] part=new byte[10*1024];
              while((length=in.read(part))!=-1)
              bout.write(part,0,length);
              in.close();
    pstmt.setBytes(8,bout.toByteArray());
    If it is other than image file like word or text then try this in action
    IWDResource resource = wdContext.currentResElement().getResorce(); // your existing handle to the upload resource type
                try {
                   InputStream stream = resource.read(true);
                   byte b[]= new byte[1000];
                   stream.read(b);
                   String str = new String(b);
                   int i=str.length();
                   wdContext.currentContextElement().setOut(str);
                   wdContext.currentContextElement().setSize(i);
                   wdContext.currentResElement().setResourceurl(
                        wdContext.currentResElement().getResorce().getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()));
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    The in back end field where u store the file should be byte array.
    Regards,
    H.V.Swathi

  • How to display the content of a BLOB column in a ADF/BC pages ?

    How to display the content of a BLOB column in a ADF/BC pages ?
    There is some image in database table blog column. And we want to display image on the screeen.
    There is some example about upload and dowload blog columns.
    (steve not yet document example page etc...)
    But We want to display blog picture in a image component...
    is there any basic way to do it ?
    Thanks a lot...

    Ali,
    You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
    John
    package oracle.fodemo.storefront.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ViewObjectImpl;
    public class ImageServlet
      extends HttpServlet
      private static final String CONTENT_TYPE =
        "image/jpg; charset=windows-1252";
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType(CONTENT_TYPE);
        response.setContentType(CONTENT_TYPE);
        String detailProductId = request.getParameter("detail");
        String thumbnailProductId = request.getParameter("thumbnail");
        boolean thumbnail = true;
        String productId = null;
        OutputStream os = response.getOutputStream();
        String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
        String config = "StoreServiceAMLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObjectImpl vo =
          (ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
        if (detailProductId != null)
          productId = detailProductId;
          thumbnail = false;
        else
          productId = thumbnailProductId;
        vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
        vo.defineNamedWhereClauseParam("paramProductId", null, null);
        vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
        vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
        vo.setNamedWhereClauseParam("paramProductId", productId);
        vo.executeQuery();
        Row product = vo.first();
        BlobDomain image = (BlobDomain) product.getAttribute("Image");
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[10 * 1024];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
        os.close();
        vo.setWhereClause(null);
        vo.removeNamedWhereClauseParam("paramProductId");
        vo.removeNamedWhereClauseParam("paramThumbnail");
        Configuration.releaseRootApplicationModule(am, false);
    }

  • Hi,I have recently replaced by hard drive with a ssd. My old hard drive has all my iTunes stuff.i would like to install only iTunes programme on the ssd with all the content on the old hard drive. How do I do it?

    Hi,I have recently replaced by hard drive with a ssd. My old hard drive has all my iTunes stuff.i would like to install only iTunes programme on the ssd with all the content on the old hard drive. How do I do it?

    Install iTunes.
    Once install, hold SHIFT and launch iTunes.
    When prompted, point iTunes to the correct location for the iTunesLibrary.itl file which should be in the iTunes folder under <user>/Music on the old drive.

  • When I plug in my ipad it automatically tries to back up and download all the contents to the C drive - the PC is too full and I have iTunes on an external hard drive, how do I tell the system to do the backup to the hard drive please?

    When I plug in my ipad it automatically tires to back up and download all the contents to the C drive - the PC is too full and I have iTunes on an external hard drive, how do I tell the system to do the backup to the hard drive please?

    You can open a command prompt by hitting the start button and typing CMD<Enter> in the search box that opens up.
    To move the current backup folder from C: to D: type in this command and press <Enter>
    Move "C:\Users\<User>\AppData\Local\Apple Computer\MobileSync\Backup" "D:\Backup"
    Where <User> is your Windows user name.
    To make iTunes look for the data in the new location type in this command and press <Enter>
    MkLink /J "C:\Users\<User>\AppData\Local\Apple Computer\MobileSync\Backup" "D:\Backup"
    If your external drive has a different letter or you already have a folder called "Backup" then edit "D:\Backup" accordingly in both commands.
    tt2

  • HT1386 How do I back up the content of the iPad on the new computer or the cloud?

    The computer I have been using for backing up my iPad died! 
    My iPad is fine. 
    All the music on the iPad came from CD's. 
    How do I back up the content of the iPad on the new computer or the cloud?

    Do this:
    - iTunes: Back up your iTunes library by copying to an external hard drive
    and restore/copy the iTunes library to you new computer.
    - Connect the iPod to the computer and make a backup by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the iPod from that backup.
    Note that the iPod backup that iTunes makes does not included synced media like apps and music.

Maybe you are looking for

  • QuickTime 7.3.1 will not install on Tiger. Anyone else experiencing this?

    I updated my computer's software yesterday. The computer successfully updated iTunes, iPhoto, GarageBand, and the update to 10.4.11. The problem is when the computer went to install QuickTime 7.3.1, it had an error and did not install. Therefore, Gar

  • Backup Suspended on Agent Unreachable - 11GR2 Windows

    Hi as the title suggests an RMAN backup has gone into a state of Suspended on Agent Unreachable. I have a 2 node RAC and have run emctl status dbconsole on each node. On node 1 I get a message: EM Daemon is running. On node 2 I get a message: Oracle

  • Opinions: averatec 3220H1

    * AMD Athlon XP-M 2000+ Processor * 256MB PC2700 DDR Memory * 40GB Hard Drive * 24x CD-RW Combo Optical Drive * 12.1" XGA Display and S3 UniChrome Graphics * AC'97 Audio * v.90 56Kbps Modem, 10/100 Ethernet and 802.11g Wireless * Three USB 2.0 Ports

  • Match Records Error

    Hi Sdners, I am facing some problem in the match records process in the import manager. After I map the fields when I add the display fields in the matching fields as a combination , the process continous for a particular time period after which it s

  • Mountain Lion Finder Crashing, Mountain Lion Finder Crashing

    Can someone please help me, i've had this problem for 2 or 3 days now and it is really annayong. It seams to crash when I go to open an application. Im writing this from safe mode now and its fine, i've repaired permissions, did the apple hardware ch