Parsing data from a BLOB

I am relatively new to oracle, however I've been working with other databases for years.
I would like to load a csv file into a blob record and then parse that record to populate a separate table.
Ideally I would use Applications Express to allow a user to upload the file then trigger a procedure to parse the file.
It seems that the simplest approach to this is to call SQL*Loader and direct the blob to be the input to SQL*Loader but
I can't find if this is possible or how to do it. I'm open to other approaches however my choice to upload to a blob file in the first place is have access to the original file when necessary and to avoid having hundreds of unorganized file system files.
The csv file is a simple 3 field file that may typically contain anywhere from a dozen records to 1,000 records.
The resulting parsed records would then be filled with additional information from cross referenced tables.
The csv file is created by a hand held data collector and used to create orders for a chain of retail stores.
Suggestions?

Hello,
the blob gives a length of 61, but the inputStream image cannot give a size by available(). I am stuck here. Please help,
walter
try{
pstmt = conn.prepareStatement("SELECT " +
"aggraph " +
"FROM antigenic_t "+
"WHERE agid = ?");
pstmt.setString(1, refid);
rset = pstmt.executeQuery();
if(rset.next()){             
Blob blob = rset.getBlob("aggraph");
log.info("BLOB length @@@@ ---> :" + blob.length());
image = blob.getBinaryStream();
log.info("inputStream length @@@@ ---> :" + image.available());
}

Similar Messages

  • How do i parse data from the second jframe back to the first?

    Hello.
    I have a jFrame were I promt users to keep a list of Names in a jTable. (I keep data for something else, but lets say names.. ) Anyway, afterwords I want to add some extra parameters for each name. So I created a new frame, which is opened when user press an Edit button. The new frame opens and users can add for the specific name some extra data, like age, height, color, sex.. etc. that characterizes this person.
    On this second form i have a save button, which when its pressed i would like to keep this information for this name, so as when user press edit again from the first frame on the same Name the data that previously entered will be loaded (lets say that the user can not enter the say name again)
    I haven' t figured the code for the save Button, but with the rest I am fine.
    Can you give any ideas with structures that I have to use and how the action listener will have to be??
    When I set visible the new form i have made a constructor that loads the new form which have a label with the name of the person that is edited., but how do i parse data from the second form back to the first that is already opened??
    Thanks very much..

    I found it.. it was not so hard afterall..
    anyway, i quote the new code..
    package namelist;
    // Java core packages
    import java.awt.event.*;
    import java.util.*;
    // Java extension packages
    import javax.swing.*;
    import javax.swing.table.*;
    public class NamesGUI extends javax.swing.JFrame {
        //Variables for managing the jTables
        DefaultTableModel tableModel;
        Vector rows,cols;
        String[] colName1 = {"List of Names"};
        ManageJTables mJT = new ManageJTables();
        Hashtable h;
        /** Creates new form ProsAgentGUI */
        public NamesGUI() {
            h = new Hashtable();
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            Panel = new javax.swing.JPanel();
            ToolBar = new javax.swing.JToolBar();
            ADD = new javax.swing.JButton();
            EDIT = new javax.swing.JButton();
            REMOVE = new javax.swing.JButton();
            jButton1 = new javax.swing.JButton();
            TScrollPane = new javax.swing.JScrollPane();
            Table = new javax.swing.JTable();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Names");
            setBackground(new java.awt.Color(0, 51, 51));
            Panel.setBorder(javax.swing.BorderFactory.createTitledBorder("List of Names"));
            ToolBar.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
            ADD.setText("ADD");
            ADD.setToolTipText("");
            ADD.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
            ADD.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ADDActionPerformed(evt);
            ToolBar.add(ADD);
            EDIT.setText("EDIT");
            EDIT.setToolTipText("");
            EDIT.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
            EDIT.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    EDITActionPerformed(evt);
            ToolBar.add(EDIT);
            REMOVE.setText("REMOVE");
            REMOVE.setToolTipText("");
            REMOVE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
            REMOVE.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    REMOVEActionPerformed(evt);
            ToolBar.add(REMOVE);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            ToolBar.add(jButton1);
            rows=new Vector();
            cols= new Vector();
            cols=mJT.addColumns(colName1, cols);
            tableModel =new DefaultTableModel();
            tableModel.setDataVector(rows,cols);
            Table.setModel(tableModel);
            TScrollPane.setViewportView(Table);
            org.jdesktop.layout.GroupLayout PanelLayout = new org.jdesktop.layout.GroupLayout(Panel);
            Panel.setLayout(PanelLayout);
            PanelLayout.setHorizontalGroup(
                PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(ToolBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                .add(TScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
            PanelLayout.setVerticalGroup(
                PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(PanelLayout.createSequentialGroup()
                    .add(ToolBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(TScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(Panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(29, Short.MAX_VALUE)
                    .add(Panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            pack();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
            System.out.println(h.toString());
    public void updateNamesTable (int id, String na){
         Integer i2 = new Integer(id);
         Object o2 = (Object)i2;
         if (h.containsKey(o2)){
            Name a = (Name)h.get(o2);
            a.name = na;
            h.put(o2,a);
         else {
             Name aa = new Name();
             aa.name=na;
             h.put(o2,(Object)aa);
        private void EDITActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
            String name = Table.getValueAt(Table.getSelectedRow(),0).toString();
            int rowNum= Table.getSelectedRow();
            Integer i = new Integer(rowNum);
            Object o = (Object)i;
            updateNamesTable (rowNum, name);
            //public NameEditor(Name n,  Hashtable h, int id)
            NameEditor re = new NameEditor((Name)h.get(o), h, rowNum );
            re.setVisible(true);
        private void REMOVEActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
            mJT.deleteRow(Table.getSelectedRow(), rows, Table);
        private void ADDActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
            mJT.addRow(rows, Table);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NamesGUI().setVisible(true);
        // Variables declaration - do not modify
        javax.swing.JButton ADD;
        javax.swing.JButton EDIT;
        javax.swing.JPanel Panel;
        javax.swing.JButton REMOVE;
        javax.swing.JScrollPane TScrollPane;
        javax.swing.JTable Table;
        javax.swing.JToolBar ToolBar;
        javax.swing.JButton jButton1;
        // End of variables declaration
    public class NameEditor extends javax.swing.JFrame {
        Hashtable h;
        Name n;
        int id;
        /** Creates new form NameEditor */
        public NameEditor() {
            initComponents();
        public NameEditor(Name n,  Hashtable h, int id) {
            this.h=h;
            this.n=n;
            this.id=id;
            initComponents();
            NameField.setText(n.name);
            jTextField2.setText(n.weight);
            jTextField1.setText(n.height);
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            NameLabel = new javax.swing.JLabel();
            NameField = new javax.swing.JTextField();
            SaveBut = new javax.swing.JButton();
            jLabel3 = new javax.swing.JLabel();
            jLabel4 = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Name Editor");
            getAccessibleContext().setAccessibleName("Name Editor");
            NameLabel.setText("Name: ");
            NameField.setEditable(false);
            NameField.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    NameFieldActionPerformed(evt);
            SaveBut.setText("SAVE");
            SaveBut.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    SaveButActionPerformed(evt);
            jLabel3.setText("Height");
            jLabel4.setText("Weight");
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(layout.createSequentialGroup()
                            .addContainerGap()
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(layout.createSequentialGroup()
                                    .add(jLabel4)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(jLabel3)
                                        .add(NameLabel))
                                    .add(16, 16, 16)))
                            .add(17, 17, 17)
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(NameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 138, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField2)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE))))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(127, 127, 127)
                            .add(SaveBut)))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(NameLabel)
                        .add(NameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(30, 30, 30)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel3)
                        .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(12, 12, 12)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel4)
                        .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE)
                    .add(SaveBut)
                    .addContainerGap())
            pack();
        public void updateNameTable (){
         Integer i2 = new Integer(id);
         Object o2 = (Object)i2;
         h.put(o2,n);       
        private void SaveButActionPerformed(java.awt.event.ActionEvent evt) {                                       
    // TODO add your handling code here:
            n.height= jTextField1.getText();
            n.weight = jTextField2.getText();
        private void NameFieldActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NameEditor().setVisible(true);
        // Variables declaration - do not modify
        javax.swing.JTextField NameField;
        javax.swing.JLabel NameLabel;
        javax.swing.JButton SaveBut;
        javax.swing.JLabel jLabel3;
        javax.swing.JLabel jLabel4;
        javax.swing.JTextField jTextField1;
        javax.swing.JTextField jTextField2;
        // End of variables declaration
    }

  • Downloading data from a BLOB Field using mod_plsql

    Hi,
    I am trying to use the mod_plsql to download data from a blob field, I have a web page where I can pick the file name to be downloaded from the documents table This table has the BLOB field that has the Data formatted in a text file format(contains carriage returns), when I open it up in the browser it is displaying it correctly , but when I right click on the file name and choose "Save Target As" and save it as text file it is ignoring the carriage returns and displaying entire blob in one line.
    Can somebody help me figure out why it's not recognizing the carriage returns?
    Any help would be greatly appreciated.
    Thanks

    Hi and welcome to the forum.
    Is there a way to retrieve data from a blob field and save it to temp table.Why would you want to do that?
    Can you provide some more details regarding your requirement?
    (Don't forget to mention your database version as well)
    Also, I wonder why you've added a 'decompress' tag to your question?
    edit, after seeing Tubby's reply
    Dang, the connection must be frozen here ;)
    Edited by: hoek on Jan 6, 2010 9:06 PM

  • Extract Data from a Blob field

    I have a BLOB type field in a Table. Now I would like to have a Pl/Sql code or C code which could read the data in the BLOB field which is in XML format. Actually the data in the BLOB a record and I would like to take only required data from the BLOB and insert into another Table

    You might want to look at these OTN articles:
    [list][*]Managing Web Content
    [*]Customizing Content with XML
    [list]
    These apps use CLOBs instead of BLOBs to store XML documents, but they might give you some ideas.
    Good luck,
    -rh

  • Parsing data from indexed field

     
    Hi,
    A contractor is developing a program to parse data from a form that I created in LiveCycle. There are some tables in the form where text fields in the same column have the same base name and are assigned an index by LiveCycle. For instance, there might be a CompanyName column with 6 text fields in each of 6 rows, where the text fields are named as follows: CompanyName [0], CompanyName [1], CompanyName [2], CompanyName [3], CompanyName [4], CompanyName [5].
    The programmer of the parsing program is having trouble parsing the data for those indexed fields from the XML.  Any pointers you could give me (that I would pass on to the programmer) for how to parse data from fields with indexed names like these?  I know just a little about what he is trying to do.  He said he is using a third-party DLL called iTextSharp for the parsing.  If any pointers come to mind on what he might do, please let me know.
    Thanks,
    Emily

    When design Adobe forms, you can have multiple fields with same name; as you mentioned your fields can be named as
    CompanyName [0], CompanyName [1], CompanyName [2], CompanyName [3], CompanyName [4], CompanyName [5]
    However when the form is submitted the form data (in the form of XML) would look like as follows:
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
        <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
            <xfa:data>
                <form1>
                        <page1>
                                  <yourSubform>
                                           <CompanyName>My Company 1</CompanyName>
                                            <CompanyName>My Company 2</CompanyName>
                                            <CompanyName>My Company 3</CompanyName>
                                            <CompanyName>My Company 4</CompanyName>
                                            <CompanyName>My Company 5</CompanyName>
                                            <CompanyName>My Company 6</CompanyName>
                                  </yourSubform>
                        </page1>
                </form1>  
            </xfa:data>
        </xfa:datasets>
    </xdp:xdp>
    Note that all the CompanyName fields are named without any indexing.
    If you explain this format to your programmer, he will be able to understand and write a logic to retrieve all CompanyName field's values.

  • How to parse data from a text file with no convenient delimiters?

    I need to read data from a text file.  This file contains one line of data with the repeating pattern "time 00 ADVar2: ___ Height: ____ time 01 ADVar2: ___ Height: ___ ..."  I need LabView to parse out the "time" and "height" values, build an array with the values, and graph the correlation on an X&Y plot.  Does Labview have an automated way to read to the input data file and parse out the correct values, even without convenient delimiters?  Thank you.

    You actually do have a convenient delimiter: "time". Thus, you can make an array using that as the delimiter. Only caveat is that the first array element will be empty. Then you can conveniently use the Scan From String function in a for-loop. Something like this:
    Message Edited by smercurio_fc on 11-21-2008 03:13 PM
    Attachments:
    Example_VI.png ‏9 KB

  • Parsing date from JSON response

    Is there any helper method to parse date time value being returned in JSONResponse to get java.util.Date. For example, 2012-06-26T15:51:59.078-05:00. I have done simple java method using SimpleDateFormat, but that does not handle all possible formats. Anyone has ideas on libraries that can be used for this purpose?
    Chandresh

    Oh I see you receive different formats from different services, who's backend you can not modify.
    I found this, it should help you get the job done:
    http://stackoverflow.com/questions/4024544/how-to-parse-dates-in-multiple-formats-using-simpledateformat
    Note however, that his problem is only relatively simplistic, yours on the other hand seems to be one of a kind where you have to be set up a pretty nifty algorithm taking care of all the different possible formats. That being said, there is no method which can parse ANY format you throw at it. you must write one yourself which knows which possible formats to expect.
    If its only those two formats you can expect:
    2012-06-26T15:51:59.078-05:00
    2012-06-26T15:51:59-05:00
    it should be an easy try-catch construct within a helper method. just be sure to use the right letters when setting up your SimpleDateFormat parse object, it's case sensitive and one quickly gets lost in all those letters.
    Edit:
    Again this should do the trick:
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSz");
    Just make sure you remove the last ":" from the JSONString (simple string manipulation) and then have two cases
    //removing last ":" from JSONString
    //====
    //Parsing string to date or gregCalendar
    GregorianCalendar time= new GregorianCalendar();
    try{
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSz");
    time.setTime(sdf.parse(JSONString));
    catch{
    SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz");
    time.setTime(sdf2.parse(JSONString));
    Edited by: Pascal B on 05.07.2012 04:50
    Edited by: Pascal B on 05.07.2012 04:55

  • How to retrieve all the data from a BLOB using view-generated accessor

    I am using JDeveveloper 10g v. 10.1.3 and am storing an image in a database as a blob object and need to retrieve all of the data to get the entire image and store it in an ImageIcon. The code I have works partially in that it retrieves the correct data, but only gets a piece of it, leaving me with a partial image.
    AppModuleImpl am;
    ImageVwViewImpl vo;
    am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
    vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
    ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
    ImageIcon icon = new ImageIcon(ivo.getImage().getBytes(1, (int)ivo.getImage().getBufferSize()));
    jULabel1.setIcon(icon);I either need to know how to use a stream to get the data out (from BlobDomain method getBinaryStream()), or how to get the other chunks of data separately.
    edit: I know the problem is that getBufferSize() returns an int which is too small to hold all the data, but need to know what to use instead. Thanks!

    This is the code I'm using now. Same problem :(
    AppModuleImpl am;
            ImageVwViewImpl vo;
            am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
            vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
            ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();  
            ImageIcon icon = new ImageIcon(ivo.getImage().toByteArray());
            jULabel1.setIcon(icon);

  • Parsing data from Serial Port one byte at a time

    Hi everyone,
            What I want to do is read in from the serial port byte by byte and parse each byte that I am reading in. The size of the data read in varies. How do I do that? I can do using .dll but I want to learn how to do it in labview. I searched through the forum for something similar but no luck. I have seen some that puts the VISA read in a while loop and others that puts the property node,  "bytes at Port" in a while loop. What is the difference in doing either way? I am using Labview 7.1 Can anyone point me in the right direction?
    Thanks

    Hi guys..
    I'm still a beginner in using labview tcp/ip function. for now, i have a project to read the labview data with java programming language so that i can monitor that data using any devices that using java, such as PC or cell phone. my task for now is to determine the format of data that being sent (its type, length, etc), coz as far as i done until now, the data that read in the java is still a raw material so that i dont know how to gain the information from that data.
    my question is :
    - how does the type cast work in changing the data format from one to another?
    - how does the bytes to read in tcp read work? coz when i'm changing the length of bytes to read constant from 4 bytes to another, the data is becoming mess up. As far as i know, the bytes to read only read the first "constant number" byte in the tcp read to determine the length and type of the data..
    thanks

  • Inserting and retrieving data from a BLOB

    Hi All,
    I have a table where in i will be storing .CSV and .XLS files as BLOBS. I have no clue as to how to read from this column and translate the data into a meaningful form!.
    Can anyone help me with this?

    Don't store the results as BLOBS/CLOBS and unstructured solutions.
    If you do, then your requirement to "read from this column and translate data into a meaningful form" will fail.
    You should convert the logical representation of data in the CSV (field,row) or XLS representation into a database design following the principles of the relational model.
    You will then need to write a loading mechanism, which would probably leverage external tables as an access method; or possibly heterogeneous services for binary XLS if conversion isn't an option.

  • Error in parsing data from instrument i/o assistant

    I have used a GPIB card to talk with a HP53131 Counter. I tested the command in the Instrument IO Assistant, the data it reads back is good and never show a problem. But when I link output to text pallet or a chart, the data is wrong. I should get 5e6, it gives me 5e66. I can fix this by put a division in to data pipe-line. But the labview program has other errors too. for about 10-15% of the probability, Instrument IO Assistant outputs very high or low numbers like 55e66, or 0. Also fairly high interuption due to "GPIB scaning errors" (no less than 5% probability). Does anybody know such bugs from Instrument IO Assistant?
    I used the same hardware and HP provided software in Excell. It can contiue take data for 1 wee
    k and does not break. No error readings.
    Thanks in advance
    Regards
    James

    Tommy,
    In the parsing window, I see the right number. But when it sends it out to other VIs, the number is wrong. I tested the assistant many times, I did not catch the error I saw outside. The VIs I used to check the Asistant are:chart, array (saved to file) and text box. All show the same wrong number if one does.
    Attached is the VI I used to test and some saved data after divided by 1e60
    Attachments:
    hp53131a_test2.vi ‏133 KB
    nitestdata.txt ‏2 KB

  • Cannot parse data from xml

    I am trying to obtain strings from a xml file:
    I tried the following:
    var url:URLRequest = new URLRequest("blog.xml");
    var xml:XML;
    var rss:URLLoader = new URLLoader();
    rss.load(url);
    rss.addEventListener(Event.COMPLETE, readRss);
    function readRss(e:Event):void{
           xml = XML(rss.data);
           txt_field.text=xml.entry[1].author.name;
    but had no results. TypeError: Error #1010:...
    I tried tracing xml and that worked fine.
    The xml structure seems to be too complex
    var blogList:XMLList = xml.children(); //returns a more simple xml structure but still no success in parsing parts of the xml such as "title" or "author".
    Any suggestions would be greatly appreciated.
    Thanks

    Hi Kglad,
    thank you for helping me with this post and all the previous threads.
    for accessing entry[1].title, i tried:
    xml..ns::entry[0].title // but didn´t really work.
    I also tried to retrieve all the items under "entry" with:
       var ns:Namespace=xmlData.namespace();
       var MSGCounter:int = 1;
       for each (var item:XML in xmlData..ns)
        txt_field.appendText("Post "+MSGCounter++ +"\n")
        txt_field.appendText("------------------------------------------------------------------- -----\n");
        txt_field.appendText(item.entry.title.toString());
        txt_field.appendText("\n");
        txt_field.appendText("\n");
        txt_field.appendText(item.entry.content.toString());
        txt_field.appendText("\n ");
        txt_field.appendText("\n ");
        txt_field.appendText(item.entry.author.name.toString());
        txt_field.appendText("\n\n");
    but had no success.

  • How to parse data from XML with prefix?

    Hi folks,
    I have an XML which tags include prefixes. I would like to parse it using a select. Any ideas?
    [Sample XML|http://wwwinfo.mfcr.cz/cgi-bin/ares/darv_or.cgi?ico=46972501]
    I tried this:
    select xml
    from
       (  select
                httpuritype('wwwinfo.mfcr.cz/cgi-bin/ares/darv_or.cgi?ico=46972501').getXML() xml
          from dual
        );This just returns XML.
    select  x.ico,
            x.org_name
        from dual d
             ,XMLTABLE('/are:Ares_odpovedi/are:Odpoved/D:Vypis_OR'
                        PASSING httpuritype('http://wwwinfo.mfcr.cz/cgi-bin/ares/darv_or.cgi?ico=46972501').getXML()
                        COLUMNS
                           ico varchar2(50) PATH 'D:ZAU/D:ICO'
                          ,org_name varchar2(200) PATH 'D:ZAU/D:OF'
                        )  x
       where rownum = 1
    ORA-19228: XPST0008 - undeclared identifier: prefix 'are' local-name 'are:Ares_odpovedi'Any idea how to simply get all details into columns?
    Thanks,
    Tomas

    add xmlnamespaces to xmltable
    select  x.ico,
            x.org_name
        from XMLTABLE(
             xmlnamespaces('http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_answer_or/v_1.0.3' as "are"
             , 'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_datatypes/v_1.0.3' as "D"),
             '/are:Ares_odpovedi/are:Odpoved/D:Vypis_OR'
                        PASSING httpuritype('http://wwwinfo.mfcr.cz/cgi-bin/ares/darv_or.cgi?ico=46972501').getXML()
                        COLUMNS
                           ico varchar2(50) PATH 'D:ZAU/D:ICO'
                          ,org_name varchar2(200) PATH 'D:Vypis_OR/D:ZAU/D:OF'
                        )  x
       where rownum = 1not tested

  • Need to extract data from a BLOB

    I have a blob that I need to pull some data out of and insert into a table that already contains the blob.
    My thought is to use something like instr or substr and have it return the values to the appropriate column for the appropriate blob. Am I on the right road?
    Is there any examples you could provide that will lead me in the right direction?
    The data that I am looking for is at least preceded by a word: for example
    I am looking for an assigned_id number At least the number itself is preceded by something like Assigned ID: 123456
    It may not always be in the same place in the document but I am hoping that there is some way to traverse over the document find the word assigned id and then take that vale to insert into the table
    Any help would be appreciated

    The subject is BLOB ... not CLOB. The demo you linked is for CLOB.
    That said the DBMS_LOB package contains both SUBSTR and INSTR functions.
    Demos here:
    http://www.morganslibrary.org/reference/dbms_lob.html
    One small warning though ... taking a substring of binary data may or may not yield anything of value. How are you going to determine the offset?

  • Is it possible to to parse data from a log file and dump to an evt or evtx

    Have a need to query a set of servers and look for a particular event code. I need to dump the identified events to an .evt or evtx format so it can be read by windows event viewer as well as be read by splunk.
    This is the bit I have setup for running against my set of servers:
    $servers = "host1","host2",...
    foreach ($host in $servers)  {
    Get-WinEvent -ComputerName $host -filterhashtable @{logname='security';id=4738}
    Right now I have it so it pipes the output to a text file, but have not found a way to pipe out only the events I want to an evt or evtx file.
    Any suggestions or ideas?
    Eric

    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
      <EventID>4738</EventID>
      <Version>0</Version>
      <Level>0</Level>
      <Task>13824</Task>
      <Opcode>0</Opcode>
      <Keywords>0x8020000000000000</Keywords>
      <TimeCreated SystemTime="2015-01-18T17:47:40.357063000Z" />
      <EventRecordID>5276578090</EventRecordID>
      <Correlation />
      <Execution ProcessID="692" ThreadID="6160" />
      <Channel>Security</Channel>
      <Computer>somedchostname</Computer>
      <Security />
      </System>
    - <EventData>
      <Data Name="Dummy">-</Data>
      <Data Name="TargetUserName">someaccountname</Data>
      <Data Name="TargetDomainName">somedomainname</Data>
      <Data Name="TargetSid">S-something</Data>
      <Data Name="SubjectUserSid">S-somethingelse</Data>
      <Data Name="SubjectUserName">accountmakingchange</Data>
      <Data Name="SubjectDomainName">domainofaccountmakingchange</Data>
      <Data Name="SubjectLogonId">0xidofaccount</Data>
      <Data Name="PrivilegeList">-</Data>
      <Data Name="SamAccountName">-</Data>
      <Data Name="DisplayName">-</Data>
      <Data Name="UserPrincipalName">-</Data>
      <Data Name="HomeDirectory">-</Data>
      <Data Name="HomePath">-</Data>
      <Data Name="ScriptPath">-</Data>
      <Data Name="ProfilePath">-</Data>
      <Data Name="UserWorkstations">-</Data>
      <Data Name="PasswordLastSet">-</Data>
      <Data Name="AccountExpires">-</Data>
      <Data Name="PrimaryGroupId">-</Data>
      <Data Name="AllowedToDelegateTo">-</Data>
      <Data Name="OldUacValue">0x1014</Data>
      <Data Name="NewUacValue">0x14</Data>
      <Data Name="UserAccountControl">%%2060</Data>
      <Data Name="UserParameters">-</Data>
      <Data Name="SidHistory">-</Data>
      <Data Name="LogonHours">-</Data>
      </EventData>
      </Event>

Maybe you are looking for

  • Rescheduling production order.

    Hi, I am using a custom strategy which is similar to planning strategy 82. whats happening is . when the delivery date in the sales order is getting rescheduled its automatically rescheduling the production order. but when the production order is res

  • I no longer have microphone function in skype. upgrading mozilla firefox gave a msg that it wldn't support skype?

    i keep getting mozilla firefox upgrade msgs, but don't want to lose skype completely. right now i have lost microphone function w/ skype. what can i do to regain it? i have webcam in my laptop. thanks for your help. :)

  • Explanation of all the Stored Procedure in SBO

    Dear Experts, Their are numerous stored procedures of SAP B1 I once got a SAP documentation explaining "SBO_SP_TransactionNotification stored procedure". Now can I get the source where to get SAP documentation for all the stored procedures. I will be

  • How can we implement workflow for Deleted content

    Hi Experts, whenever we delete a content , It never went into Workflow. I want when user delete any content, It should go into workflow. When approver approves it, only then content item should actually deleted. If approver rejects it, content item s

  • Can't install Acrobat X on Windows 7

    I am try to install acrobat x to my windows 7, when i press "Install" button, the installation windows disappear, background "msiexec" still runing. But i can install at a windows xp and work fine.