How To Automate A Data Into Excel

Dec 1, 2011

how to automate a data from oracle into excel...i have a table "emp" in oracle database now i need colums of emp ex:firstname ,last name, id from that table into excel.

so i need a script which when you schedule it it should create a excel file in particular postion,i was told we have to crete a directory from sql and using utl_file then we have to write a script and then schedule that.out look in excel should be

firstname lastname id
sam douglas 1
john - 2

View 1 Replies


ADVERTISEMENT

Automate Multi User Concurrent Data Loads

Nov 15, 2011

We are designing a three tiered system (client, application/web server, database server) that will allow clients through a web interface to select a text file from the operating system and load that file into a intermediate table (import database table). Many users will do this concurrently and data will load into a single table. The text files come in monthly for about 100 firms. No user is able to insert or update the data of another users data (there is a check out system). Their are about 30 to 40 users that will be using the system doing various functions but it is possible for 10 to 20 users to import data at one time. The files can have anywhere from 2000 to 25000 records at a record length of 398.I am concerned about having a good design strategy as well as decent performance.

Problems with each of the Oracle loaders.

1) External tables - Can not read data text files on the application server(which is where they want the text files to go) secondly you cannot create a instance of a external table. Multiple users will be using the external table to point to different text files and loading at the same time.

2) Sqlloader - is mainly a OS level tool and I am not sure how I could programatically point it to a different text file each time a user wants to load. The client will have to have the ability through code to point sqlloader to the correct file name.

I had a creative approach and was wondering if this would work. I would like to use external tables just like a connection pool. I would propose first a scheduled OS job to move files to the database server. I would create about 20 external tables with 20 different directory objects. Using a stored procedure for the user to call and pass in file name and audit info as needed. I would use a Load lock pool table (my invention) to load the name or a code for the external table in use. The procedure loads this code into my load lock pool table when a external table is in use and deletes the name when the load is completed. The procedure would check through a series of if statements whether a particular external table was in use. If in use (exist in load lock pool table) I would check the next available external table until a external table not in use is encountered. Now potentially 20 users at one time but not likely would be laoding into the same table at one time.My questions

1) Could Oracle handle this strategy? What do I need to consider performance wise with the possibility of so many users loading into a single table at one time?

2) Do any of you maybe have another strategy to do this?

View 8 Replies View Related

PL/SQL :: How To Automate Task Of Dumping Table Data Into CSV File

Apr 25, 2013

I have written a below procedure to dump the table data to .csv file.But the problem is i have 20 tables which is holding 75 studies data. Means every table will have 75 studies related data.what i supposed to do is i need to export the data from 20 tables for each study. but this procedures requires me to run the procedure 75(studies)*20(tables) times. is there any technique instead of i manually giving the table name and study name , will it take from any text file where we defined 75 studies in that. or easy there any better way .

create or replace procedure dump_table_to_csv1(p_tname in varchar2,
p_dir in varchar2,
p_filename in varchar2)
is
l_output utl_file.file_type;
l_theCursor integer default dbms_sql.open_cursor;
[code]........

View 7 Replies View Related

Automate Discoverer 10g R2 With No Interaction?

May 20, 2011

I'm trying to create an install script to install Discoverer 10g R2 with its needed patch and opatches applied without any user interaction. I've already created the necesary response files and a batch file to sequence it. The installer should work when the it is placed on a server with the main folder shared and it does so flawlessly.

the user sees a dos window which is kindly stating that he has to wait for the primary installer to finish before hitting enter to start the patch installer.The problem I'm having is that, on slow networks, it takes a while for the primary installer of discoverer 10g to show up a window and of course the user isn't always patient enough to wait for it and hits enter before the primary installer is showing itself causing the patch installer to start before discoverer is completely installed.

Is there a way to avoid this? Or am I wrong in using a batch file to sequence this install? second problem is the needed interaction while applying opatches, can this be automated as well?

here is the contents of my batch file:

net use x: /delete
net use X: \\servername\Oracle_cd\disco10gr2 /persistent:no
@ECHO off
cls
:start

[code]....

View 12 Replies View Related

SQL & PL/SQL :: Automate Inserts From One Schema To Another

Dec 18, 2012

We have two databases one localdb with user rakdb and another one remotely remotedb with user rakdb .We need to be in sync with data in one table called om_item, where the users are inserting data on daily basis and the user sends us the insert script everday to run it on local databse to insert the new records in local database.I managed to create a file which records all the inserts into one text file in one directory.Can we have a scheduler to pick this text file from the specified folder and send mail using utl_mail.

CREATE TABLE ITEM (IT_CODE VARCHAR2(12),IT_NAME VARCHAR2(20));
INSERT INTO ITEM VALUES ('A','AAA');
CREATE OR REPLACE DIRECTORY MY_DIR AS 'C:TEMP';
CREATE OR REPLACE PROCEDURE it_status

[Code]..

Procedure created.

EXEC it_status
HOST TYPE c: empaaaa.txt
INSERT INTO ITEM (IT_CODE, ITEM_NAME) VALUES ('A','AAA');
COMMIT;

View 4 Replies View Related

Client Tools :: How To Automate The Scripts

Sep 25, 2012

I have a proc created which dynamically creates scripts to be executed, e.g. using DBMS_OUTPUT.PUT_LINE it creates the following scripts to be executed:

EXEC D_Q_TST1('PARAM1','PARAM2','PARAM3');
EXEC D_Q_TST2('PARAM1','PARAM2','PARAM3');
EXEC D_Q_TST3('PARAM1','PARAM2','PARAM3');
EXEC D_Q_TST4('PARAM1','PARAM2','PARAM3');
EXEC D_Q_TST5('PARAM1','PARAM2','PARAM3','PARAM4','PARAM5');

Now, what I am really looking for is to explore options where we can spool the results into a file and run another proc to execute all of these proc through it.

let me know if my request is not clear.

View 10 Replies View Related

SQL & PL/SQL :: Automate The Process Of Updating Sequence?

Jan 18, 2012

I have migrated database from postgresql to oracle...All sequences are migrated with their default values...(Start with 1) I already have 213 entries in a table and I want to begin using this for 214th entry ( replace with "start with 214")

How can I automate the process of updating "Start with" value of sequence with the max no of entry on my table every time I migrate data....

I have created a trigger that will automatically insert the next number from the sequence into the id column.

create trigger test_trigger
before insert on test
for each row
begin
select test_seq.nextval into :new.id from dual;
end;
/

View 2 Replies View Related

Backup & Recovery :: How To Automate TDPOSYNC Utility Using PL/SQL

Apr 16, 2012

I have to automate TDPOSYNC utility, it is a IBM tool for oracle backup.I tried except utility of UNIX in shell script, but due to some reason same utility i could not get on production server.Not i asked to use PL/SQL to automate the same.I am facing some problem

1. How to call TDPOSYNC commands from pl/sql

2. How to pass run time input parameter to the TDPOSYNC like user/password, date rage etc.

View 1 Replies View Related

Automate Import From Production To Test Server

Nov 15, 2011

I would like to know that how can i automate the export from production to test server. I need direction to create process to import data from production (server A) to test server (server B).

View 6 Replies View Related

SQL & PL/SQL :: Automate Locking / Unlocking Of User Accounts

Nov 1, 2011

I have been plagued by people logging into my database and making changes when a clone is in process.. Having said that ,I am looking to lock accounts and unlock them when I am done.

I envision my code looking something like this:

sqlplus -s / <<END
SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF;
set heading off;
spool /tmp/lockusers.sql
select 'alter user ' || username || ' account lock;' from dba_users where username not in (....) and not locked?;
spool off;
END;

sqlplus -s / <<END
@/tmp/lockusers.sql
END;

When it comes time to unlock the accounts I want to be able to unlock those accounts I previously locked and not all of them. Is there a query, I can use that can tell me when the accounts were locked or some other way about going about this so I dont unlock accounts that were locked prior to my lock script running?

View 9 Replies View Related

SQL & PL/SQL :: Extract Data Into Excel

Mar 21, 2012

Data that enter by user in database having " in the sentences
example:

column1
----------
"My Smurf Village

column2
--------
Farmvile

column3
--------
"Testing

My select statement is

Select column1,column2,column3 from table. Output in toad perfect but When I export into excel using pipe | as a separator, the output become

column1 in excel
----------------
My Smurf Village|Farmvile

column2 in excel
---------------
Testing

How I can code my program so that when extract to excel " is recognized as sentences. output are correct as in database?

View 5 Replies View Related

Data To Be Provided Into Excel

Aug 16, 2012

OS:RHEL
DB: 11.2.0.1

My client has asked me to provide production data from a xyz table into excel.The constrain for the same is that he needs the data for a particular month within a specific range of dates.

Is this possible using oracle utilities like SQL developer, plsqldeveloper or toad or any other. If yes i want to know if this is possible without using the same?

View 9 Replies View Related

Load Excel Data To Oracle?

Jul 3, 2008

How can i convert my ms excel record into oracle records??

View 3 Replies View Related

Forms :: Export Data From SQL Plus To MS Excel?

Nov 11, 2010

i have problem with export data from SQL to excel format my question do i can export directly data from sql to excel or i have to write sql statement in form report and from form i can export it to excel

View 7 Replies View Related

Forms :: To Excel Data Transfer

Apr 8, 2010

I found another way to transfer the data from forms to excel apart from doing it through ole2 or client. So thought of sharing it with all...

Here it goes:-

declare
ifile client_text_io.file_type;
temp varchar2(1000);
Cursor c1 is select ename, job from emp;

[Code]....

Attach webutil to form and just paste the code on a button and log on to scott. The excel file will be created in c: drive with name test.

View 5 Replies View Related

SQL & PL/SQL :: Loading Data From Oracle Into Excel

Jul 18, 2012

We have requirement such that whenever stored procedure is executed, their resultant records has to be stored in excel file ( Just like an reports ).No third party tool or reporting tools are used.

is there any option in oracle (Stored procedure or built in packages ) which can create excel file with the resultant records.

View 5 Replies View Related

SQL & PL/SQL :: Excel Data Import Into Oracle?

Jun 25, 2012

how excel data import into oracle

View 1 Replies View Related

SQL & PL/SQL :: How To Load Excel Data Into Oracle

Dec 28, 2010

how to load a XL sheet data into oracleDB.

View 7 Replies View Related

SQL & PL/SQL :: Inserting Excel Data Into Oracle?

Sep 24, 2011

I want to insert excel data into Oracle.

Excel File Name : Product 01
Excel columns
File Send on 13/02/2011

Arrival Date Product Code Gate Pass Quantity Inpection
01/02/2011 00002 Y 2 Y
03/02/2011 00001 Y 10 Y
04/02/2011 00005 Y 14 Y 03/02/2011 00006 Y 74 Y

File Send on 14/02/2011

Arrival Date Product Code Gate Pass Quantity Inpection
01/02/2011 00002 Y 2 Y
03/02/2011 00001 Y 10 Y
04/02/2011 00005 Y 14 Y 03/02/2011 00006 Y 74 Y
---New Updated Data
05/02/2011 00002 Y 2 Y
06/02/2011 00001 Y 10 Y
05/02/2011 00005 Y 14 Y 05/02/2011 00006 Y 74 Y

I just want to insert data according to my structure But if again the same file send with updated data it will only update the new data because previous data is imported.

Oracle Structure
Arrival Date Date,
Product Code char(5),
Quantity Number

View 9 Replies View Related

Forms :: How To Export Data To Excel

Jun 6, 2013

How to export Data to excel oracle forms

View 1 Replies View Related

SQL & PL/SQL :: Reg Data Exporting To Excel From Oracle?

Dec 8, 2010

Now we are having 100+ sql queries and we making all those queries as procedures.after that we want to schedule those procedures and get data to export into excel file.

so we are planning to use utl_file to get data export excel. we may have rows of 30000 above.is it utl_file will be able upload all these rows into excel.any performance issue will come.

View 4 Replies View Related

Forms :: Get Data In Excel Sheet

Jan 11, 2013

I am newbie in Oracle Reporting. I have a requirement to give EXCEL Output from Oracle reports 10g. The rdf which was already existing is giving pdf output. The users were interested in Excel Output and I am facing hard time here.

You can find the attachment for Built in packages I have in the form Builder.

View 5 Replies View Related

Security :: How To Automate Wallet Open Operation In Standby Instance

Dec 14, 2012

My database is 11.1.0.7 and 11.2.0.3 with TDE tablespace encryption, ASM db storage. The wallet needs to be opened for MRP to work in physical standby database. I already have the solution for the primary instances to automate wallet open (e.g. using startup trigger for 11.1.0.7). However, I cannot find solution to automate wallet open operation in standby instances (to issue ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY ""').

Manual operation everytime standby instance is started is not feasible.

View 1 Replies View Related

Export Data To Excel (office 2007 And Above)

Jun 18, 2012

I am trying to export data into excel (office 2007 and above- .xlsx) using the calls mentioned below, but i am getting an error. i am able to upload data and open the document in IE succesfully using office 2003 format(.xls)

The following are the calls made in the package and it works for .xls format

OWA_UTIL.MIME_HEADER('application/vnd.ms-excel');

The following are the calls made in the package and it is not working even thow i can see that the document getting opened .xlsx format

OWA_UTIL.MIME_HEADER('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');

And i alos added the call in the httpd.conf file in Apache/windows server 2003

AddType application/vnd.openxmlformats .docx .pptx .xlsx

View 1 Replies View Related

Spooling Into Excel - Retrieves Data From Different Table

Dec 25, 2010

i have a requirement..i have a script which retrieves data from different table and my requirement is using spool, i need the data from each table to be spooled into different sheets in the same excel sheet.

CODEspool d:\spool\spool1.xls
select * from tab1;
select * from tab2;
select * from tab3;
spool off

in the above code, data from tab1 should be spooled into sheet1 and data from should be spooled into sheet2 and so on.. in the same excel.

View 7 Replies View Related

Client Tools :: Data Export To Excel

Aug 5, 2013

I have a specific requirement. Currently in our system a SQL script is automated trough TOAD DATA ANALYST (Contains 50 sql Select statement) and all the output are stored in a single excel file in multiple worksheet. All these sql statements are running sequentially. Now my requirement is

1) All the sql queries will be executed in database in parallel .
2) All the output of select statement will be stored in a single excel.
3) Idea using any Client but Toad is preferred.

View 1 Replies View Related

SQL & PL/SQL :: How To Export Data To Excel Through Stored Procedure

Aug 1, 2011

CREATE OR replace PROCEDURE T_name_column
AS
file_handle utl_file.file_type;
BEGIN

[Code]....

View 6 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

Reports & Discoverer :: Export Data From RDF To Excel

May 28, 2009

I want to generate the excel output from a RDF.

If I am using the DESFORMAT=DELIMITED then I am getting unformated data and some time I am getting less data as per PDF output.

There are about 25 queries with interrelated way.

How can I get the output in excel from a RDF.

In Reports 6i Functionality was working while we were running reports because of reports were running in Previewer mode but in 10g reports output coming in PDF format.

View 8 Replies View Related

SQL & PL/SQL :: Export Of Table Data To Excel Through Code?

Jan 20, 2012

code for:

Export table data to excel file in Oracle PL/SQL.

View 3 Replies View Related







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