Import external text file into table in database using web form
I whant to import data from text delimited file located in os
into oracle table using web form.
I am using ORACLE DATABASE 8i, APPLICATION SERVER 9i
and ORACLE FORMS DEVELOPER AND FORMS SERVER 6i (Patch 2)
Is there anybody who know how can i do this?
Thank you!
WebUtil uploads the files as Binary - so yes you could have some issues if you have a Unix host - however, that would only mean that there is an extra character to trim off of the end of the line read by Text_io.
Similar Messages
-
Import a text file into database
If anybody could help me with this, i would GREATLY appreciate it! I need to write a procedure to import a text file into an oracle database table. -Thanks!
See my response in Re: import a text file into database.
Cheers, APC -
SSIS best practice on importing External text files
Hi -
I am a fairly seasoned SSIS/ETL developer and I am struggling with the best architecure on how to import vendor files into a shared database. I see there being 2 methods with in importing files, and I'm really wanting input from senior
level SSIS developers on their thoughts of importing vendor files, I see there being 2 methods:
- Set up the ETL to match the format of the file, and if the format is invalid, the entire ETL is unable to process the file, various error handling will be set up to log that the file import failed, but at this point, the ETL can no longer continue
- Set up the ETL to just take a text file, NOT looking at the format within the file, bring all of the data into ONE column, and then parse through the data, using the given file delimter and log any issues at that point
I have done both methods and I think there are advantages and disadvantages to both. Hopefully I explained that well enough. Can anyone give me their thoughts, suggestions, experience, etc. on these 2 approaches of importing a file? Any input
is greatly appreciated.
Thanks!
Jenna GIt depends on how much control you've on the source end. If you can ,best thing always would be to prefix the metadata and create your package based on that. Any violation should be flagged as an error and reported back for correction with row/column details
etc.
If you've no way to fix the source, then only go for single column approach. But this can still prove to be a nightmare if the source format keeps on changing. Giving that flexibility to users can prove to be costly sometimes and you may have to spend quite
a bit of time trying to fix inconsistencies in the source.
So in my opinion best would be the former approach. Only thing is the format (matadata) has to be fixed only after sufficient discussions with all involved and exception handling also has to be agreed upon.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
USING WEBUTIL TO READ TEXT FILE INTO TABLE HANGS AFTER CERTAIN NUMBER OF RE
Dear
when we use webutil to retrieve data from text file into database table
(using text_io) it hangs after certain number of records ( approx. 1300
records) while the total number of records to be inserted in the table exceeds
12000 records while it works properly on forms6i with the normal text_io any
help please...?
thanks and regardsWebUtil uploads the files as Binary - so yes you could have some issues if you have a Unix host - however, that would only mean that there is an extra character to trim off of the end of the line read by Text_io.
-
How to load external text file into a Form?
Hi,
I made a menu with 1-5 in a Form and 5 external text files. I want the user who is able to view the text content of the text file when he chooses one of them from the menu. And the text file screen has a "Back" command button to let him go back.
How can I do it and can it support other languages such as Chinese and Japanese?
Thanks for help.
gogoSorry, I made the mistake about the subject, it should be loading local file, not external file through http.
I wrote a method but it throwed an exception when the midlet was run.
private void loadText()
try {
InputStream is = this.getClass().getResourceAsStream("/text.txt");
StringBuffer sb = new StringBuffer();
int chr;
while ((chr = is.read()) != -1)
sb.append((char) chr);
is.close();
catch (Exception e)
System.out.println("Error occurs while reading file");
I put the text.txt file in the same folder with the main file (extends midlet). How can I load the text content and display it on StringItem?
Thanks for any help.
gogo -
How to store txt file into Oracle 7 Database using Pro*C
Hi,
I want to store a txt file into Oracle 7 database table using
Pro*C application. But do not know what type of column to use.
At first glance it appeared to me as LONG can serve the purpose
but later I noticed that I can not do the sequential read/write
in LONG type of column. That is, I have to use chunks of max of
2GB (or file lenght) to read/write into such columns.
I want something simiar to CLOB of Oracle 8.
I would appreciate if you can provide me solution.
Thanks,
AnuragYou store images in a BLOB column in the database.
However, inserting image in that column and displaying data/image from that column are 2 very different tasks.
If you are using Oracle forms, displaying is easy. Default block sitting on the table with BLOB column, can be easily mapped to image box (or similar control), which will display that image.
Inserting images will be a different ball game. If your forms are web based (i.e. run from browser) and you want to insert images from client machine, some special arrangements are required.
If images are on database server and you want to insert them in database, the stored procedure given in the earlier thread (posted above) will do the job. -
How to load the data from excel file into table in oracle using UTL_FI
How to load the data from excel file into table in oracle
and from table to excel file
using UTL_FILE package
Please give me some exampleThis is something i tried in oracle apex
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Regards,
CKLP -
Importing text file into table
hello
i have a text file which contains data like empno,date and one character . every day this file is updated with new records.
now i want this data to get inserted to a table, whenever new record has been appended to the text file
can i have query or some way to do this. i can do it through sql loader, but i will not have info when the data is appended to the text file.
pls help
thanks in advance
sdsreenivasIf you're on 8.0.3 (which has been desupported for a number of years), then SQL*Loader strikes me as your best option. You could write a batch process that re-loads the file periodically so you see changes or you could write a batch file that polls the timestamp for the file and calls SQL*Loader whenever it is updated.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Importing a text file into a variable
I have a text file that I would like to import as a variable in javascript. I would like to do some editing to the text in the script before I place it into the page. I have the script splitting text into an array and the different parts need to go to different places... I have everything working for me except for importing the text from a file into a variable (right now I'm defining the variable from within the script).
Any help would be appreciated!
-ShaneIn Javascript you could use this:
var f = File ('/d/books/mytextfile.txt');
if (f.exists)
f.open ('r', undefined, undefined);
var textfile_contents = f.read();
f.close ();
Peter -
How to get current month from filename and bulk insert from text file into table?
I set up some dynamic SQL to help my bulk copy data from a text file to a table. This works fine for files that come in every day; I get the previous day’s data, based on the file name that’s placed
in the folder. That’s why I’m using the ‘-1’. The dates will look like this: '20140131', so I'm using type 112.
declare @fullpath1 varchar(1000)
select @fullpath1 = '''\\system.local\ms\london\FTP\' + convert(varchar, getdate()-1, 112) + '_INDEXPRICES_EOM.SPC'''
declare @cmd1 nvarchar(1000)
print (@cmd1)
select @cmd1 = 'bulk insert [dbo].[SB_Monthly] from ' + @fullpath1 + ' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR=''0x0a'')'
print(@cmd1)
exec (@cmd1)
I think the syntax will be somewhat similar to this:
YEAR(date_column)=YEAR(getdate()) AND MONTH(date_column)=MONTH(getdate())
I’m not totally sure how to incorporate that into my current syntax.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.I tried a couple versions of this.
Declare @StartDate Date, @EndDate Date
Select @StartDate = convert(varchar, getdate()-28, 112), @EndDate = convert(varchar, getdate()-1, 112)
BEGIN
declare @fullpath1 varchar(1000)
select @fullpath1 = '''\\ms\london\FTP\' + ''' between ''' + Convert(Varchar(10), @StartDate, 101) + ''' and ''' + Convert(Varchar(10), @EndDate, 101) + '''_SP.SPC'''
declare @cmd1 nvarchar(1000)
print (@cmd1)
select @cmd1 = 'bulk insert [dbo].[SPBMI_Monthly] from ' + @fullpath1 + ' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR=''0x0a'')'
print(@cmd1)
exec (@cmd1)
END
Here’s the string:
bulk insert [dbo].[SPBMI_Monthly] from '\\ms\london\FTP\' between '02/03/2014' and '03/02/2014'_SP.SPC' with (FIELDTERMINATOR = '\t', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR='0x0a')
The error message I keep getting is:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'between'.
Msg 319, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
I feel like I’m already pushing this thing to the limit.
Maybe this last part isn’t possible.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Skip a column when importing a text file into Excel 2010
Hi,
I have a formatted Excel 2010 spreadsheet that I want to import data from a .txt file located on my local drive. The third column of the spreadsheet is a concantenate formula that converts the second column from a Hex formatted value to a Dec formatted value.
I want the first two columns of the text file to import into the first two columns of the spreadsheet and skip the third column then import the remaining columns from the text file to the spreadsheet. Is there an easy way to do this or do I need a VBA code
and if so can you provide that to me?
Thank you,
JenniferHi Tony,
I am sorry if I didn't express my issue more clearly. Where I need to skip a column is in the Excel spreadsheet. I want to import all the columns from the text file. I want the first two columns from the text to import to the first two columns in the Excel
sheet A and B, skip the third column C in the spreadsheet, where I have a formula to convert the second column B values from a Hex format (imported data) to a Dec format, then continue to import columns 3, 4, and 5 from the text to spreadsheet columns D, E,
and F. I would think the function would be in the Excel spreadsheet maybe some type of protection setting or something similar, if it can even be done.
Thank you for taking the time to help me out with this.
Jennifer -
Import an xml file into adobe designer field using javascript
Adobe javascript experts ,please help me.
I need to load the data from an xml file into a text field in designer
using javascript and then go through each node in the loaded xml and compare that with form fields in designer and if matching fill the value(node's value from the loaded xml) in form fields.
Please give ur suggestions.
Thanks in advance!!!
regards,
sowmyaThanks for the fast response.
I saw your example and specifically the javascript code
xfa.host.importData("filename.xml").
Just by giving this alone how do I access the values in the xml???
Just by giving the above javascript, my value is not getting populated when I see in pdf preview.
But apart from that you have done dataconnection also and binding in all the columns.What is this for??
Could you kindly explain what u r doing step by step??
Thanks again.
regards,
Sowmya -
Import from csv file into a oracle database
Hi,
like i wrote in the subject i want to import some data from a csv file
and transform it into a database.
Its a simple setup,
- FA which reads with a self defined schema from a physical path
- Receive activity which creates an instance
- transform activity
- invoke which invokes the database adapter to fill a single table
- deploy it to a application server
I cant get it done.
What i achieved is to fill the table with one set (one row of the csv file),
but the other rows are untouched.
Does somebody know where i have to look for some errors.
The Auditing tool from the app server shows no errors.
I could also provide some screenshots.
Any help would be appreciated, i am really desperate :(
Thanks in Advance
Sven RichterHi
1) Is the File Adapter reading the correct number of lines in the csv file?
2) If yes, after the transformation, how many lines are there in the resulting variable?
Solutions:
1) If the FA is not reading all lines, the problem for sure is the XSD you are using. The XSD must define an element which must occurs many times. You do this using a correct XSD construction with the "maxoccurs=unbounded" atribute.
2) If the problem is with the transformation activity, you shoud use "for each" xsl node, otherwise the transformation just pick one line.
[]´s
Menezes -
, Trouble importing from text file into PDF Acrobat 9.0
Hey all!
I'm trying to use the JavaScript found on this Adobe page to insert text into my PDF:
http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/h tml/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJS.88.502.html
this.importTextData("/c/data/myData.txt", 0);
Replacing the path with my own path, of course. However, I can't get it to work at all, it just crashes my JavaScript. I was thinking it might have something to do with the privilege stuff which, admittedly, confuses me a bit. But my understanding is that if you use the function without arguments, that shouldn't matter, and it will prompt the user for a path?
this.importTextData();
However, that still crashes the JavaScript. I'm not sure what exactly I am doing wrong here?
NOTE: I have tried running the JavaScript both in a checkbox and on page load.Well I was having trouble getting it to work without a path, though that kind of mysteriously started working now despite the fact that I didn't really change anything. I also assumed that part didn't apply to me because we are on 9, not 8, but maybe it means 8 and on?
I'm having a bit of trouble wrapping my mind around privileged and non-privileged contexts.
These methods can be executed only in a privileged context, which includes console, batch and application initialization events.
What would be the simplest way to execute in a privileged context? "Application initialization" sounds promising, does this mean when the application is first opened? If so, how would you execute JavaScript this way?! -
How to import data from a text file into a table
Hello,
I need help with importing data from a .csv file with comma delimiter into a table.
I've been struggling to figure out how to use the "Import from Files" wizard in Oracle 10g web-base Enterprise Manager.
I have not been able to find a simple instruction on how to use the Wizard.
I have looked at the Oracle Database Utilities - Overview of Oracle Data Pump and the Help on the "Import: Files" page.
Neither one gave me enough instruction to be able to do the import successfully.
Using the "Import from file" wizard, I created a Directory Object using the Create Directory Object button. I Copied the file from which i needed to import the data into the Operating System Directory i had defined in the Create Directory Object page. I chose "Entire files" for the Import type.
Step 1 of 4 is the "Import:Re-Mapping" page, I have no idea what i need to do on this page. All i know i am not tying to import data that was in one schema into a different schema and I am not importing data that was in one tablespace into a different tablespace and i am not R-Mapping datafiles either. I am importing data from a csv file.
For step 2 of 4, "Import:Options" page, I selected the same directory object i had created.
For step 3 of 4, I entered a job name and a description and selected Start Immediately option.
What i noticed going through the wizard, the wizard never asked into which table do i want to import the data.
I submitted the job and I got ORA-31619 invalid dump file error.
I was sure that the wizard was going to fail when it never asked me into which table do i want to import the data.
I tried to use the "imp" utility in command-line window.
After I entered (imp), i was prompted for the username and the password and then the buffer size as soon as i entered the min buffer size I got the following error and the import was terminated:
C:\>imp
Import: Release 10.1.0.2.0 - Production on Fri Jul 9 12:56:11 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: user1
Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Import file: EXPDAT.DMP > c:\securParms\securParms.csv
Enter insert buffer size (minimum is 8192) 30720> 8192
IMP-00037: Character set marker unknown
IMP-00000: Import terminated unsuccessfully
Please show me the easiest way to import a text file into a table. How complex could it be to do a simple import into a table using a text file?
We are testing our application against both an Oracle database and a MSSQLServer 2000 database.
I was able to import the data into a table in MSSQLServer database and I can say that anybody with no experience could easily do an export/import in MSSQLServer 2000.
I appreciate if someone could show me how to the import from a file into a table!
Thanks,
Mitra>
I can say that anybody with
no experience could easily do an export/import in
MSSQLServer 2000.
Anybody with no experience should not mess up my Oracle Databases !
Maybe you are looking for
-
Scrolling doesn't work on some applications
I'm using the program Notepadd++ and I can't use the touchpad to scroll. I've connected a USB mouse, and scrolling works fine with that device. I've tried reinstalling the drivers, etc, and it still has the same problem. Scrolling also doesn't work w
-
Spare part indicator in material master
Hi Gurus, Where can i select spare part indicator in material master. regards Kaisar
-
Number formatted Amount field not working in Excel 2010
Hi, We have BI reports in EBS 11.5.10.2 designed using word 2007 RTF templates. The output is selected to write to Excel so that they can calculate on amount fields. Recently we upgraded to Office 2010 and the amount filed which has number format whe
-
SerialVersionUID in Java 1.4.2 and 1.5
Hi!!! Just ny curiosity: I�ve took a look at the API documentation for Java 1.5 and, as you can see here in [url http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html]Serializable★, according to the documentation: If a serializable class
-
Unlimited US & Canada Your Unlimited US & Canada subscription expired on December 26, 2011. In email it says i can renew the subscription before 90 days it was expired. But i see no link from where i can renew it. Please help me.