How to classify the type of the file which stored in Blob column

I have a table which will stored various kinds of documents (e.g. PDF, MS word, MS Excel etc...) into blob column.
How can I read them from the database through web and display them into the correct software? i.e. when the file is PDF, it can be opened by Acrobat reader and .doc can be opened by MS word
thanks.

A bit off the topic of Oracle Text, but the client typically determines the application that will be used (you have your apps associated with file extensions on your machine and I have mine). Are you having problems related to this, or is this a question in advance of trying it out?
Thanks,
Ron

Similar Messages

  • Import From Folder: How to Extract the File Name in a Custom Column.

    Hello All
    Here´s what we´re trying to do:
    We have a folder with csv files named like this:
    Sales_2013-02-05.csv
    Sales_2013-02-04.csv
    Sales_2013-02-03.csv
    Sales_2013-02-02.csv
    Sales_2013-02-01.csv
    And in the csv files there are the sales columns but not the date column.
    So we want to extract the date from the file name.
    I´ve tried entering = Source[Name] in a custom column, but it adds a "LIST" link, and on a click on expand, it adds ALL file names from the folder in each row, instead of just the needed one.
    If we could get the proper file name in each row (from where they got extracted), we could split the column and get the date from there. But I don´t know how put the filename there properly.
    Can you help?

    This isn't entirely straightforward, but it's definitely possible. What you need to do is to apply all of your transforms to each individual file instead of the combined files. I do that as follows:
    1) Use Folder.Files as generated by the GUI to look at the list of my files.
    2) Pick one file and do all the transformations to it that I want to apply to all of the files. Sometimes, this just amounts to letting the autodetection figure out the column names and types.
    3) Go into the advanced editor and edit my code so that the transformations from step 2 are applied to all files. This involves creating a new function and then applying that function to the content in each row.
    4) Expand the tables created in step 3.
    As an example, I have some files with names that match the ones you suggested. After steps 1 + 2, my query looks like the following:
    let
        Source = Folder.Files("d:\testdata\files"),
        #"d:\testdata\files\_Sales_2013-02-01 csv" = Source{[#"Folder Path"="d:\testdata\files\",Name="Sales_2013-02-01.csv"]}[Content],
        #"Imported CSV" = Csv.Document(#"d:\testdata\files\_Sales_2013-02-01 csv",null,",",null,1252),
        #"First Row as Header" = Table.PromoteHeaders(#"Imported CSV"),
        #"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",{{"One", Int64.Type}, {"Two", type text}, {"Three", type text}})
    in
        #"Changed Type"
    For step 3, I need to take steps 3-5 of my query and convert them into a function. As a check, I can apply that function to the same file that I chose in step 2. The result looks like this:
    let
        Source = Folder.Files("d:\testdata\files"),
        Loader = (file) =>
            let
                #"Imported CSV" = Csv.Document(file,null,",",null,1252),
                #"First Row as Header" = Table.PromoteHeaders(#"Imported CSV"),
                #"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",{{"One", Int64.Type}, {"Two", type text}, {"Three", type text}})
            in
                #"Changed Type",
        #"d:\testdata\files\_Sales_2013-02-01 csv" = Source{[#"Folder Path"="d:\testdata\files\",Name="Sales_2013-02-01.csv"]}[Content],
        Loaded = Loader(#"d:\testdata\files\_Sales_2013-02-01 csv")
    in
        Loaded
    Now I apply the same function to all of the rows, transforming the existing "Content" column into a new value:
    let
        Source = Folder.Files("d:\testdata\files"),
        Loader = (file) =>
            let
                #"Imported CSV" = Csv.Document(file,null,",",null,1252),
                #"First Row as Header" = Table.PromoteHeaders(#"Imported CSV"),
                #"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",{{"One", Int64.Type}, {"Two", type text}, {"Three", type text}})
            in
                #"Changed Type",
        Transformed = Table.TransformColumns(Source, {"Content", Loader})
    in
        Transformed
    Finally, I need to expand out the columns in the table, which I can do by clicking on the expand icon next to the Content column header. The resulting query looks like this:
    let
        Source = Folder.Files("d:\testdata\files"),
        Loader = (file) =>
            let
                #"Imported CSV" = Csv.Document(file,null,",",null,1252),
                #"First Row as Header" = Table.PromoteHeaders(#"Imported CSV"),
                #"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",{{"One", Int64.Type}, {"Two", type text}, {"Three", type text}})
            in
                #"Changed Type",
        Transformed = Table.TransformColumns(Source, {"Content", Loader}),
        #"Expand Content" = Table.ExpandTableColumn(Transformed, "Content", {"One", "Two", "Three"}, {"Content.One", "Content.Two", "Content.Three"})
    in
        #"Expand Content"
    From here, you should be able to get to what you want.

  • How to pick the file which is created with current date

    Hello All,
    I have an FTP server where files are created with current date as PO_CONFIRM_20100701.txt.
    Need to pick the file based on current date. How to pick the above file format using file sender adapter. i.e what file pattern can we use so that file will be picked only on today's date
    Regards,
    Sreenivas.

    Hi Srinivas,
    It depends upon the OS you are using. If unix you can see an example script here:
    http://www.computing.net/answers/dos/batch-file-to-rename-files-by-date/5517.html
    If windows an example here:
    http://en.kioskea.net/forum/affich-87157-finding-and-using-file-date-in-batch-command
    You may need to change slightly to fit your exact requirements. But this would make you to start. Else you can also google to get the script. Here is one link:
    http://www.google.com/#hl=en&source=hp&q=scripttorenamefileshavingtodaysdate&aq=f&aqi=m1&aql=&oq=&gs_rfai=CRE9SwTMsTNjiDpzGhgTm65iFCwAAAKoEBU_QC2i-&fp=e0fa4b5da4f245a4
    Regards,
    ---Satish

  • [CS3][JS] How to get the file type of current document

    Hi,
    How to get the file type of current opening document (e.g., tif, jpeg, png) using JavaScript with Photoshop CS3.
    I am using file object the open the files one by one in the folder (the files sometimes don't have the extensions).
    If the current document is in tiff format then I need to convert to 8-bit, if its an Jpg image then needs to ignore the file.
    Regards,
    Karthik

    Do you really need to know the file type? What about just checking the bit depth?
    var doc = activeDocument;
    if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) {//Not 8 bit
    doc.bitsPerChannel = BitsPerChannelType.EIGHT;
    //do your save etc
    }else{
        //Ignore

  • How to open the file types of iOSApp(ipa),EPUBFile(.epub) in windows 7(32 bit)

    How to open the file types of iOSAPP(ipa),EPUBfile(.epub) in windows 7(32 bit)

    iOS apps can be added to an iTunes library and thereafter transferred to an iOS device. They cannot be opened directly on a PC.
    epub files can be added to an iTunes library, and thereafter transferred to an iOS device where they can be read with the iBooks application. Files protected with Apple's DRM cannot be opened directly on a PC, though there are programs such as Kindle and Calibre that will open non-protected epub files.
    tt2

  • How to change the file type from IMOVIE PROJECT to other types of file

    how to change the file type from IMOVIE PROJECT to other types of file??
    thank you very much for your help=]

    I am not sure what you mean, but once you make a project. Then go to the share menu and you can export the project to iDVD, itunes, mobileme, quicktime.
    Share export quicktime movie will allow you to export to a variety of codecs. What specific export are you looking to share the movie in? What is the final source that the movie will be displayed?

  • How to find the file type without the file extension using indesign javascript (.jsx)

    hi,
    How to identify the file type (eg: InDesign or Quark) without knowing their file type. How can we find what kind of file is that??? without their extension like ('.indd','.qxd') before import to the document...

    Hi subha_oviya,
    Take a look at the file filtering section in the InDesign CS3 sample script ImageCatalog.jsx to see how to look for file types. I'm assuming that you're using InDesign CS3, and that you're using the Mac OS--you didn't say.
    Thanks,
    Ole

  • How to read the file from a folder.

    Hi All,
    How to read the file from a folder or directory from the non sap server / remote server.
    Regards
    Sathis

    open dataset filename for input in text mode
                         encoding default.
    filename is character type variable with the destination filename.
    Edited by: Jino Augustine on Apr 19, 2010 1:31 PM

  • How to print the file name in sap

    Hi All,
    I have requirment like,
    there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
    how to print the file name of all these file in SAp like
    file1.xls
    file2.xls
    file3.xls
    file4.xls
    file10.xls
    Appropriate points will be rewarded.
    Thanks in Advance
    Arun kumar

    Hi,
    Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
    Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
    after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
    <b>sample code :</b>
    data: desktop_dir type string.
    data: ifiles type table of string.
    data: xfiles type string.
    data: count type i.
    data: filepath type string.
    call method cl_gui_frontend_services=>get_desktop_directory
      changing
        desktop_directory    = desktop_dir .
    call method cl_gui_cfw=>flush.
    call method cl_gui_frontend_services=>directory_list_files
      exporting
        directory                   = desktop_dir
    *    filter                      = '*.xls'
         files_only                  = 'X'
    *        DIRECTORIES_ONLY            =
      changing
        file_table                  = ifiles
        count                       = count.
      DATA : x_name       LIKE tsp03d-name,
             x_dest       LIKE tsp03d-padest VALUE 'LOCL',
             x_rows       LIKE sxpcklsti1-body_num VALUE 0,
             x_startrow   LIKE sxpcklsti1-body_start VALUE 1,
             x_pages      LIKE rspotype-pages VALUE 1,
             x_pages_1    TYPE p DECIMALS 2,
             x_rqtitle    LIKE sxpcklsti1-obj_descr,
             x_rqcopies   TYPE i VALUE 1,
             x_rqowner    LIKE trdyse01cm-username,
             x_immediate  LIKE pri_params-primm VALUE ' ',
             x_rqid       LIKE tsp01-rqident,
             i_contents    LIKE  solisti1 OCCURS 0 WITH HEADER LINE,
          x_pages   = 1.
          x_rqowner = sy-uname.
          x_dest     = 'LOCL'.
          x_startrow = 1.
          x_rqcopies = 1.
          x_immediate = 'X' .
          CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
           EXPORTING
    *       name                 =   x_name
             dest                 =  x_dest
             rows                 =  x_rows
             startrow             =  x_startrow
             pages                =  x_pages
             rqtitle              =  x_rqtitle
             rqcopies             =  x_rqcopies
             rqowner              =  x_rqowner
             immediately          =  x_immediate
           IMPORTING
             rqid                 =  x_rqid
           TABLES
             text_data            = i_contents
           EXCEPTIONS
             name_missing         = 1
             name_twice           = 2
             not_found            = 3
             illegal_layout       = 4
             internal_error       = 5
             size_mismatch        = 6
             OTHERS               = 7.
          IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Regards
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

  • How to validate the file path when downloading.

    Hi
    How to validate the file path when downloading to Presentation or application Server.

    hiii
    you can validate file path by following way
    REPORT zvalidate.
    TYPE-POOLS: abap.
    DATA: w_direc TYPE string.
    DATA: w_bool TYPE abap_bool.
    w_dir = 'c:\Myfolder\'.
    CALL METHOD cl_gui_frontend_services=>directory_exist
    EXPORTING
    directory = w_direc
    RECEIVING
    result = w_bool
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    wrong_parameter = 3
    not_supported_by_gui = 4
    OTHERS = 5.
    IF NOT w_bool IS INITIAL.
    WRITE:/ 'Directory exists.'.
    ELSE.
    WRITE:/ 'Directory does not exist.'.
    ENDIF.
    regards
    twinkal

  • How to display the file status in the status bar?

    Hi all,
    Can anyone tell me how to display the file status in the status bar?
    The file status can consists: the type of the file, the size of the file etc..
    thanx alot..

        class StatusBar extends JComponent {
              JLabel l = new JLabel("ready");
            public StatusBar() {
                  super();
                  setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
                  add(l);
              public void setText( String prompt ) {
                   l.setText(prompt);
                   setVisible( true );
            public void paint(Graphics g) {
                  super.paint(g);
        }

  • File-interface - how to populate the file correctly?

    Hi there,
    I have to write my first interface to another non-sap-system using a file-interface. Now I have a little question in case of filling such an interface file. I have a documentation of the other system which describes how to fill the file.
    There is said that I should write DEC-values in the following way to the file:
    DEC 13.3 : -0000012345.123 (leading sign and zero's for filling the field to the complete length)
    Can anybody give me a hint how to convert such a DEC-value in the format the interface wants to have it? I think I can do it via "string operations" but I'm sure that there is another way which should be used and which is more elegant.
    Please help me.
    Kind regards
    Markus

    Try with this,
    data : s1 type p decimals 3.
           s2(16) type c value '000000000000000'.
           s3(16) type c.
    s1 = '12338383'.
    s3 = s1.
    overlay s3 with s2.
    S3 would be your required output
    Regards
    Sasi

  • Servlet- How to send the file as argument

    I am able to compile the below program. But when I open it in explorer I m not able to get the response. Its giving me the error. Actually the program requires the file from the user. I am giving that in the url in the folowing way
    http://localhost:8080/examples/servlet/ListManagerServlet?aniketh
    Where aniketh is the file which I m providing.
    Please help me out with this.
    import java.util.Vector;
    import java.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ListManagerServlet extends HttpServlet
    private Vector addresses;
    private String filename;
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    System.out.println("Before");
    filename = config.getInitParameter("addressfile");
    if(filename == null)
    throw new UnavailableException(this,
    "The \"addressfile\" property "+
    "must be set to a file name");
    try
         System.out.println("After");
    ObjectInputStream in =
    new ObjectInputStream(new FileInputStream(filename));
    addresses = (Vector)in.readObject();
    in.close();
    catch(FileNotFoundException e) { addresses = new Vector(); }
    catch(Exception e)
    throw new UnavailableException(this,
    "Error reading address file: "+e);
    protected void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    res.setContentType("text/html");
    res.setHeader("pragma", "no-cache");
    PrintWriter out = res.getWriter();
    out.print("<HTML><HEAD><TITLE>List Manager</TITLE></HEAD>");
    out.print("<BODY><H3>Members:</H3><UL>");
    for(int i=0; i<addresses.size(); i++)
    out.print("<LI>" + addresses.elementAt(i));
    out.print("</UL><HR><FORM METHOD=POST>");
    out.print("Enter your email address: <INPUT TYPE=TEXT NAME=email><BR>");
    out.print("<INPUT TYPE=SUBMIT NAME=action VALUE=subscribe>");
    out.print("<INPUT TYPE=SUBMIT NAME=action VALUE=unsubscribe>");
    out.print("</FORM></BODY></HTML>");
    out.close();
    protected void doPost(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    String email = req.getParameter("email");
    String msg;
    if(email == null)
    res.sendError(res.SC_BAD_REQUEST,
    "No email address specified.");
    return;
    if(req.getParameter("action").equals("subscribe"))
    if(subscribe(email))
    msg = "Address " + email + " has been subscribed.";
    else
    res.sendError(res.SC_BAD_REQUEST,
    "Address " + email + " was already subscribed.");
    return;
    else
    if(unsubscribe(email))
    msg = "Address " + email + " has been removed.";
    else
    res.sendError(res.SC_BAD_REQUEST,
    "Address " + email + " was not subscribed.");
    return;
    res.setContentType("text/html");
    res.setHeader("pragma", "no-cache");
    PrintWriter out = res.getWriter();
    out.print("<HTML><HEAD><TITLE>List Manager</TITLE></HEAD><BODY>");
    out.print(msg);
    out.print("<HR><A HREF=\"");
    out.print(req.getRequestURI());
    out.print("\">Show the list</A></BODY></HTML>");
    out.close();
    public String getServletInfo()
    return "ListManagerServlet 1.0 by Stefan Zeiger";
    private synchronized boolean subscribe(String email) throws IOException
    if(addresses.contains(email)) return false;
    addresses.addElement(email);
    save();
    return true;
    private synchronized boolean unsubscribe(String email) throws IOException
    if(!addresses.removeElement(email)) return false;
    save();
    return true;
    private void save() throws IOException
    ObjectOutputStream out =
    new ObjectOutputStream(new FileOutputStream(filename));
    out.writeObject(addresses);
    out.close();
    }

    i dont need file from the user. Actually the file -aniketh is the one which contains all the email address who are registered on particular site(for example). So if any user is coming and trying to register then it will check in the the file aniketh and see if the user is existing or not. If yes then it will pop up user exist and if no then it will create a subscribe the user. I hope you got wht i am saying. Now I want that my servlet should use that file. SO my question is how to make my servlet use that file. DO i have to passs it in address bar or something else......
    Plz reply
    appreciate in advance
    Message was edited by:
    aniketh_parmar

  • How can i check the file  which is upload from  the server

    when upload the excel file from the server file to the internal table ,how can i check the data whether it accord with  the required condition .
    for example ,i want to upload the file which have the data whose type is pack, and it have three integer and  two decimal ,how can i check in my code.
    thanks,

    Hi Sichen,
    First upload the file, Then do ur validations and delete the records that doesn't satisfy ur requirements.
    Thanks,
    Vinod.

  • How to Capture the File Names of any extension using ssis

    Hello,
    Can you please let me know on how to Capture the File Names of any extension(EG : xls,text,.csv etc) at a time  and stores in excel file  using SSIS?
    Any help would be appreciated.
    Thanks,
    Vinay s

    If you need to act differently on each file type separately or if not all types of files are wanted, i.e. the Filespecifier cannot be *.* in the Foreach loop:
    In the ssis package
    make 3 variables:
    to store the file extension, e.g. User::CurrentExtension of type string
    to store the filename found in the directory: @CurrentFilename
    to store the name of the directory where the files reside e.g. User::CurrentDirectory
    make a foreach loop of type Foreach Item enumerator:
    in the items list you add each file extension that you need
    txt
    csv
    xls
    xlsx
    As Variable mappings map the CurrentExtension to Index 0
    Inside this foreach loop add another foreach loop of type Foreach File enumerator, in the collection Expressions
    add Expression Directory , set to @[User::CurrentDirecotry]
    add Expression FileSpec, set to "*." + @[User::CurrentFileExtension]
    In the Variable mappings, map Variable user::CurrentFilename to Index 0
    Inside this loop use Execute SQL Task to insert the filename in a Excel connection.
    Jan D'Hondt - SQL server BI development

Maybe you are looking for

  • External SATA recommendations

    All, Can anyone recommend an external SATA solution for my Powermac G5? I have a card with external ports, but I need advice on the following: 1. Decent enclosure that will allow spindown of disks 2. Cables 3. Disks The other option would be for a NA

  • Background in table load delay, or slow load

    I just put together this page and things are working pretty well, but I'm not happy with how the background image loads last. First you see the text on the screen, and then you see the image load in from top to bottom. The image is only 96kb, so it s

  • Presentation for RoboHelp Server

    Has anyone wrote a report on the features of RoboHelp (server, especially) and what they loved about it? For example, I know server generates reports...anything out there that goes into detail on what those reports actually are? Whats happening is be

  • I cannot upload files from my macbook pro via email, etc

    When I click on insert file all I see is the main menu with the folders when  I select the folder it does not give me the option to open to select and upload files. How can I rectify this? In all honesty I am sarting to regret buying a mac, all I hav

  • Canon Rebel EOS T3 12.2 MP

    Does anyone know if I can get "prints on canvas", like from Shutterfly?  I'm just curious if this camera has enough megapixels for prints to be put on canvas in larger sizes.  I'm new at photography so if I sound like an idiot, I apologize.