How to export query results automatically each time to a saved path
Hello,
Does anyone know if it's possible to save an "export pathway" in your query, so that whenever you run that query, the data are automatically exported to a specific pathway and filename? This would be great compared to the manual method of having to right-click in the data, selecting export and then drilling to the pathway and filename each time. I have looked thru the menus and help, but cannot seem to find out how to do this, or if this is even a feature of the software. Thanks in advance!
Not really, but previous used paths should be remembered as shortcuts on the left of the dialog... aren't they?
Also make sure you have set the Preferences - Database - Select default path to store export in.
Have fun,
K.
Similar Messages
-
How can I export query results from sqlplus on the command line? Are there ways to specify the format such as CSV, TAB, XML, etc?
I've seen one approach that involves creating a shell script and piping the output to a file:
#!/bin/sh
sqlplus user/password <<__EOF__
set heading off;
set newpage none;
select f1, ',', f2, ',', f3 from some_table;
__EOF__
Then pipe the output to a file. Is there a simpler solution to this?http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:235814350980
-
How can I get Firefox to open automatically each time I turn on computer?
How to get Firefox to open automatically each time I turn on computer.
You can place a shortcut to the Firefox program in the Startup folder in "Start > Programs" by dragging the Firefox shortcut from the desktop or by dragging the Firefox entry in "Start > Programs > Mozilla Firefox" to that folder (or use Copy/Paste to achieve this).
-
Exporting Query Result to OpenOffice
Hello,
We would like to export Query Result from Web Application to a file which could be opened in OpenOffice.
Exporting data in XLS format doesn't work because XLS file is created with MS VML Markup with couln't be read by OpenOffice.
Does someone already deals with this kind of issue ?
How do you overcome this problem ?
Thanks in advance for your answer
LaurentHi Laurent,
Can you try saving the file in .csv.
ad try opening it in openoffice.
Hope this helps
PV -
Export query results to excel from forms
Are there any ways to export query results to MS Excel format files from a form.
Thanks.Here's my working code out of one of my forms that does this:
PROCEDURE export_transactions_to_excel IS
-- Declare the ole objects
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_Type;
worksheet ole2.obj_type;
cell ole2.obj_type;
-- my variables
rowCounter Number := 1;
local_cursor_Record number := :System.Cursor_Record;
old_cursor_Style varchar2(100);
errors_occurred boolean := false;
Ole_Error Exception;
pragma exception_init( Ole_Error, -305500 );
my_alert_id ALERT;
alert_response NUMBER;
procedure place_value_in_cell( rownum_in in number
, colnum_in in number
, value_in in varchar2 )
is
-- Declare handles to OLE argument lists
args ole2.list_Type;
begin
args := ole2.create_arglist;
ole2.add_arg(args, rownum_in); /* row number */
ole2.add_arg(args, colnum_in); /* column number */
-- the next line is for excel97
-- cell := ole2.invoke_obj( worksheet, 'Cells', args );
cell := ole2.get_obj_property( worksheet, 'Cells', args );
ole2.Destroy_arglist( args );
ole2.set_property( cell, 'Value', value_in );
ole2.release_obj (cell);
end place_value_in_cell;
procedure SaveSpreadsheet
is
args ole2.List_Type;
vDateStamp varchar2(20);
begin
vDateStamp := to_char(sysdate,'mmddyyyy') | | '_' | | to_char(sysdate,'hh24miss');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'C:\PAPRETCC_' | | vDateStamp | | '.XLS');
OLE2.INVOKE(worksheet, 'SaveAs', args);
OLE2.DESTROY_ARGLIST(args);
--args := Ole2.Create_ARgList;
ole2.invoke( application, 'Quit' );
end SaveSpreadSheet;
procedure Open_EXCEL_Workbook is
Begin
application := ole2.create_obj('Excel.Application');
--ole2.set_property( application, 'Visible', 'True' );
-- Return object handle to the Workbooks collection
workbooks := ole2.get_obj_property( application, 'Workbooks' ); -- invoke_obj w/ excel 97
-- Add a new Workbook object to the Workbooks collection
workbook := ole2.invoke_obj( workbooks, 'Add' );
-- return object handle to the Worksheets collection for the
-- Workbook
worksheets := ole2.get_obj_property( workbook, 'Worksheets' ); -- invoke_obj w/ Excel97
-- Add a new Worksheet to the Worksheets collection
worksheet := ole2.invoke_obj( worksheets, 'Add');
end open_EXCEL_workbook;
PROCEDURE Write_Column_Headers IS
BEGIN
place_value_in_cell(rowCounter,1, 'Payer Name');
place_Value_in_cell(rowCounter,2, 'Payer Address');
place_value_in_cell(rowCounter,3, 'SSN');
place_value_in_cell(rowCounter,4, 'Account');
place_value_in_cell(rowCounter,5, 'Refund Receipt');
place_value_in_cell(rowCounter,6, 'Pretax Allocation');
place_value_in_cell(rowCounter,7, 'Tax Allocation');
place_value_in_cell(rowCounter,8, 'Total Amount');
place_value_in_cell(rowCounter,9, 'Orig Receipt');
place_value_in_cell(rowCounter,10,'Orig Date');
place_value_in_cell(rowCounter,11,'TR Number');
place_value_in_Cell(rowCounter,12,'Date');
place_Value_in_cell(rowCounter,13,'Status');
place_value_in_cell(rowCounter,14,'Vt Number');
rowCounter := rowCounter + 1;
END Write_Column_Headers;
PROCEDURE Export_The_Data IS
original_receipt number;
original_date DATE;
original_transmittal_number number;
BEGIN
-- Return object handle to cell A1 on the Worksheet
Go_block('Transactions');
First_Record;
LOOP
IF alert_response = ALERT_BUTTON2 or
(alert_response = ALERT_BUTTON1 and nvl(:transactions.rg_approval,'N') <> 'N' )
-- :system.record_status = 'CHANGED')
then
place_value_in_cell( rowCounter, 1, :TRANSACTIONS.NDB_PAYEE_NAME );
place_value_in_cell( rowCounter, 2, nvl(:TRANSACTIONS.NDB_PAYEE_ADDRESS,'unknown') );
place_value_in_cell( rowCounter, 3, nvl(:TRANSACTIONS.NDB_SSN,'unknown') );
place_value_in_cell( rowCounter, 4, :transactions.NDB_DESCRIPTION );
place_value_in_cell( rowCounter, 5, to_char(:Transactions.transaction_group_EID) );
place_Value_in_cell( rowCounter, 6, to_char(:transactions.ndb_pretax_amount) ); -- chg
place_ value_in_Cell( rowCounter, 7, to_char(:transactions.ndb_tax_amount) );
place_value_in_cell( rowCounter, 8, to_char(:transactions.amount_including_taxes) );
original_receipt := revenue_pkg.original_receipt_number(
:transactions.transaction_group_eid,
:transactions.allocation_eid,
:transactions.allocation_table );
original_date := revenue_pkg.original_receipt_date(
:transactions.transaction_group_eid,
:transactions.allocation_eid,
:transactions.allocation_table );
original_transmittal_number := revenue_pkg.transmittal_number_for_receipt(original_receipt);
place_value_in_cell( rowCounter, 9, nvl(to_char(original_receipt),'unknown') );
place_value_in_cell( rowCounter, 10, nvl(to_char(original_date,'mm/dd/yyyy hh24:mi:ss'),'unknown') );
place_value_in_cell( rowCounter, 11, nvl(to_char(original_transmittal_number),'unknown') );
-- COMPTROLLER COLUMNS
IF ( alert_response = ALERT_BUTTON1 and nvl(:transactions.rg_approval,'N') <> 'N' )
THEN
place_value_in_cell( rowCounter, 12, to_Char(sysdate,'mm/dd/yyyy') );
place_value_in_cell( rowCounter, 13, nvl(:transactions.rg_approval,'N') );
place_value_in_cell( rowCounter, 14, nvl(to_char(:location.vt_number),'NULL') );
END IF;
End If;
exit when :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
rowCounter := rowCounter + 1;
END LOOP;
END Export_The_Data;
/* ----------------------------------- main procedure --------------------------------------*/
BEGIN
Begin
my_alert_id := Find_Alert('THREE_BUTTON_ALERT');
IF NOT ID_NULL( my_alert_id ) then
alert_Response := SHOW_ALERT( my_alert_id );
If (alert_response = ALERT_BUTTON1) OR
(alert_response = ALERT_BUTTON2) then
old_Cursor_style := get_application_property( CURSOR_STYLE );
set_application_property( CURSOR_STYLE, 'BUSY' );
Open_EXCEL_WorkBook;
Write_Column_Headers;
Export_The_Data;
Else
Raise Form_Trigger_Failure;
End If;
Else
Raise Form_Trigger_Failure;
End If;
exception
when Form_Trigger_Failure then
RAISE;
when Ole_Error then
AlertSend( 'There was an error exporting the data to Microsoft Excel (receipt# ' | |
to_Char(:transactions.transaction_Group_eid) | | ')', false );
errors_occurred := TRUE;
when others then
AlertSend( SQLERRM, false );
errors_occurred := TRUE;
End;
Ideally, I'd like to call SaveSpreadsheet in Export_The_Data, and just ExitExcel here,
but it prompts for whether to save the changes and I don't know how to get around that
right now. SO, we just save and exit, regardless.
SaveSpreadSheet;
-- Release the OLE objects
ole2.release_obj (worksheet);
ole2.release_obj (worksheets);
ole2.release_obj (workbook);
ole2.release_obj (workbooks);
ole2.release_obj (application);
IF NOT errors_occurred then -- stay on the record that caused the error
Go_Record( local_cursor_Record );
End If;
Set_Application_Property ( CURSOR_STYLE, old_cursor_style );
EXCEPTION
When Form_Trigger_Failure then
null;
When Others then
AlertSend( SQLERRM );
END export_transactions_to_excel; -
How to get query result in comma dilimited text or excel file?
Does anybody know how to get query results in comma delimited
text file or excel file, I tried spool abc.txt, but the result
showed some ------ lines
ThanksTry doing this in your sql scripts
set heading off
set pagesize 0
set linesize 4000
set feedback off
set verify off
set trimespace on
set colsep ","
spool output.txt
select * from dual (or whatever you are querying
spool off
There may be a couple other set statement that you could add but
this should get you started in the right direction -
Just purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd. Each time I put in a cd it just ejects it again.Can anyone help.
USB is rarely bootable under Mac OS X and PowerPC Macs. Get a Firewire Superdrive from http://www.macsales.com/ if your intent is to boot the machine. PPC, which is PowerPC, indicates the Mac predates 2006.
-
How to export the result to excel or txt as the SQL result format.
Hello,
I want to know how to export the result of the Oracle select result to a txt or a excel file.What is the command.
I knew the command of spool,but the format of it export is not the same to the result of Oracle result area.
Thank you very much.Hello Yucky,
what do you mean by
the format of it export is not the same to the result of Oracle result areaDo you mean the output of a tool other than SQL*PLUS?
To enhance the formatting of a spool file you can set
SET MARKUP HTML ON
SPOOL ONthis will add html markup to format the output as a html table which you can open in a browser or in excel.
Regards
Marcus -
How to display query result in seperated page.
How to display query result in seperated page, if the results are very big (more than 5000 records) and there are so many concurrent users (about 500 - 1000 users).
Are there any solutions or frameworks?
Plese help me .........
thanks,
--bhasinHi,
How to display query result in seperated page?I think RowSet will be the better technology to use in this
situation.For more information on this please visit http://developer.java.sun.com/developer/Books/JDBCTutorial/chapter5.html
which explains in detail about RowSets.
Hope this helps.
Good Luck.
Gayam.Srinivasa Reddy
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support/ -
How to save query result in excel file
Hi all,
How to save query result in excel file from sql*plus tool.
thank youDo you really need an Excel file (binary) or a simple CSV?
If you just need a CSV then search for DUMP_CSV at http://asktom.oracle.com or at this forum
If you need formatting and/or multiple worksheets then you can use free tools like
https://xml-spreadsheet.samplecode.oracle.com/ or https://exceldocumenttype.samplecode.oracle.com/
Regards
Marcus -
How to stop iPhoto from opening each time I add a photo using Yosemite
How to stop iPhoto from opening each time I add a photo using Yosemite
Add image to iPhoto Library
From where. I don't think you can keep it mininmized when importing because if it runs into a duplicate it will present a warning window for you to make a decision in. Therefore, it will always be open when importing.
You can send a feature request to Apple via http://www.apple.com/feedback/iphoto.html. -
How to return query result in procedure
Hi all,
Can anyone tell me how to return query result in pl/slq procedure using out .
thank you
regards
P PrakashProcedure for sys_refcursor:
create or replace procedure ptest(c out sys_refcursor) is
begin
open c for select * from dual;
end;Procedure for collections(although sys.ODCIVarchar2List is varray, same example you can use with "table of")
create or replace procedure ptest2(c out sys.odcivarchar2list) is
begin
select dummy
bulk collect into c
from dual;
end;Example:
declare
c sys_refcursor;
v varchar2(100);
vt sys.odcivarchar2list;
begin
ptest(c);
fetch c into v;
dbms_output.put_line('1.Cursor data: '||v);
ptest2(vt);
dbms_output.put_line('2.Collection data: '||vt(1));
end;Regards,
Sayan M. -
how do i update podcasts on my computer? they used to put current versions each time i opened I tunes
You don't update itunes on your phone, you update itunes on your computer.
-
How to store the result with a time are using?
Hi,
I'm using the adobe captivate 5.5 to create the Visual Aid Project.
What i want to ask in captivate 5.5 is :
Q1. How to record and store the time are using in each slide. ( Record down how long need to take by user to complete one slide)
Q2. How to create the file above (Q1), and save it in computer. ( For review purpose)
The purpose for this project is record down how long(time) are need to complete for each Slide. Besides, this project will store the result in computer hardisk and for review purpose.
Example :
Slide
Time Used (in sec)
Slide 1
10 sec
Slide 2
5 sec
Slide 3
20 sec
Slide 4
5 sec
Slide 5
30 sec
Total Time
70 sec
Thanks,
Regards,
ShenHello,
It is possible to store the time in user variables. How to export those variables depends on the deployment of the file.
Some information about showing elapsed time can perhaps give you a start:
Display Time Information
Lilybiri -
About exporting query result to excel
Hi all,
I take the report result to an excel file and at this point I am being asked for my user name and password of BW login, repeatedly for many times, based on the amount of data it contains. Its quite irritating, as i need to fill that each time, it asks for that. So kindly suggest me, how to deal with this.
Regards,
Naveen.AHi Naveen,
Not sure that understood what you exactly meant. But will try to help. When you execute query in BEx you can save a workbook detaching it from a server. In this case all reporting information will be kept without further updating from a server. The client will just open the wb and see all information. Certainly, he will not be able to make drilldowns. But for this you save your wb as a view with all drildowns already done.
Best regards,
Eugene
Maybe you are looking for
-
Error message when Closing PS CS6
I keep receiving a error message when closing PS CS6 which says "Adobe Media Core CS6 has stopped working" What can I do to resolve this issue? I'm running Windows Vista professional
-
Open in new tab lists site in new tab but displaysd a blank page version 5
New install of version 5. Home page opens ok (Google Australia) and I can run search ok. When I select a site to explore and use the open in new tab option (right click) the new tab appears and seems to run the load process. The tab displays the chos
-
Mac 5.1 Audio HDMI In Premiere wrong channels
Hello I'm trying to create a simple 5.1 mix and running into issues. I'm simply creating a new sequence and choosing 5.1 from the Tracks tab and from there I can drag a WAV onto either a stereo or mono track and in the mixer move the puck within the
-
How can I delete a broken table?
Hi, I´m still a oracle-noob, hope somebody can help me. Last night the optimizer hanged on a single table, so I killed the optimizer-process. After that I checked the table where the optimizer hangs... The result was, that I can't make a query, and c
-
Failed to Verify License File Digital Signature
We are trying test our license file with our add-on identifier as provided by SAP. We keep getting a different error each time. Now we are getting "failed to verify license file digital signature" After we did the name substitutions in our license f