How to store data from file

hi all
u some data on text file i want to store that data in my table
data in a.txt is
name date reason country
and i ean to store that data in my table with four colums

this script from asktom can be used to load a .pdf, .xls, .doc and .txt. just creat a procedure for each file you want to up load.
here is for pdf loading.
create or replace directory myfiles as 'C:\TEST'
create table mypdfs (
id number(38) primary key,
theblob blob not null);
declare
l_blob blob;
l_bfile bfile;
begin
insert into demo values ( 1, empty_blob() )
returning theBlob into l_blob;
l_bfile := bfilename( 'MYFILES', 'ora_log.pdf' ); --here you can add the file name and the extension
dbms_lob.fileopen( l_bfile );
dbms_lob.loadfromfile( l_blob, l_bfile,
dbms_lob.getlength( l_bfile ) );
dbms_lob.fileclose( l_bfile );
end;
create or replace package getpdfs
as
procedure pdf(p_id in mypdfs.id%type);
end;
create or replace package body getpdfs
as
procedure pdf(p_id in mypdfs.id%type)
is
l_lob blob;
l_amt number := 32767;
l_off number := 1;
l_raw raw(32767);
begin
select theblob into l_lob
from mypdfs where id = p_id;
owa_util.mime_header('TEST/pdf');
begin
loop
dbms_lob.read(l_lob, l_amt, l_off, l_raw);
htp.prn(utl_raw.cast_to_varchar2(l_raw));
l_off := l_off + l_amt;
end loop;
exception
when no_data_found then
null;
end;
end;
end;
My favourite is intermedia. You can upload any file and images.
Good luck

Similar Messages

  • How to store data from textfile to vector and delete a selected row.

    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)

    nemesisjava wrote:
    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)What's the problem? What have you done so far? What failed?
    What you described should be pretty easy to do.

  • How to store data from Host.vi in cRIO-9074

    TejasKumar Patel
    I implemented a advance Measurement and Control system using cRIO-9074
    with c-Series I/O cards( NI 9217, 9411, 9264)
    I have some questions about it,
    (1)- Data rate from FPGA targate to host vi is too low. how can I increase
    it, when I run my host VI, sometimes all temperature sensor update at
    same time and sometimes one by one, can you please give me some hint, how
    can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
    Digital input and all analog output and input in a seperate while loop in
    FPGA targate VI.
    (2)- I have to write that data to analyse for further result. I tried all
    possible way to write data including wite to spreadsheet.vi, write to
    text.vi, Data storage.vi, Write to measurement.vi. All this VI work
    efficientlywhen it run individualy, But when I connect this VI to
    writedata from FPGA host VI. than it always give empty file.
    I saw your post in NI discussion forum about how to write data from
    Host.vi, But still I am confuse that how can I creat a protocol between
    host VI and Fpga target vi. to write the data in a file. I have nearabout
    38 channel to write data.
    (3)- I have to measure time difference between two digital pulses, to find
    a flow rate. I am using counter for it with risisng edge shot.vi, but when
    i get a timestemp when there is risisng edge for the second rising edge
    how can I get timestemp. Its like i have to measure time between two
    pulses, I triend waveform measurement.vi to find cycle period. but it not
    worked. any other was to measure it.
    I am stuck in this question since from last one month. I already followed
    NI-discussion forum solution but it doesnt work. I think the way I applied
    is may be wrong. 
    Looking forward to hear from you soon.
    Plese send an additional email copy to [email protected]
    Thank you and Best Regards, 

    Thanks Joseph for your support,
    1-      If I count the ticks between the pulses it always seems different ….because this method I already tried, but it does not work,  like some times it shows 9099 tick and at the second pulse it shows like some more or less ticks not the same ticks every time. To complete my project, the biggest problem is the data storage.
    2-      As you gives the solution in NI forum, “low level file I/O Vis such as Write to text file” FPGA target not support this VI. And mainly I want to write data from HOST.vi, because I am process those data …and I need to store it. For to figure out my result.
    3-      If I use “Write to text file. VI (Sub-VI ) to FPGA.vi, it not support because it support string data and I have FIXpoint data. And can you explain me what is low level file IO, and how can I use in fpga.vi??
    4-      Yes, for my project time stamp it really necessary, for data analysis.
    5-      I need the time stamp to find out what was the system response at the time.  As our project based on weather temperature, I need time stamp.
    Waiting for your reply,
    Thanks and Regards,
    Patel

  • How to transformed data from File to DB but the data to be insert two tables  parallel?

    Hi friends ,I am new to Oracle SOA ,I have one requirement  for the project
    actually in these project
    1.I have to read three different types of files (Employee info,Purchase Order Info,Salaes Order Info) through file adapter these records are to be store in  data base 
    transaction table.In these transaction table contains WHO columns and payload  with clob data type which contains each  record  in xml form.
    2. Now I have to  take these payload data  which is in xml form and store   in the respective table(employee or PO or SO) .I have to call these in dynamically.
    so please give me ideas and suggesstions ,,
    thanks in advance

    Roger,
    I don't know about simple way to load data from file into a table using button from your application,
    Maybe some piece of PL/SQL code with UTL_FILE or DBMS_LOB, or you can try to upload file to database using Apex "File browse" item, and then do some processing with DBMS_LOB... but it will require some work...
    Maybe someone else could advice with some simple method I don't know...
    However loading files using Apex Load Utility is quite easy.
    You can use something like this to load data to views created on remote tables:
    CREATE TABLE local_tmp_table AS SELECT * FROM view_on_remote_table WHERE 1=0;
    --load data from file to created table using Apex Load utility
    INSERT INTO view_on_remote_table SELECT * FROM local_tmp_table;
    COMMIT;
    DROP local_tmp_table;Or without views:
    CREATE TABLE local_tmp_table AS SELECT * FROM remote_table@dblink WHERE 1=0;
    --load data from file to created table using Apex Load utility
    INSERT INTO remote_table@dblink SELECT * FROM local_tmp_table;
    DROP local_tmp_table;Regards
    Tomasz
    Message was edited by:
    Tomasz K.

  • How to insert data from file into matlab script node

    I have interfaced input data from file to be processed using matlab script node. But the problem is that I could not capture the multiple data into matlab script node and to convert it into matrix. Further to this I need to process the data by plotting graphs from it. Thank you in advance for the advice

    Zarina,
    To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
    Regards
    Tristan

  • How to insert data from file to table??

    I need to know that how can i insert data in multiple column through file. I can simply insert data in one column table but couldnt find out the way to put data in all column.
    My data store in a file
    ************************************************text.txt***************
    133, shailendra, nagina, 14/H, 45637, 9156729863
    **************************************************************my_data(table)**********
    trying to insert into below table...
    id, name, last_name, add, pin. mob
    Let me know if anything else needed..:)

    Hi Shailendra,
    Actually, in SQL Developer, you can open a connection to the target schema, right-click on the Tables node in the navigator tree view, select Import Data, then use the Data Import Wizard. It is extremely flexible. It looks like you have a comma separated variable file, so if you select Format: csv and Import Method: insert it will probably work just fine.
    To minimize the chance of errors during import, pick a preview limit value so the wizard can examine the size and data type of all columns in as many data rows as possible, then review the data type/size for each column in the next wizard page and override as necessary. For date columns it is also important to choose the appropriate format mask.
    Hope this helps,
    Gary
    SQL Developer Team

  • How to store data from a complex query and only fresh hourly or daily?

    We have a report which runs quite slow (1-2 minutes) because the query is quite complicate, so we would like to run this query daily only and store in a table so for those procedures that need to use this complex query as a subquery, can just join to this table directly to get results.
    However, I am not sure what kind of object I should use to store data for this complex query. Is data in global temp table only persist within transaction? I need something that can persist the data and be access by procedures.
    Any suggestions are welcome,
    Cheers

    Thank you for your reply. I looked at the materialized view earlier on, but have some difficulties to use it. So I have some questions here:
    1.The complex query is not a sum or aggregate functions, it just need to get data from different tables based on different conditions, in this case is it still appropriate to use meterialized view?
    2.If it is, I created one, but how to use it in my procedure? From the articles I read, it seems I can't just query from this view directly. So do I need to keep the complex query in my procedure and how the procedure will use the meterialized view instead?
    3. I also put the complex query in a normal view, then create a materialized view for this normal view (I expect the data from the complex query will be cache here), then in the procedure I just select * from my_NormalView, but it takes the same time to run even when I set the QUERY_REWRITE_ENABLED to true in the alter session. So I am not sure what else I need to do to make sure the procedure use the materialized view instead of the normal view. Can I query from the Materialized View directly?
    Below in the code I copied from one of the article to create the materialized view based on my normal view:
    CREATE MATERIALIZED VIEW HK3ControlDB.MW_RIRating
    PCTFREE 5 PCTUSED 60
    TABLESPACE "USERS"
    STORAGE (INITIAL 50K NEXT 50K)
    USING INDEX STORAGE (INITIAL 25K NEXT 25K)
    REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
    NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
    enable query rewrite
    AS SELECT * FROM HK3ControlDB.VW_RIRating;
    Cheers

  • How to insert data from file into long raw field using utl_file?

    I try to insert binary data from a file (under AIX 4.3.3) into a LONG
    RAW field (Oracle 8.1.6).
    First, I retrieve the data from the file like this:
    DECLARE
    FileHandle = UTL_FILE.FILE_TYPE;
    myVariable LONG RAW;
    FileHandle := UTL_FILE.FOPEN ;('prj/oracle/admin/MARTIJN/udump',
    'MyFile.ATT', 'R');
    UTL_FILE.GET_LINE (FileHandle, myVariable);
    UTL_FILE.FCLOSE(FileHandle);
    INSERT INTO myTable(DUMMYFIELD) VALUES(myVariable);
    Where DUMMYFIELD of table myTable is of type LONG RAW.
    The GET_LINE statement crashes on Oracle Error ORA-6502: Numeric of
    Value error: hex to raw conversion error.
    What do I do wrong?
    Do I use the right method to retrieve information from a file and put
    it into a long raw field, should I try it another way?
    Any help greatly appreciated,
    Martijn Rutte

    Zarina,
    To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
    Regards
    Tristan

  • How to store data from channels into constants

    Hi
    I currently have a six channel data acquisition system for LVDTs. The way the process works is we do a calibration run on the LVDTs and store the values we get and then use these baseline values during actual measurement. My question is how do I acquire these values and store them in constants within the program itself ? I know we can write these values to an external excel file or text file but can we store them within the program so that I have them available even if I close and open the program again?

    Perhaps this will work for you.
    Attachments:
    Set_and_Save_Defaults.zip ‏26 KB

  • How to store data from a hashtable into textfile?

    let say i have 10 data in a hashtable, how can i store these data to a textfile? thanks a lot

    try to use Properties instead of HashTable,
    it has an operation store(OutputStream out, String header)
    using which we can write content of Properties to a file
    Also load content of a file using load(InputStream inStream),
    This is pretty simple operation.
    Renjith.

  • How to get data from file and save it in my DB

    Hi for all,
    my problem is :
    i have file in text format and this file have
    data .
    i want to insert this data into my database
    using forms .
    how i can do this .

    Hello,
    You can do this by :
    1. Command Host and u excecute SqlLoader
    Or
    2. Read the text file sequentially with text.io and insert data while not eof.
    Hope help u with this.
    null

  • How to enqueue data from files

    Hi,
    we are planning to load data into queue tables from flat files(CSV possbily).
    Is there any Oracle provided utility or mechanism to do so?
    Please help !!!!

    So basically you are creating a temporary work-around to "mimic" the network connection that exists for the queue-to-queue message propagation that currently exists. I see no reason why a solution following the two steps you outlined cannot be done.
    Here are my thoughts on this and of course this is not a tested solution.
    -For the queue on 10g, create a new subscriber that takes the messages that are queued up and writes them to a holding table. I was going to suggest using an EXTERNAL_TABLE to write directly to the filesystem but you could encounter issues when you need to copy the file to the 8.1.6 system and the subscriber is trying to write an entry. If you can ensure this conflict won't happen, I would suggest going this route to avoid a few steps.
    - At the scheduled time (DBMS_SCHEDULER) either read from the holding table and write the entries out to disk (UTL_FILE or EXTERNAL_TABLE). You could have the procedure also call out to a shell script or bat file and connect to the remote system and send the file across (assuming some sort of network connection still exists)
    - On the 8.1.6 side, you would need to use SQL*Loader to load the information into a staging table
    - A DBMS_JOB entry (or person) could trigger off the process to load the new records from the staging table into the queue on 8.1.6.
    Other options and variations of this may exist, but this is what comes to mind. Good luck.

  • How temporary store data from CRio?

    Hi,
    I am using a CRio to control a system. I am finding that there is a little variation in readings from the ADC module of the CRio, so the reading on the screen is a little eratic. The input signal is more stable than what the reading is making it out to be, so i know it is to do with a sampling error in the CRio (Which is to be expected). To solve this problem, i want to apply a simple filter. Where i record 4 or 5 readings and take the mean average. The 4-5 readings are continuously rolling, so as soon as the CRio has taken a new reading. The value enters the stack and the oldest reading is removed.
    Now the way i would like to do this is to use a shift register. If a shift register is able to store values and not just boolean?
    I've seen other posts in hear talking about a shift register but i can't find it (I've even searched for it but the results doesn't return anything to do with a shift register). Where should i be able to find it?
    I have the CRio sampling the inputs using a flat sequence structure. Where i have a timer in the first section and everything else that is related to it in the next section. Obviously, the timer in the first section sets the frequency that CRio samples the data. If i increase the timer and therefore decrease the frequency, would the length of time that the CRio takes to samples the data naturally increase? The longer the ADC card takes to sample the signal, the ADC card is therefore given more time to settle and will naturally filter itself.
    Failing both of these, is there another way i can do what i want to achieve?

    A shift register is a fundamental LabVIEW concept.  It allows you to store any type of value from one iteration of a loop to the next.  Search the LabVIEW help for shift registers.  One common approach to your problem is to store an array of values in the shift register.  Inside the while loop, on each iteration, rotate the array (there's a function for this), then replace the first element with the new data.  This works well for a small array (for example 4-5 previous values); there are faster but more complicated approaches if your array is larger.  If you're doing this in the FPGA on the cRIO you might need a different approach as well: keep track of an array index, insert the new value at that index, increment the index, and reset to zero when you reach the array length.
    LabVIEW also provides a number of built-in filter VIs that manage all the previous values for you; see if one of those will do what you want.
    Changing your loop rate will not affect the sample time; as far as I know, the sample time is fixed, or at least not easily accessed.

  • How to store data from xml in oracle database

    Hello All
    Could anyone tell me ways of storing XML in Oracle and whats the best one in terms of performance issues.
    any URL to this q/s would be great.
    thanks
    kedar

    Ben,
    The following link as some information regarding DOM API and XSQL.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2923508047773696280::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:17309127931717
    For XML DB, you may want to create an XMLSchema and build a table off the schema definition. Then use WEBDAV to load the xml into a folder (ie object table) Once the xml is in the database you could build a view for a relational look at the data.
    Example from XMLDB Techical White Paper doc.
    create or replace view PURCHASEORDER_MASTER_VIEW
    (reference, requestor, userid, costcenter,...)
    as select extractValue(Value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),...
    from PURCHASEORDER p

  • How to load data from file contains rows with different number of columns

    hi all,
    a data file contains assets data ordered like this(location_id
    serial_number , quantity
    serial_number , quantity
    single column rows represents location, and two columns rows represents asset details for that location
    123
    12345 ,1
    32145 ,1
    124
    12348 ,12
    41239 ,22
    54189 ,2
    254
    22419 ,1
    I want to use sql loader to load these data after merging locations with thieir assets,like this order(location_id,serial number,quantity)
    123 ,12345 ,1
    123 ,25413 ,1
    123 ,32145 ,1
    124 ,12348 ,12
    124 ,41239 ,22
    124 ,54189 ,2
    254 ,22419 ,1
    Can one help me in that?
    thank you,

    Create external table and code sql query to do it.
    :p

Maybe you are looking for

  • Any Ideas For a Fast Search Engine?

    What do you think is the fastest way to search for a couple of key words in large amounts of data?

  • Ipod 1st Generation not playing on RCA RS3081i audio system w/ iPod dock

    I just bought an RCA RS3081i that clearly states that it can be used with iPod Touch 1st & 2nd Generation. I have followed the instructions on how to use my iPod (1st gen) but the music will not come through the speakers, only the iPod itself. It sho

  • Problem in sending mail with PDF attachment

    Hi all, Kindly check this code.. I neeed to send the smartform as a PDF attachment.. PDF generated form of smartform is generated successfully.. <b>but PDF  going as attachment is showing errors in opening</b> . Please help me to solve this issue as

  • Cannot connect Oracle 10 with Oracle Forms 6i

    Hi, I am trying to connect to oracle 10g database (Release 10.1.0.5.0) from Froms 6i (Version 6.0.8.11.3) but no luck. As soon as I try to connect to Oracle 10, the forms builder is closing itself down. All I get is the useless windows error message

  • Cant submit a new app, iTunes Connect times out

    I posted this in another area on the forum but I think I put it in the wrong section so I'm reposting (sorry about the bad etiqute).  Im trying to submit an app for review but everytime I get to the stage where it connects to the iTunes Connect secti