oracle sql 开发人员正在截断我的结果
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2602683/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
oracle sql developer is truncating my results
提问by nont
I'm calling a stored function like this:
我正在调用这样的存储函数:
select XML_INVOICE.GENERATE_XML_DOC('84200006823') from dual;
The query results then show up in a table underneath, which I can right click and select "Export Data" -> XML
查询结果然后显示在下面的表格中,我可以右键单击并选择“导出数据”-> XML
<?xml version='1.0' encoding='UTF8' ?>
<RESULTS>
<ROW>
<COLUMN NAME="XML_INVOICE.GENERATE_XML_DOC('84200006823')" <![CDATA[<xml>yada yada</xml><morexml>...]]></COLUMN>
</ROW>
</RESULTS>
The problem is the "..." - SQL Developer (2.1.0.63 on Linux) is not showing all the data - its truncating the result and appending the ellipsis. This is of no use to me. How do I get it to export ALL of my data?
问题是“...” - SQL Developer(Linux 上的 2.1.0.63)没有显示所有数据 - 它截断了结果并附加了省略号。这对我没有用。如何让它导出我的所有数据?
回答by Wolvendeer
I was having the same issue in SQL Developer 4. Here is what worked for me:
我在 SQL Developer 4 中遇到了同样的问题。这是对我有用的:
set long 100000;
set longchunksize 100000;
And then re-run the query. You should now be able to see the full cell in the grid view and export it to csv as well.
然后重新运行查询。您现在应该能够在网格视图中看到完整的单元格并将其导出到 csv。
(The OP is no longer with the same job or using Oracle, but this question is one of the first results in google, so hopefully this will help people having the same problem.)
(OP 不再从事相同的工作或使用 Oracle,但这个问题是谷歌的第一个结果之一,所以希望这能帮助遇到同样问题的人。)
回答by sensware
1) Insert the result of the SP into a table
1)将SP的结果插入到表中
select XML_INVOICE.GENERATE_XML_DOC('84200006823') into schema.table from dual;
select XML_INVOICE.GENERATE_XML_DOC('84200006823') 到 schema.table from dual;
(will be only one row)
(将只有一排)
Use exp to export table
使用exp导出表
EXP username/password@instance TABLES=(tablename)
EXP 用户名/密码@instance TABLES=(tablename)
回答by sensware
Another solution would be to write directly a XML file see example below, and adjust to fit:
另一种解决方案是直接编写一个 XML 文件,参见下面的示例,并进行调整以适应:
CREATE OR REPLACE PROCEDURE output_xml_file
(inFileName Varchar2 ) --user defined prefix for file name
AS
fp UTL_FILE.FILE_TYPE;
v_filename VARCHAR2(150);
v_XML_Result VARCHAR2(4000);
BEGIN
v_filename:=infilename||'.xml';
fp := UTL_FILE.FOPEN('c:\pathtofolder', v_filename, 'W', 4000);
select XML_INVOICE.GENERATE_XML_DOC(inFileName) into v_XML_Result from dual;
UTL_FILE.PUT_LINE(fp, v_XML_Result);
UTL_FILE.FCLOSE(fp);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(fp);
raise;
END output_xml_file;
/
SHOW ERRORS;
GRANT EXECUTE ON output_xml_file TO PUBLIC;
回答by grokster
Run as a Script(F5) rather than as a Statement (Ctrl+Enter)
作为脚本运行(F5) 而不是语句 (Ctrl+Enter)
The output will then go to the Script Output window rather than the Query Output, and you will be able to Copy and Paste it
然后输出将转到脚本输出窗口而不是查询输出,您将能够复制和粘贴它