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
Thanks
Try 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
Similar Messages
-
How to get Mountain Lion Spotlight to find text in CSV files?
Does anyone know how to get Mountain Lion Spotlight to find text in CSV Files? Spotlight worked flawlessly with Snow Leopard on my last MAC but with Mountain Lion it doesn't recognize CSV Files. I have researched this extensively and haven't found any solution but I really believe there must be many others who have the same problem. I even contacted Apple's Genius Bar which was of no help whatsoever, they couldn't even tell me why Spotlight wasn't finding text in CSV Files, i.e., function dropped by Apple, bug, etc.
Thru research I found that if the CSV Files are converted to 'Plain Text Files' Spotlight will find text inside of the files but I typically save my spreadsheets as CSV Files and don't want to have to convert them to Plain Text Files just so Spotlight will search them.
I appreciate any help you can give.
JoelI should have mentioned earlier that I do NOT have any exclusions set under the Spotlight Privacy tab, however, I did move one of the folders that contains CSV Files in then back out of the Privacy tab to try and get Spotlight to index the folder, but to no avail.
I have a second Admin account and tried to find text in CSV Files while in that account, again to no avail. I also tried upgrading to Mountain Lion 10.8.4 to see if it might fix the problem, but no soap.
Below is a screenshot of the Systems Preferences/Library/Spotlight/RichText.mdimporter/ file and I don't even see where Spotlight is setup to find CSV Files on my computer, very confusing but thanks again for your input. -
How to export the result from executing sql statement to excel file ?
HI all,
Great with Oracle SQL Developer, but I have have a trouble as follwing :
I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
anyone can help me to do that ? Thanks so much
SigmasvnHello Sue,
I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
AddVMOption -Duser.language=en
AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
Regards
Marcus -
How to get Query Results based on Analysis Authorization Ranges????
Hi Experts,
I have gone through the lot of SDN Links, however not able to find the answer to my question.
I have an Authorization Issue, NO Authorization
Error : EYE 007 ( Insufficient Authorizations )
<b>Here is the issue:</b>
Need to see the complete query result when I gave the range in Analysis Authorization for Controlling Area 001-005. Controlling Area is auth relevant and right now a variable is inserted in the query for it. If I select Controlling Area 001, the result for Controlling Area 001 is displayed in query. If 002 then also displayed. If I do not enter anything, then I get the <b>Eye 007 error message</b>.
I am not sure how do I display/authorize the entire result in the query for all the Controlling Areas, I have authorized user to see??
<b>Its really urgent, please help..!</b>
Here are the logs:
Authorization Check Log
Date and Execution Time (Local Server)
Execution Date: 06.09.2007
Execution Time: 14:48:41
Executed Query: 0CCA_C11/GBCCA_MP01_Q0002_AP
Executed by User ZBI_TEST_001
Executed with Analysis Authorizations of Another User ZBI_TEST_001
InfoProvider Check
Building the Buffer...
...Buffer Built
Are there authorizations for accessing InfoProvider 0CCA_C11 with activity 03?
Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03
InfoProvider Check
Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03
Relevant Characteristics for Detailed Authorization Check
(Characteristics with Full Authorization Are Not Listed!)
List of Effective Authorization-Relevant Characteristics for InfoProvider 0CCA_C11:
0CO_AREA
0TCAACTVT
Relevant Characteristics for Detailed Authorization Check
(Characteristics with Full Authorization Are Not Listed!)
List of Effective Authorization-Relevant Characteristics for InfoProvider :
List Is Empty:
There Are No Characteristics That Have to Be Checked in Detail
Authorization Check
Detail Check for InfoProvider 0CCA_C11
Preprocessing:
Selection Checked for Consistency, Preprocessed and Supplemented As Needed
Subselection (Technical SUBNR) 1
Check Node Definitions and Value Authorizations...
Node- and Value Authorizations Are OK
End of Preprocessing
Filling the Buffer...
...Buffer Filled
Main Check:
Subselection (Technical SUBNR) 1
Supplementation of Selection for Aggregated Characteristics
No Check for Aggregation Authorization Required
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
CO_AREA = '0003'
AND TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Authorized
Subselection (SUBNR) Is Authorized
Authorization Check Complete
Authorization Check
Detail Check for InfoProvider 0CCA_C11
Preprocessing:
Selection Checked for Consistency, Preprocessed and Supplemented As Needed
Subselection (Technical SUBNR) 1
Check Node Definitions and Value Authorizations...
Node- and Value Authorizations Are OK
End of Preprocessing
Filling the Buffer...
...Buffer Filled
Main Check:
Subselection (Technical SUBNR) 1
Supplementation of Selection for Aggregated Characteristics
No Check for Aggregation Authorization Required
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Partially or Fully Authorized (Intersection) Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
( CO_AREA < '0001'
OR CO_AREA > '0005' )
AND TCAACTVT = '03'
Value selection partially authorized. Check of remainder at end
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
( CO_AREA < '0001'
OR CO_AREA > '0005' )
AND TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Not Authorized
All Authorizations Tested
Message EYE007: You do not have sufficient authorization
No Sufficient Authorization for This Subselection (SUBNR)
Following CHANMIDs Are Affected:
184 ( 0CO_AREA )
Authorization Check CompleteHi,
Have you defined the vaule for 0CO_AREA as BT 001-005 in you Authorization for 0CO_AREA.Also how have you defined your Authorization Variable on the query? Have you define as select options or interval? I thing you need to define it as interval or select options.
Hope it helps,
Cheers,
Balaji -
How to - extract query result set in CSV and make multiple files if result set is huge.
I have a query which returns millions of rows. I need to extract those rows in CSV files. Having said that i want to keep these files under a limit of 500 MB . Result set can be distributed among multiples files but each file can not be > 500 MB in size.
How to achieve this?You may use this standard! procedure from Blushadow and produce something useful for your need. https://community.oracle.com/message/6499123#6499123
-
Af:query - How to get the result rowsets
Hi,
I have a requirement where i need to search the db rows on and append the results the adf rich table on each search.
For this i am using af:query component. And trying to get the result rows for the named criteria.
String mexpr = "#{bindings.DestinDescVOCriteriaQuery.processQuery}";
processMethodExpression(mexpr, queryEvent, QueryEvent.class);
ViewCriteriaManager vcm = getDestinDescViewObj().getViewCriteriaManager();
ViewCriteria vc = vcm.getViewCriteria("DestinDescVOCriteria");
getDestinDescViewObj().applyViewCriteria(vc);
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(tblDestinDesc);
However on each click of search the rows searched in the previous attempt are not retained.
Can anyone let me know how to get the result from named criteria and append it the table?
Thanks
AjayCan anyone help?
-
How to get the results for given Bind Variable
Hi
Can any one help me how to get the result rows from the View Object after executing the view object query by setting bind variable?
snippet as follows
viewObject.setNamedWherClauseParams("name","hei");
viewObject.executeQuery();
How to get the results from viewObject is my question..?
Thanks in advanceShould be something like
while (vo.hasNext()){
Row r = vo.next();
r.getAttribute....
You might want to read the "most commonly used methods" appendix in the ADF Developer Guide. -
Call function in background task... How to get the result?
I want to use Call function in background task parameter.
But I cannot find the result of this function. (No export parameter, no table result, no exception)
How to get the result of this function module? Correct or not?Hi Heinz,
You can check the result in SM58 transaction.
For more information pls. refer this thread :
No IMPORTING parameters allowed in CALL FUNCTION IN BACKGROUND TASK
Best regards,
Prashant -
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 get query execution time without running...?
Hi ,
I had one requirement .... as follows ......
i had 3 sql statements . I need to execute only one sql which execution time is very less.
Can any one help me , how to get query execution time without running that query and without using explain plan..?
Thanks,
RajeshKim Berg Hansen wrote:
But you have ruled out explain plan for some reason, so I cannot help you.OP might get some answers if query was executed before - but since restart. Check V$SQL dynamic performance view for SQL_TEXT = your query. Then ROUND(ELAPSED_TIME / EXECUTIONS / 1000000) will give you average elapsed time.
SY.
Edited by: Solomon Yakobson on Apr 3, 2012 8:44 AM -
how can i do with labview program,when i have 20 different values,and 1 want to add it with constant value.and how to get the results?
Why do the 20 values have to be different? The same code should work even if some are equal.
What do you mean by "get the result"? The result is available at the output terminal and all you need is a wire to get it where you need it. That could be an indicator, another operation, or even a hardware device.
What is the data type of the 20 values? An array? A cluster? A bunch of scalars? A waveform? Dynamic data?
LabVIEW Champion . Do more with less code and in less time . -
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. -
Query result in application server as a .CSV file
HI
Can any one tel me how can i place the query result in application server as a .CSV file.
when am executing WRITEQUERY program it asking query name and displaying result in excel sheet, i don't what is next step to keep file in app server.
read writequery prog,it is genrated in excel sheet, now i need to send that data to application server path in csv format
actually i am not able to get the internal table in writequry where the query data is stored.
please provide me the sample code i can understand. plz.
plz do favour for me, take this high priority and asap.
Thanks a lotHI,
Actually i don't want how to create abap querey,
My requirment is, WRITEQUERY program wherenever we r excuting it vil display qurery data in excel format,
now i don't want any excel format display, I need that data, should go to application server in .CSV format.
Actually i am not understanding writequere program, in that which internal table i have to pass application server.
PLz give me reply anyone
Help me out . -
How to get string (specified by line and column) from txt file with labview
Hi everyone
How to get string (specified by line and column) from txt file with labview
thx
Solved!
Go to Solution.As far as I know, a text file has no columns. Please be more specific. Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character? You could the Read from Spreadsheet String function and set the delimiter to a space. This will produce a 2D array of strings. Then use index array and give the line number and column number.
- tbob
Inventor of the WORM Global
Maybe you are looking for
-
[b]Does anybody know what is wrong with my code[/b]
I cannot see what is wrong with this code but i can't get it to compile. when i try to compile it i get the "Exception in thread "main" java.lang.NoClassDefFoundError: Is this a problem with compiling or is it a code error? Here is my code public cla
-
I Can't Open a ".fla" File
I was sent a flash file via email and now I cant open it. My computer is asking for an application to open it. What do I do? It was probably created on a pc. Thanks in advance! Message was edited by: DJ FROM CALI
-
Getting .php files(output)with java
i'm trying to get he contenty of a php file, but i don't receive anything with .html files it works great kan someone help me, please import java.io.*; import java.net.*; import java.util.Date; class URLConnecties public static void main(String a
-
Suddenly fla will not render to swf; freeze; CS3
I have been making swf's for a long time, but suddenly today, my last one for a project, it will not render, and program freezes solid. What should I do? The fla seems ok. preview in html will not work. Restarts and permissions did not work. AS 2.
-
Laptop Crashes when resuming from sleep
Hi I am running a Macbook Pro with retina display. OS X 10.8.3 - Mountain Lion. Model Name: MacBook Pro Model Identifier: MacBookPro10,1 Processor Name: Intel Core i7 Processor Speed: 2,3 GHz Number of Pr