How could I  export a sqlplus query to a .txt file?

Hi,
I have an Oracle 10g database running on a linux e3 server.
I have generated a SQL query using sqlplus on the server site, so the result is under the SQL>
How could I export it to a .txt?
Thanks a lot!
Any advice is highly appreciated!
Qian

Hi, Qian,
In SQL*Plus, say "SPOOL filename", and all the output that appears on your screen will also be written to filename, until you say "SPOOL OFF".
Look up SPOOL in the SQL*Plus manual for more details.

Similar Messages

  • How could I export my contacts on my iPhone to my iCloud account ?

    How could I export my contacts on my iPhone to my iCloud account ?
    Because I want to manage (group) my contacts and then import my contacts into my iPhone again.
    Furthermore , I want to export my contacts to MicroSoft Outlook 2010.

    I think you have a couple of options.  You can bluetooth it or export from an account.
    Here is a link that may help you.  I think your phone has its own tutorial section on Verizon Support Knowledge Base.
    Try here
    http://www.verizonwireless.com/support/devices/knowledge_base.html/42651/
    Some advice is to save those contacts to a gmail account instead to the Backup Assistant account.  I read some other users were having problems with the Backup Assistant account deleting all contacts on their phone. 

  • Export query result to txt file

    Hello,
    I'm trying to export a query result to txt file but I facing some problems.
    I'm using the comand below:
    set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
    set colsep ,
    spool C:\estados.txt
    select id_estado,cod_estado,nme_estado from tb_estado;
    spool off
    First problem: My select statement is being writen on my estados.txt
    Second problem: The results are being writen with a lot of blank spaces in start of line, for example, instead of write "1,AC,Acre" the line is write as " 1,AC,Acre".
    Third problem: The "spool off" statement is being written on my estados.txt
    How could I solve it?
    Thanks

    1. Works here - what version of SQL*PLUS are you using?
    2. If you want to prevent spaces, you have to write your SELECT like this:
    select id_estado || ',' || cod_estado || ',' || nme_estado from tb_estado;Note: not tested.
    3. See 1.
    C.

  • How do I export/import keyboard shortcuts to a text file

    How do I export/import keyboard shortcuts to a text file?
    It would be nice to export them, edit and/or add to them in a text editor on my iMac, then import them back into iPhone and iPad.

    You can backup the bookmarks to a file, then copy that file to the new computer and import them, for details see [[Backing up and restoring bookmarks]].
    You can copy more than just the bookmarks. The user data, such as bookmarks and passwords, are stored in the profile folder. You can copy the data manually by copying the contents of the profile folder, for details see [http://kb.mozillazine.org/Profile_backup Profile backup - MozillaZine Knowledge Base] or [[Backing up your information]].
    There are some add-ons and utilities that can make this process easier. The first one is the [https://addons.mozilla.org/en-US/firefox/addon/2109/ FEBE] add-on which can be used to copy a profile. Another option is the free [http://mozbackup.jasnapaka.com/ MozBackup] utility.

  • How do i search for a string in a txt file using java??

    How do i search for a string in a txt file using java??
    could you please help thanks
    J

    Regular expressinos work just fine, especially when
    searching for patterns. But they seem to be impying
    it's a specific group of characters they're looking
    for, and indexOf() is much faster than a regex.If he's reading from a file, the I/O time will likely swamp any performance hit that regex introduces. I think contains() (or indexOf() if he's not on 5.0 yet) is preferable to regex just because it's simpler. (And in the case of contains(), the name makes for a very clear, direct mapping between your intent and the code that realizes it.)

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • [Forum FAQ] How do I export each group data to separated Excel files in Reporting Services?

    Introduction
    There is a scenario that a report grouped by one field for some reasons, then the users want to export each group data to separated Excel files. By default, we can directly export only one file at a time on report server. Is there a way that we can split
    the report based on the group, then export each report to Excel file?
    Solution
    To achieve this requirement, we can add a parameter with the group values to filter the report based on the group, then create a data-driven subscription for the report which get File name and parameter from the group values.
    In the report, create a parameter named Name which use the Name field as Available Values (supposing the group grouped on Name field).
    Add a filter as below in the corresponding tablix:
    Expression: [Name]
    Operator: =
    Value: [@Name]
    Deploy the report. Then create a data-driven subscription with Windows File Share delivery extension for the report in Report Manager.
    During the data-driven subscription, in the step 3, specify a query that returns the Name field with the values as the group in the report.
    In the step 4 (Specify delivery extension settings for Report Server FileShare), below “File name”option, select “Get the value from the database”, then select Name field.
    Below ‘Render Format’ option, select Excel as the static value.
    In the step 5, we can configure parameter Name “Get the value from the database”, then select Name field. 
    Then specify the subscription execute only one time.
    References:
    Create a Data-Driven Subscription
    Windows File Share Delivery in Reporting Services
    Applies to
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How should i export already h.264 compressed video/audio files after i edit them?

    I am recording gameplay footage off computer with a program that compresses the video and audio. After I edit the footage how should i export it? I don't want to lose quality by double compressing it.

    Michael Holmes1 wrote:
    I have to record all the color changes I make in one Project, so I can repeat them in the other 17 projects, etc.
    No.
    You need to explore Compound Clips. This workflow may or may not be of help.
    Select an Event with clips in it and press Option+G to make a (blank) compound clip.
    Select the Event Browser, create a new Event and call it 'Effects'.
    Drag the Compound Clip into this Event.
    Right-click the clip and select 'Open in Timeline'.
    Select the timeline and press Option+W. This will add a Gap Clip to the timeline.
    Select the gap clip and press Ctrl+D then type in the duration you want the clip to be.
    Now open a project and select and copy one of the clips with effects etc.
    Open the Compound Clip in the Timeline again, select the gap clip and press Option+Cmd+V to paste the effects into your Compound Clip.
    This clip is now saved in your Browser and will remain there for you to copy and then paste the effects into any clip in any project.
    It's a bit clunky, but it works - and once you learn about Compound Clips, you can work wonders with them. As an example, if you want to add more effects without overwriting the effects in the Compound Clip, simply make the Compound Clip into a Compound Clip (again) and add the effects. They will be added to the original effects.
    Andy.

  • How to store the data typed in flash to .txt file?

    Hi all,
    I have a query to all, I have created a notepad in flash, if I typed something in that and save that file as .txt format in my local drive. So, any help on the same....
    Thanks in advance
    Santhosh Kumar M

    i don't think this is complicated enough for anyone to write a tutorial.  but i could be wrong about that.
    you have 2 steps:
    1.  use the urlloader class to send data to a server-side php script that saves your data to a .txt file
    2.  use the filereference class to download that file.
    they're both pretty easy if you use the flash help files to start you off.

  • How can i put a system.out.println into txt file

    i want to generate a txt file instead of system.out.println. for the output How can i do that and what code can i use for that??
    Edited by: crystalarun on Oct 14, 2007 11:40 AM

    suppose u ant output in "Output.txt"
    then code can be
    PrintStream out = new PrintStream(new FileOutputStream("Output.txt"));
    System.setOut(out)

  • How to calculate the number of vowels from a txt file. Pls give me a hand!!

    Guys! How do i calculate the number of vowels from a txt file? I have to create a program to count the number of words, sentence, and vowels. So far I had managed to count the number of words. Now I need help on counting sentence and vowels! Pls give me a hand guys!

    I first have to read from the file not the string.I
    know how to read from a file. Now the problem ishow
    to compare a character from a txt file!You fail to understand, that you have read the data
    from the file into a string. Now loop over all
    characters in the string. Forget about the file.
    KajOr forget the scanners just as others have told you. Just read the file character by character using a FileReader.
    Kaj

  • How to list local admins in AD as a txt file which has a name as date of the day

    Hello,
    I have a script which lists local admins of all hosts in Active Directory:
    $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"")
    $Searcher.Filter = "(objectClass=computer)"
    $Computers = ($Searcher.Findall())
    md C:\All_Local_Admins
    Foreach ($Computer in $Computers)
    $Path=$Computer.Path
    $Name=([ADSI]"$Path").Name
    write-host $Name
    $members =[ADSI]"WinNT://$Name/Administrators"
    $members = @($members.psbase.Invoke("Members"))
    $members | foreach {$_.GetType().InvokeMember("Name", 'GetProperty',
    $null, $_, $null) | out-file -append C:\All_Local_Admins\$name.txt
    This script outputs HOST machine names as seperate txt files (HOST1.txt, HOST2.txt etc)
    What I want is to get a single text file which name gets the date of the day (for example: 05082014.txt --> This file will include local admins of all hosts)
    How should I modify above code to manage this?
    Thank you very much.

    Try setting the file name outside of the loop.
    $fname = "$((Get-Date).ToShortDateString().Replace('/','')).txt"
    after the write host line add
    $ | out-file
    -append C:\All_Local_Admins\$fname
    Change this line
    $null, $_,
    $null)
    | out-file
    -append C:\All_Local_Admins\$name.txt
    to
    $null, $_,
    $null)
    | out-file
    -append C:\All_Local_Admins\$fname
    See if that gives you what you need.

  • How could I export FCE project into XML format?

    Hello,
    I recently decided to upgrade from Final Cut Express to Final Cut Pro X. But I don't seem to be able to export my FCE unfinish projects. That is because FCE  does not export into XML format !!!
    Does anyone knows how to have FCE to generate a XML file? Or to have the FCP file format converted into a XML file format?
    Thanks

    If you are editing in FCE4, then you can open your FCE Project in FCP6 or FCP7 and do the .xml export there. Once you have that .xml file, you need to use the software 7toX to convert the file to FCP-X.
    http://assistedediting.intelligentassistance.com/7toX/
    It should be noted that the conversion of a sequence file to .xml and then .xml to FCP-X may not pass 100% of the information.
    There is information about what is and is not translated here:
    http://assistedediting.intelligentassistance.com/7toX/about.html
    MtD

  • How could i export a JPanel as a pdf ??

    is there any package to help me encode a pdf from a bufferedImage or what else ??
    Thanks @

    You could save as a graphic, print and turn into a pdf that way.
    If you want an editable pdf you are going to have to do a lot of work!
    Have a look at itext and etymon. If you are interested in pdf, our site (www.idrsolutions.com) is worth a look - we are going the other way.
    MArk

  • How could I export my contacts into numbers?

    I'm trying to export my conatcs list into a numbers format which it doesnt semto give me that option anywhewre,is ther a way to do this?

    or -> http://lmgtfy.com/?q=Mac+OS+export+contacts+to+CSV

Maybe you are looking for

  • Children on skype

    Hi I really need some help if possible, My partners son is only 14 years old and has a skype account, I wouldn't usually have a problem with this but the fact is he's meeting strangers online and then talking to them through skype, I know this becaus

  • How can I copy a PSK from one WLAN Controller to another

    I'm trying to replace a WLAN controller with a new one.  One WLAN is configured with WPA-PSK.  Nobody seems to know the key that was used. Anyone know if there is a way to extract the encrypted key out of a controller and put it into the new WLAN Con

  • After installing Mavericks, my DVD player icon is missing from my launchpad. How do I get it back?

    I installed Mavericks yesterday and then tried to watch a movie.That is when I noticed the icon for the dvd player is no longer in the launchpad. If I put the disk in the drive it opens on it own or if I search for DVD player it will come up under a

  • Whole root zone doesn't run Solaris Management Console

    All I created a couple of Whole Root zone's, but the SMC is not working. It can't even be found. (However, on the "sparse" zones, it works fine.) I ran: pkginfo SUNWsmcmd and got: system SUNWsmcmd System Management Agent applications and utilities So

  • Access datagrid column from another column

    Hello Basically, I have 2 columns in a DataGrid, both with CheckBox itemRenderers. When I check the first checkbox, I want the second to be enabled = false.  I'm stuck. Thanks!