SQL & PL/SQL :: Reading From A Excel File

Dec 1, 2011

I am looking for a code/script to read values from excel file and perform PLSQL script.

Now i have the PLSQL script to generate report which takes two value which i have to change all the time to generate new report .All i wanna do create a script to read from a excel file and perform the other script.

I have been searching from a long time and only found UTL_file Package which use CREATE OR REPLACE FUNCTION and create some virtual table.

The problem is i don't have create authorization in database so i m not able to use UTL_File command . Is there any simple way to read value from excel file?

View 16 Replies


ADVERTISEMENT

Forms :: Reading Data From Excel File And Load Into Form

Oct 25, 2013

I have a Excel File which contains some columns and rows, i need to load that excel into a form and import that form data to Database Table, using DDE Method.

In simple i say; Just to read the excel and load into a form, which can be imported into a table later.

How to achieve this? only dde method.

View 10 Replies View Related

Forms :: Reading Excel Data And Inserting Into Table Using 6i?

Feb 16, 2004

how to read the excel data and insert into tables without using SQL loader. i tried using OLE2 package,but i am getting an non-oracle exception. even i tried using CSV format. but i couldn't make it.

View 3 Replies View Related

SQL & PL/SQL :: Single Excel File For Emp Table Department Wise In Different Sheets Of Excel

Mar 30, 2012

I need to generate a single excel file which each department details in seperate sheets of the excel file, each sheet should ne named with department no (ex :Dept_10, Dept_20,Dept_30) and the main excel should be named as Emp_details.

Header row and total row should be in bold.I have created 3 individual excels thru toad and moved them to single excel and renamed the sheets.

Can we programatically do this thru SQL or PL/SQL, does Oracle provide any build packages for excel.As excel files cannot be uploaded,I am unable to upload the excel file I generated manually.

select to_char(empno) empno,ename,job,mgr,hiredate,
nvl(sal,0) sal,nvl(comm,0) comm,nvl(sal,0) + nvl(comm,0) "Total Income" ,deptno
from emp
where deptno = 10
union all
select 'Total',null,null,null,null,sum(nvl(sal,0)),sum(nvl(comm,0)),sum(nvl(sal,0))+sum(nvl(comm,0)),null
from emp
where deptno = 10;

View 1 Replies View Related

SQL & PL/SQL :: Reading File With UL_FILE?

Jul 8, 2013

I'm trying to utilize the utl file to read a txt file and import the data into a table in Oracle. I've read in various forums and have researched a lot on oracle documentation site and on the internet but can not find the answer to the problem.

The source follows:

Set serveroutput on
DECLARE
arquivo_ler UTL_File.File_Type;
Linha Varchar2 (1000);
BEGIN
arquivo_ler: UTL_FILE.FOPEN = ('INTRANET_LOAD', 'carga_intranet.txt', 'R', 32767);
Loop
UTL_File.Get_Line (arquivo_ler, Linha);
dbms_output.put_line (Linha);
End Loop;
UTL_File.Fclose (arquivo_ler);
DBMS_OUTPUT.PUT_LINE ('File processed with sucesso.');
END;
/

The errors:

ORA-29283: invalid file operation

ORA-06512: at "SYS.UTL_FILE", line 633

ORA-29283: invalid file operation

ORA-06512: at line 5

What has been done:

Created DIRECTORY (INTRANET_LOAD) and given the GRANT read, write to the user

On Linux where Oracle is installed, was given full access to the Oracle user folder: / u01/app/oracle/product/11.2.0/db_1/adp

When writing the query;

SELECT *

FROM ALL_TAB_PRIVS

WHERE table_name = 'INTRANET_LOAD';

The data are returned.

1 FOLLOW INTRANET INTRANET_LOAD SYS READ NO NO

2 FOLLOW INTRANET IN NO WRITE SYS INTRANET_LOAD

View 10 Replies View Related

SQL & PL/SQL :: Reading Doc File Stored In Database

Jun 8, 2011

A doc file stored in a database having data type blob. To read this file I have written Following procedure

create or replace procedure XX_read_blobfile1 as
b blob;
c clob;
n number;
begin
SELECT file_data INTO b FROM fnd_lobs WHERE file_id = 322420;
if (b is null) then
[code]......

With the data displaying some boxes before and after data

View 11 Replies View Related

SQL & PL/SQL :: Reading Flat File With Header?

Jul 3, 2012

working on loading the data from flat file into table and below given is the validation condition given.I checked the UTL_FILE build in package but not able to figure out, how to identify the column header in flat file.

1. Skip the header, if any. The header is the first record, and starts with '000'
2. Skip the trailer, if any. The Trailer is the last record, and starts with '999'
3. Log an error, but continue if a line exceeds 512 characters
4. Log an error, but continue if a line is blank

View 5 Replies View Related

Reading Specific Line In Util File

Jul 1, 2013

I would like to read specific line in the file in the util file.

View 1 Replies View Related

Forms :: Reading And Writing Data In A Text File

Mar 8, 2011

I need to read data from text file(located on application or db server or on some other server, however path is known to me.) and then append some data in it.

Data will be read and written on daily basis so i want to clear all data on date change.

View 3 Replies View Related

Forms :: Import CSV Directly Into D2kwutil / Reading From File?

Jan 29, 2008

I know that this topic in not new, but maybe my case is a bit different than common.My form has multi-record block (4 columns) in which i want to upload CSV file.

The form will have "Browse..." button to piont CSV file (on local users disc, not where Forms server resides) after pointing the CSV file, user will press UPLOAD button which will import CSV data into block. After that data is visible in block. But whole form must not be refreshed.

I'm studying about UTL_FILE package, but it seems it allows manipulating files on server not local user's machines. Do Forms have such "Browse... -> UPLOAD" possibility or I need to learn Java and create Java funcionality inside Forms?

Or it is impossible to load data directly into form? (I have to use SQLoader and load data into temp table then into block on form????)

View 7 Replies View Related

SQL & PL/SQL :: Ftp File To Remote Server By Reading Data From Table?

May 1, 2012

I need a way to ftp file to remote server by reading data from table. I searched a couple of sites which asked me to use Chris xutl_ftp package..but unfortunately the site is no accessible..

Here is the code

CREATE OR REPLACE PACKAGE UTL_FTP
AUTHID CURRENT_USER
AS
/**
* LICENSE: GNU Lesser General Public License (LGPL)
* Copyright (C) 2003-2006 Russ Johnson (john_2885@yahoo.com)

[code].....

View 3 Replies View Related

Forms :: Slow Performance Using OLE2 Reading Xls File

Oct 10, 2011

I just trying to import some informations from excel to Oracle using OLE2 over Oracle Forms 6i, but It´s very slow when I have import under then 10k lines. anything to optimize that ? Follow the code used...

application OLE2.Obj_Type;
workbooks OLE2.Obj_Type;
workbook OLE2.Obj_Type;

[Code]....

View 2 Replies View Related

Backup & Recovery :: ORA-01115 - IO Error Reading Block From File 11?

May 17, 2013

During the scheduled backup we observed that, backup got failed. Error is "ORA-01115: IO error reading block from file 11 (block # 118736)
".
unable to rectify it. Below are the part of log file -

ORA-39126: Worker unexpected fatal error in KUPW$WORKER.MAIN [TABLE_DATA:"DW_REP"."DW_MOTOR_CLAIM_INFO_DTLS"]
ORA-24795: Illegal ROLLBACK attempt made
ORA-06512: at "SYS.KUPW$WORKER", line 8976
ORA-24795: Illegal ROLLBACK attempt made

[code]...

This is development server. Dont have RMAN configured.But when we connected to RMAN and issued block recovery, it started process and shows media recovery done. Since no RMAN backup was taken before, what it does here?

C:UsersAdministrator>RMAN
Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 17 10:48:40 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> CONECT target /
connected to target database: MAGMADEV (DBID=2469200049)

[code]...

how to resolve this problem?

View 6 Replies View Related

Forms :: D2k 6i And Excel File?

Jun 23, 2010

I have generate a excel file through oracle developer 2000 6iwith password protect using OLE2 but autofilter,sort and format column options are not working.

PROCEDURE UnProtectCell(r NUMBER,c NUMBER) IS
BEGIN
args:= ole2.create_arglist;
ole2.add_arg(args, NumToRange(r, c));
XLRange:= ole2.get_obj_property worksheet, 'Range', args); ole2.destroy_arglist(args);

[code]...

View 6 Replies View Related

SQL & PL/SQL :: Excel File Can't Open

Aug 17, 2010

im sending email with attachment of report output in xml format. file was attached but cant opened.

it show me error at the time of opening that

XML ERROR in Unknown
REASON: Illegal Tag
FILE: C:Documents and SettingsTxisDesktopAR_AGING_DETAILS_1186958_1(3).XML
VALUE: ?B/to{??C

i face this problem when i send mail on yahoo and from outlook. but it opened in gmail, from incredimail

View 1 Replies View Related

SQL & PL/SQL :: Import Excel File To Table

Jan 10, 2013

I have two columns in excel which i need to import in oracle table , but the problem is one column is of type date , i want the same date format to be maintained in table too.

View 8 Replies View Related

SQL & PL/SQL :: Convert Excel File Into Text?

Aug 2, 2010

i want to convert an excel file into text and then into oracle table.

View 6 Replies View Related

SQL & PL/SQL :: Procedure To Convert Excel File To XML?

Mar 21, 2012

I need a PL/SQL code to convert an excel file to xml file.

View 3 Replies View Related

SQL & PL/SQL :: Image In XML To Generate Excel File

Jul 8, 2010

how to attach an IMAGE in XML and that will be used in PL SQL procedure to generate the Excel file with the IMAGE. I cannot able to save the xml as excel with the image

View 3 Replies View Related

SQL & PL/SQL :: Export BLOB File In Excel?

Dec 5, 2012

I want to export the data from oracle with BLOB column in excel file.

BLOB file contains the Image (jpg)

View 5 Replies View Related

Forms :: How To Generate Excel File

Jun 12, 2012

I want to gerate the excel(Office 2010)file using oracle forms 6i. How we can achieve this with forms 6i?

View 4 Replies View Related

SQL & PL/SQL :: Create Report In Excel File?

Dec 22, 2010

I want to create a excel report by joining 2 tables.

Is there any stabdard package which i can use for creating this report.

View 3 Replies View Related

Forms :: How To Export Data In 10g To Excel File

Mar 15, 2011

I need the code to export the data from the form to the excel directly.

View 1 Replies View Related

Forms :: Uploading An Excel File Using Webutil In AIX

Apr 18, 2013

When i am uploading data in an excel file to my Forms(Windows) the screen works fine but when i am uploading the same excel file to my forms in AIX(Where the application is running) the data is uploaded with decimal points.

The field is a char type and no format mask is set.

E.g. :
Actual data: In Form(Windows) In Form (AIX)
4080026 4080026 4080026.0

View 5 Replies View Related

Forms :: Data Export To Excel File

Jul 14, 2009

i want to add one button in the form like "save as" and save the displayed data into excel file.

View 20 Replies View Related

SQL & PL/SQL :: Read Excel File Using UTL_FILE Package

Jul 23, 2010

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
"CORE 11.1.0.6.0 Production"

Is there a way to read Excel file using UTL_FILE package ?

Like our usual method:
l_utlfile := utl_file.fopen(p_dir, p_filename, 'R',2000);
p_filename is event.xls

Or do we need to convert that file to .csv or .txt ?

View 5 Replies View Related

Forms :: Uploading Excel File Using Webutil In AIX

May 28, 2013

When i am uploading data in an excel file to my Forms(Windows) the screen works fine . But when i am uploading the same excel file to my forms in AIX(Where the application is running) the data is wrongly uploaded . The field is a number type and no format mask is set.

E.g. :
Actual data:---------- In Form(Windows)------In Form (AIX)
3101513480750030000 3101513480750030000 3101513480750029800

I am using below code to copy the value

cell_value :=Client_OLE2.get_num_property(cell, 'Value');
COPY(cell_value,'data.field'||k);

View 3 Replies View Related

Forms :: OLE2 Updating Excel File From 6i

Dec 12, 2011

I am using OLE2 to update an excel spreadsheet from Oracle Forms 6i. If the excel spreadsheet is already open, the code runs through fine, and even asks if you want to replace the file when running the lines: OLE2.INVOKE(worksheet, 'Save');

OLE2.INVOKE(workbook, 'Save');

However, the file never gets updated. There is no error that appears. I would like to have the program check if the file is open before running the program;

View 1 Replies View Related

Forms :: Unable To Read Excel File?

Nov 1, 2011

I am trying to create excel file thru form....in form i create button Excel

WHEN -BUTTON - PRESSED :

Quote:
DECLARE
CURSOR C1 IS
SELECT DEPTNO,DNAME,LOC FROM DEPT;
filename varchAr2(256);

[Code].....

My excel file opened but it shows unable to read file

My excel version is 2003..

View 6 Replies View Related

PL/SQL :: Oracle Query Export Into Excel File

May 29, 2013

How can i automatically export oracle query result into the excel file in oracle?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved