Can spool a file with just sql result?

Hi, I am trying to using sql to generate sql script and then run it, it's like this:
set heading off
set feedback off
spool gt.sql
select 'grant select on '||table_name||';' from dba_tables where owner='ABC';
spool off
@gt.sql
The script generated looks like this:
SQL >select 'grant select on '||table_name||' to ABC';' from dba_tables where owner='ABC';
grant select on EMP to ABC;
SQL> spool off
IS there an sqlplus command that will not make the two sql commands show? so I can run the gt.sql right away instead of having to manually remove those two SQL> XXX before I can run the script.
Thanks a lot.

set echo off
also, and more importantly, you need to put all of into a single sql script. ex:
gen_gt.sql
set echo off
set heading off
set feedback off
spool gt.sql
select 'grant select on '||table_name||';' from dba_tables where owner='ABC';
spool off
[eof]
SQL> @gen_gt
SQL> @gt

Similar Messages

  • How can I move or delete files with PL-SQL???

    I have Oracle 9i and Sun Solaris 5.8
    I have a table (“TABLE_FILENAME”) with the files name in one directory. (I read the files name in a directory and put it in a table). I charge some files with external tables and then I have to move some fields to another directory and delete others files.
    How can I delete files with PL-SQL and How can I move files with PL-SQL?
    I have the names of files and the actions (Delete o Move) in a table (“TABLE_FILENAME”) (The files in this table are dynamics).

    If you're using 9i then you will find that the new functions UTL_FILE.FCOPY and UTL_FILE.FREMOVE will allow you to do what you want. Check out the documentation for more details.
    Cheers, APC

  • I just want to see my files with explorer.  Then transfer all pics to my computer. With the new update I can't.   How do I access my file with just explorer?

    I just want to see my files with explorer.  Then transfer all pics to my computer. With the new update I can't.   How do I access my file with just explorer?

        Let's bring back your file control, jpandwibble. What happens when you connect to your computer? Are you trying to use Explorer on the device or on computer? I am eager to continue troubleshooting!
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWsupport

  • I can't drag files with the mouse

    Just installed Mountain Lion. After about four days I can't drag files with the mouse. Not across the desktop or from Finder window to Finder window.

    I have the same problem, I have posted the below here: https://discussions.apple.com/thread/4152036?start=0&tstart=0
    I have exactly the same problem on Mountain Lion- I go to drag files from the finder to another finder folder or the desktop and when I go to release the mouse button the file stays in a "hover" state, as if I hadn't released the mouse. It then follows my mouse cursor around forever. Very frustrating.
    I have rebooted several times - any ideas?

  • Can't open Files with MIDI and WAV Tracks

    Hey All,
    I can't open some files anymore. They seem to be files that have MIDI drum tracks and WAV tracks. It seems to try to load the MIDI sound 2 times, then NOTHING. I have to click the GB icon in the dock to get the window to show, BUT then the play, rr, ff, ect buttons don't show, and the close, minimize buttons don't respond. The menu bar is REAL twitchy and you can't click on anything. I have to force quit the app. I have tried loading other files with just WAV tracks and they open fine, and some files with fewer(2) number of MIDI tracks.
    I have opened these files before just to listen to them and play with settings but i didn't save them. I have repaired permissions and cleaned the cache, ect. with OnyX.
    Anyone have any ideas?

    UPDATE
    Talked to Apple Support and we went through all the Rapair Permissions, Clean Cache, Prefs, Ect. Finally saw that when I switched to Project Mode, THAT was Freezing the Garageband Screen. (The Files that were screwed were saved in the Project Mode, so when they opened up they were still in the Project Mode) We Finally unplugged all External things and Rebooted to Safe Mode, and then tried again.
    And 2 and a half hours later Garageband now works fine. Nice to have apple techs stuborn enough to keep going.

  • Hi Apple Team, my iphone can't share files with my macbook pro. But other devices can share bluetooth files with my mac book pro. Please, kindly open up bluetooth to accept all connections from all devices. Now it becoming difficult for me to share.

    Hi Apple Team, my iphone can't share bluetooth files with my macbook pro. But other devices can share bluetooth files with my mac book pro. Please, kindly open up bluetooth to accept all connections from all devices. Now it difficult for me to share bluetooth files from my mac bookpro to my iphone, unless i attached it through email.
    We need it to be acceptable to all devices.
    Thank you!

    You can tell Apple directly at the link below.
    http://www.apple.com/feedback/iphone.html

  • Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path

    Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path using any of these perfectly normal methods:
    1. double-click file in the Finder (e.g in a Folder on your Mac or on your Mac desktop etc.)
    2. select file and choose "File... Open" command-o in the Finder
    3. drag file to the application icon in the Finder.
    4. Select file in Bridge and double-click, choose File.. Open.. or Drag icon to InDesign icon in dock.
    If you try to open an ID file named with a "#", you will get an error message "Missing required parameter 'from' for event 'open.'"
    This happens to any InDesign file that has a "#" (pound sign, number sign, or hash) in the filename or in the file path (any parent folder).
    To reproduce
    Name an InDesign file Test#.idd Try to open it in the Finder or Bridge (as opposed to the "Open" dilaog of InDeisng itself).
    "Solution"
    The file WILL open using File... Open... command-o while in InDesign application.
    Rename the file or folders that have a "#" (shift-3) in the filename.
    Report to Adobe if it bugs you.
    This does not occur in "plain" Leopard 10.5 nor Tiger 10.4
    Untested in Panther or before and
    Untested with CS3 and earlier in Snow Leaopard.
    Anyone have those and want to try this... ?

    In case this really bothers you: we've added a workaround for this into Soxy. If you enable the option, these documents will open fine on double-click.
    You need Soxy 1.0.7 from:
    http://www.rorohiko.com/soxy
    Go to the 'Soxy' - 'Preferences' - 'Other' dialog window, and enable 'Open InDesign via Script'
    (Irrelevant background info (it's all invisible to the user): the workaround works by special-casing how Soxy opens documents in InDesign: instead of using AppleScript, Soxy will use ExtendScript to instruct InDesign to open the document - which works fine).

  • I know my Game Center username and password, but I don't know the email (or maybe apple id) that is for my account. It is not my normal one. I can't log in with just my username, so does anyone know how I can get my email?

    I know my Game Center username and password, but I don't know the email (or maybe apple id) that is for my account. It is not my normal one. I can't log in with just my username, so does anyone know how I can get my email?
    Can you help me please

    Dear
    I have worked renovation of the device and have an account, but I forgot my email
    I do not know E-mail has been linked in game center
    I have a name defined in game center
    Do I have the possibility of knowing E-mail has been linked in game center

  • How can I see file with chinese name in Sunray USB storage?

    hi, All
    I installed Sunray4u3 on Solaris0805. the application server is win2003EE.
    I accessed usb storage from win2003, but I can only see files with English name , and could not see files with chinese name. Why? who can help?
    best regards
    xiong wei

    You might want to make sure your credit card is listed in the billing information associated with your Apple ID (see http://support.apple.com/kb/ht1918).
    Also, to change the From name that appears when you address emails on and iOS device, go to Settings>Mail,Contacts,Calendars...tap your iCloud email account, tap you iCloud account at the top, tap Mail at the bottom, then enter the name you want to use in the Name field at the top.
    To change the From name on your Mac Mail, go to icloud.com, sign into your account, open Mail, click the gear shaped icon on the bottom left and choose Preferences, go to the Accounts tab and enter the name you want to use in the Full Name field and click Done.  Then quit Mail on your Mac and re-open it.  Your new From name should now appear in the drop-down list when you compose a new email.

  • Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices?

    Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices, i.e. NO Computer? Can the iCloud help? Why can't I download iTunes (i.e. my library as I saw it on the computer) to these devices? Thanks to anyone who can help me here.

    You can change the email address of one's appleID...
    I'd recommend changing moms email to yours to get a good backup on the Mac
    Then switch mom's back to hers
    Then change your account to the same email you used.
    I've done something similar when I needed to update my Apple account (one ID changing email addresses and phone)

  • How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. I tried RIGHT-CLICK and the "open dowloading folder" or something does not work! P

    How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. Even the right-click is not working ... the "open containing folder" does not work.
    == This happened ==
    Not sure how often
    == ALWAYS! ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)

    Open Containing Folders is never active.

  • I have downloaded Adobe camera raw 8.4 so that I can open raw files with pictures taken with the Sony a6000 camera.  However it is not opening the images in camera raw.  What can I do?

    I have downloaded Adobe camera raw 8.4 so that I can open raw files with pictures taken with the Sony a6000 camera.  However it is not opening the images in camera raw.  What can I do?

    Close and restart Photoshop if you have not already done so.
    In Photoshop, go to the Help - About Plug-in... menu then choose Camera Raw.  What version does it say there?
    -Noel

  • How I can combine pdf file with other pdf file

    How I can combine pdf file with other pdf file ?

    Or from Adobe Reader via https://createpdf.acrobat.com/

  • My trackpad can't open file with double click

    i don't know what's going on, but my trackpad can't open file with double click. i have to open it with right click, open or open with. i've tried to fix it in the system preferences, it didn't work out well.

    William - you are wonderful!  I had looked at that - they were set to 'internal' which seemed like RH...but selecting the 'design view' and then reselecting 'use default editor' instead of 'auto-select editor' did it.  THANK YOU!!!!!

  • HT201104 Can I share files with others with iCloud Drive? ie: I want to collaborate on Garageband files

    Can I share files with others with iCloud Drive? ie: I want to collaborate on Garageband files

    No iDisk-like functionality exists in iCloud. You'll have to look elsewhere, such as Dropbox or SugarSync.

Maybe you are looking for

  • Why can't a new folder be created within my user home directory when using 'Save As' in Mountain Lion?

    Hi, So I want to create a new folder within my main user home directory (not the root directory) just for my developer-related files? I can do this from Finder, although it does prompt me for my password to do so. However, when using 'Save As' from a

  • InDesign CS3 JS

    I admit I am simply trying to understand JS for InDesign. I have written this small script to try out a few things: or(a = 0; a < NumberOfPages; a++) apage = app.activeDocument.pages.item(a); $.writeln("The page: ", apage.name); myPageItems = apage.p

  • Playlists with folders - doesn't work

    Brandnew iPod 30 GB, 5.5 Do have playlists with folders on iTunes 7.0.2. Folders don't appear on the iPod. Only the files in the folders. So i get a long long list of playlists on the iPod. Instead of a list with several folders in it for better over

  • Does the Browser cach the jnlp-file?

    I have a problem, I think with the browser's caching. As I modify the *.jnlp-File, the old version is loaded, not the new one! Or is the old version cached by the webStart-Caching-Mechanism? To update the jnlp-file, sometimes it is helpful to clear t

  • Errors in Uja_data_checker

    We are getting the following  errors/messages per se38 program UJA_DATA_CHECKER on the ENVIRONMENTSHELL in production error: The resource for alias /POA/APP doesn't have the correct ACD Type The attribute /POA/APP of dimension  was renamed to  becaus