I can't get this script to produce output to the screen or a log file

I can't get this script to produce output to the screen or a log file of the select statement results as they are executed.
SET SERVEROUTPUT ON size 100000
DECLARE
v_schema     Varchar2(50);
v_statement      Varchar2(500);
v_name varchar2(30);
v_id varchar2(8);
v_pwd varchar2(16);
v_acct varchar2(16);
CURSOR get_schemas IS
SELECT DISTINCT owner
FROM all_tables
WHERE table_name = 'USERID'
ORDER BY owner;
BEGIN
OPEN get_schemas;
LOOP
FETCH get_schemas INTO v_schema;
EXIT WHEN get_schemas%NOTFOUND;
          v_statement := 'SELECT name,usid,passwd,acctnum INTO v_name,v_id,v_pwd,v_acct FROM '||v_schema||'.userid';
          execute immediate v_statement;
          DBMS_OUTPUT.PUT_LINE('Name='||v_name||' ID='||v_id||' PW='||v_pwd||' AC='||v_acct);          
END LOOP;
CLOSE get_schemas;
END;
/

Duplicate post.
When I run this script nothing is output to the screen or spooled to a file

Similar Messages

  • When I run this script nothing is output to the screen or spooled to a file

    When I run this script nothing is output to the screen or spooled to a file. What do I need to do to get output from this script.
    SET SERVEROUTPUT ON size 100000
    DECLARE
    v_schema     Varchar2(50);
    v_statement      Varchar2(500);
    v_name varchar2(30);
    v_id varchar2(8);
    v_pwd varchar2(16);
    v_acct varchar2(16);
    CURSOR get_schemas IS
    SELECT DISTINCT owner
    FROM all_tables
    WHERE table_name = 'USERID'
    ORDER BY owner;
    BEGIN
    OPEN get_schemas;
    LOOP
    FETCH get_schemas INTO v_schema;
    EXIT WHEN get_schemas%NOTFOUND;
              v_statement := 'SELECT name,usid,passwd,acctnum INTO v_name,v_id,v_pwd,v_acct FROM '||v_schema||'.userid';
              execute immediate v_statement;
              DBMS_OUTPUT.PUT_LINE('Name='||v_name||' ID='||v_id||' PW='||v_pwd||' AC='||v_acct);          
    END LOOP;
    CLOSE get_schemas;
    END;
    /

    Do I include several variables after the INTO or just
    one?
    How do I loop through the record and print the
    individual variables?
    I appreciate your assistance!He already gave you the answer above:
    v_statement := 'SELECT name,usid,passwd,acctnum FROM ' || v_schema ||
    '.userid';
    execute immediate v_statement
    INTO v_name, v_id, v_pwd, v_acct;
    If this is not printing any output, it is because you don't have a table named USERID... what are you trying to do?

  • How can I get this script to produce a log of what is updated?

    spool h:\sql\Projects\BINLOOKP\BINLOOKP.log
    SET SERVEROUTPUT ON size 500000
    DECLARE
    v_schema     Varchar2(50);
    v_statement      Varchar2(500);
    CURSOR get_schemas IS
    SELECT DISTINCT t.owner
    FROM sys.dba_tables t
    WHERE t.table_name = 'BINLOOKUP'
    ORDER BY t.owner;
    BEGIN
    OPEN get_schemas;
    LOOP
    FETCH get_schemas INTO v_schema;
    EXIT WHEN get_schemas%NOTFOUND;
    v_statement := 'INSERT INTO '||v_schema||'.BINLOOKUP(BIN,HIERMAINTFLAG,CARDTYPE) SELECT T.BIN,T.HIERMAINTFLAG,T.CARDTYPE FROM TJELSMA.BINLOOKUP T WHERE T.BIN NOT IN (SELECT A.BIN FROM '||v_schema||'.BINLOOKUP A)';
    execute immediate v_statement;
    END LOOP;
    CLOSE get_schemas;
    END;
    /

    Did you want to know what you are inserting ?
    Try :
    SQL> set serveroutput on
    SQL> declare
      2   v_empno number;
      3   v_stmt  varchar2(4000);
      4  begin
      5   for i in (select empno from empb) loop
      6       v_stmt:='insert into empa values (:b1) returning empno into :b2';
      7       execute immediate v_stmt using i.empno returning into v_empno;
      8       dbms_output.put_line('Insert empno : '||v_empno);
      9   end loop;
    10  end;
    11  /
    Insert empno : 7369
    Insert empno : 7566
    Insert empno : 7788
    Insert empno : 7876
    Insert empno : 7902
    PL/SQL procedure successfully completed.Nicolas.

  • How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them

    How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them. They have a ton of books but I can only listen to them from my windows media player and I wouldlove to download to my I pod but I have tried everything I can think of it they won't go over.  Someone said all I had to do was copy them over and they would convert but I can't even get them to copy.  Thanks.

    Well it started happening AGAIN with my 2nd IPod. No matter what I did, it Itunes would NOT restore it!
    I finally installed Itunes on my hubby's PC at work and managed to get it restored there.
    Apparently, there must be some sort of compatibility issue with the windows version of Itunes and some other piece of software on my pc.
    And one more important thing! I had to follow the instructions in the other thread that talks about how to correctly uninstall itunes and quicktime, in order to completely eliminate ALL traces of my "first" ipod's existence so it wouldn't demand that I restore it.
    I think the software got "confused" and thought when I connected my 2nd ipod, that it was the 1st and that it still needed to be restored.
    Basically, this is just POORLY written and POORLY tested software!

  • When I try to open iTunes, I get this error message: Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item. I get a different error message if I try to uninstall it.

    When I try to open iTunes, I get this error message: "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." I've been able to uninstall all Apple products except iTunes as I get this error message: "The Installer has insufficent privileges to modify this file: C:\Program Files\i Tunes\Acknowledgments.rtf." I've had the iTunes on my laptop for a year and a half with no problems until now.

    Any suggestions please?

  • I am trying to print a pdf document from an electronic journal at my school, and i can only get it to print what is on the screen at the time i hit print.  How do i get it to print the whole document?

    how do i get it to print the whole article?  i don't seem to have a problem printing from my old windows laptop

    melbaby_3 wrote:
    when I clicked on your link and hit print, all pages were there!
    That suggests there's no problem with Safari or Quartz, the PDF rendering engine used by Safari, Preview, and other Mac applications.
    When I'm in the database and have the article open that I want to print, I click on the "full text in pdf" link and it opens in another safari window.
    Does the PDF in this other Safari window have all the pages? If yes, why don't you print from this window?
    It's very difficult to tell what might be going on if you don't give very specific details.
    For instance, in many reference databases, full-text articles are not free. You have to pay to view them, either article by article, or by subscription. Your school may have such a subscription, but, if it does, you probably need to access the database through the portal, web site, or facility provided by your school (your school's librarian should be able to help you with that). If you don't, the database has no way of knowing you have a right to view the full text, and may give you just a preview or the article's first page.
    Another possibility is that the database provides full-text PDFs in a format not compatible with Quartz, which may be able to render only the first page. But, in such a case, I'd expect Safari to print blank pages. If that's the case, you need to save the PDF on your hard disk and open it with Adobe Reader (Preview wouldn't work).
    There are other possibilities, but these two seem to me the most likely.
    Would I have to save it in preview first
    You should save the PDF on your hard disk from Safari. (I think you should do this anyway, just in case you need to refer to the article again later.) Instead of just clicking the  "'full text in pdf' link", press and hold Control, then click. This should give you a contextual menu; if the link points to a PDF file, you should see the commans "Save Linked File to 'Downloads'" and "Save Linked File As…". Use either, save the file, then, in Finder, double-click on it. Preview should open it.
    It is possible that the link is not to a PDF file, but to a script which fetches that PDF file for you. In that case, it's pointless to download it. Click on it, and then, if the PDF viewing window opens in Safari, move the cursor towards the centre of the bottom of the window. A bar with commands should appear; one of them will download the file to your Downloads folder.

  • I can't get ITunes to respond when I touch the screen. What can I do to get it to respond?

    I can't get ITunes store to respond

    Quit the app and restart the iPad.
    Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Or try this
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • How can i get rid of a black speck behind the screen?

    Brand new, quad 2.8 GHZ Intel iMac. Beautiful. But has a black speck in the screen. How on earth would i get rid of this? I'm quite positive it's not on the screen. i've wiped it very firmly w/ the cloth provided. the thing is simply on the other side. Ideas?

    Hi Peter,
    If you can take it back to the Apple store (assuming you bought it from one). I had similar with a 24" iMac last year and they just replaced it there and then no questions, no arguing. They even transferred all my Data to the new machine. It was hassle free and I walked out of the store with a brand new replacement iMac set up like my original machine.
    Don't try doing anything to it yourself if it is brand new, it will void your warranty.
    Paul

  • I can't get my IPad 16 GB to unlock the screen and let my online.  message is "icloud backup hasn't been done in 4 weeks"  Tried to turn the pad off etc. no results??

    Can't get it to unlock, it has an icloud backup message on the screen and won't let me cancel the message and log on?  Tried to shut the machine off and it won't turn off with the button either. locked???

    Welcome to Apple Support Communities
    Hold Sleep and Home buttons for 10 seconds until the device restarts, so you will be able to use the iPad again.
    It will try to make a backup every time your iPad is plugged to the charger and connected to a network. To prevent that this message appears soon, open Settings > iCloud > Storage & Backup, and choose Backup Now

  • How can i get my curser to work on all the screen

    My curser is only working on %90 of my screen and i dont know why. with Lightroom 4 there is still no problem with it working on my Mac Book Pro. Im stumped

    You'll get faster help w/this question by posting it in the Wireless forum...here:
    http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/bd-p/Networking
    I am an HP employee.

  • I can't get my computer to boot up.  The screen is white with a file folder and then at ? in the middle

    The screen is white with a file folder and then at ? in the middle

    Before declaring that the disk is dead (which is a common cause for what you are seeing), try the steps outlined in this article:
    http://support.apple.com/kb/TS2570
    This article also has some troubleshooting steps you can try:
    http://support.apple.com/kb/ts1417
    If you don't have your original system disks, you can boot into single user mode folloing these instructions:
    http://support.apple.com/kb/ht1492
    and then following the directions for running the fsck command in the second article I list above.
    I would try these things before giving up and assuming that the disk is dead. The flashing question mark indicates that a valid boot disk cannot be found. One cause for this is that the disk has experienced hardware failure. However another cause could be that the system and boot files on that disk are somehow damaged (perhaps from a power surge or an improper shutdown of the computer) and in some cases the above repair steps can restore them to working condition.

  • Can I get my iPad cleaned from dust under the screen at the Apple Store?

    I have an iPad that I have purchased early last year. My warranty on the iPad is up and I have realized there is dust under the screen. There is a newly built Apple Store at a mall in my city. I am wondering if I could visit the store and request a technician to open my iPad and clean the screen, if it's possible they can do that. If I can, will there be a fee? If not, what other things can I do?

    No, they will not be able to clean it at the store. They will likely only be able to offer a replacement at a substantial cost (if that). Based on what you have described, unless you are far wealthier than me, you get to live with it.

  • HT201441 can i get this ipod unlocked its stuck on activation screen

    theres no way to get in touch with this guy is ther another way i can get it active

    No. You will be unable to use the device until it is unlocked by the previous owner.

  • How to get this script to auto detect if the server freezes and have it restart automatically

    taskkill /im arma2oaserver.exe
    timeout 4
    taskkill /F /im arma2oaserver.exe
    timeout 4
    :: fix the hive ini file..
    set dayzpath="D:\DayZ_Server_Panthera"
    cd /d %dayzpath%
    start "" "dayz_epoch_set_to_day.bat"
    timeout 4
    :: Rotate Logs..
    set dayzrotate="D:\DayZ_Server_Panthera\Logs_last_restart"
    cd /d %dayzrotate%
    start "" "Rotate_logs.bat"
    timeout 5
    :: start the server..
    set dayzpath="D:\DayZ_Server_Panthera"
    cd /d %dayzpath%
    start "" "Start_Panthera.bat"
    timeout 10
    :: start bec
    set becpath="D:\DayZ_Server_Panthera\BEC"
    cd /d %becpath%
    start "" "bec.exe" -f epoch_1.cfg
    timeout 10
    taskkill /im cmd.exe
    cls
    exit

    Hi there
    Normally all you need to do is specify the file name. No path or URL needed. Just the file name. After that, ensure the file exists in the same folder as the Captivate.
    Note, however, that if your server is a UNIX type, it could be persnickety about the case. So if your file is actually named MyFile.PDF and when you typed the file name into the field you used myfile.pdf, it likely won't find it.
    Further note that some file types will be some trouble. But before we go there, let's see if what has been offered so far helps anything.
    Cheers...
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • I get this error when PS6 update finishes on my Mac: Error log file location: /Library/Logs/Adobe/In

    So it goes with the update download and set up then the error. This is through the Adobe App Manager. I purchased a Cloud Sub 2 days ago. I've tried 10 times now and still the same error. This is frustrating for sure.
    Ara

    Did you ever find a solution? I am in sort of the same boat. I even had an Adobe rep try to help me. For some reason my Adobe App Manager does not work on my Macbook. It orginally did but one day it just would not launch. After numerous attempts of uninstalling and re-installing without success, the only workaround solution was to create another user on my Macbook and install the Application Manager on that user's account. I can then download the apps / programs and updates from there. When I log out of that user and back into my main account the Adobe programs work....well most of them. I have noticed that certain programs, like Muse will launch and work correctly under my second user account but it will not luanch without error on the main account.
    The fact that no one at Adobe seems to be able to provide a solution is frustraing. Everything worked fine one day, then its all messed up. Switching users is not an ideal solution at all.

Maybe you are looking for