Exporting Query Results "my way"

Rod

Member
Hey gang,

New user/forum member here.. I tried doing my due diligence with searching first, but couldn't find the results I was looking for. So, hopefully one of you kind souls can point a newbie in the right direction?! (pretty please)

Quick question.. I have some query results sitting in the results window and I'd like to export them as-is. I don't want any text qualifiers to be included, simply output what it is I'm seeing in the results window. I've tried the User-defined Export plug-in, but it mandates I choose a text qualifier and delimiter.

The select statement I'm using is structured to include the delimiters already and I don't want anything qualifying my string elements.

Any way to have that happen?

Thanks for your patience, time, and any wisdom you can impart!!

~ Rod
 
Hi Marco,

That would be correct.

It's when I save the output to a file that all rows are then modified to have an apostrophe at both the beginning and at the end. I don't want that. I just want whatever my query result returned written out as-is.

Any ideas?

Thanks again!
Rod
 
Hi Rod

Note that you could cilck on the column header in the results grid to select all the values in the single column, then right click and click Copy on the context menu, then open any text editor (even Notepad!) and paste the values in - they will not be "molested" in any way!

Best regards

Billy
 
Marco ... no, they do not. And because I have a tendency to not be clear sometimes, I'll try to be more succinct with what I'm after here. I'm trying to emulate pipe-delimited columns which I then need to output to a results file. The "Export Query Results" option doesn't give me the pipe-delimited format by default, so I installed the "User-defined Export 1.1" plug-in only to find that while I can now specify pipes as a delimiter I'm also forced to chose a "quote character". And now because all my disparate rows appear as one column of results that one column gets put between an opening and closing set of quotes. Again, any ideas/suggestions are greatly appreciated!

Billy ... I noticed I could do that, but I was looking for a less clicky way to get my results to a file. And sometimes I'm looking to output tens or even hundreds of thousands of lines across anywhere from five to thirty rows of data. The clipboard doesn't like that too often (at least on the machine I'm forced to use). And thank you very much for your response!
 
If You do not want the clicky way, maybe You need something like this, which nearly works in PLSD, except "trimspool" is not supported in command window.
Its made for sqlplus:
-- paste below in command window / sqlplus
set colsep |
set pagesize 0
set trimspool on -- doesnt work in plsd
set linesize 2000 -- or other value

spool c:\temp\PipeDelimSpool.psv

select o.OBJECT_NAME, o.OBJECT_TYPE
from user_objects o;

spool off;

 
The User-defined Exporter shows a default double-quote as quote delimiter, and also brings a list from which you can choose from. OR you can simply clear the field and generate the file with no quote character.

Another point: you don't have to handle your query output in order to use a pipe-delimiter. Just go to User-defined Exporter and input the pipe character as your Separator Character.

Regards,
Gustavo
 
Gustavo,

Brilliant!! :grin: I had no idea I could blank out the Quote Character (and obviously didn't think to even try that ... read: me not thinking outside the box).

Excellent! Now, I am able to generate the output I want with relative ease. Thank you for your help and to all the others who took the time to give me some of theirs!!!

Cheers,
Rod
 
Last edited:
Back
Top