newbie question: sql runs under sqlplus but does not compile in pl/sql?

I have the following two tables, I have a SQL in pl/sql packages so I can use dbms_jobs to automate it however, I get the compile time error. It seems to me that pl/sql dislikes my sql that works well in sqlplus. Here is the error message and my test case?

mdb_user@cmd > view the error
PACKAGE BODY DATA_QUALITY_REPORT_P errors:

LINE/COL ERROR
-------- -----------------------------------------------------------------
10/1 PL/SQL: statement ignored
13/42 PL/SQL: ORA-00942: table or view does not exist





create the table S_ORG_EXT
(
accnt_type_cd varchar2 (100),
cust_stat_cd varchar2 (100)
)
/

insert into s_org_ext
Select column_name, data_type for user_tab_columns where rownum < = 100
/

Select * from s_org_ext
/


create the table data_quality_report
(
RunId number not null,
report_type number of non-null, - type of report as dup dup or not other measures
org_level number not null, - organization level nsgn, sgn, shipto
loc_level number of non-null, - local level by city, by country, by region, grand_total
name varchar2 (100) not null,-the line output of the tot name.
Value number not null, - line value of the tot.
rundate date default sysdate
)
/

create sequence data_quality_report_seq with 1000
INCREMENT BY 1
NOCACHE
NOCYCLE
/


insert into data_quality_report
Select data_quality_report_seq.nextval, 3, 99, 99, accnt_type_cd, cnt, sysdate from
(
Select accnt_type_cd, count cnt (*) of S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd by 2 desc order
)
/

Select * from data_quality_report
/



truncate table data_quality_report

CREATE or replace PACKAGE data_quality_report_p AS
function pull_data return data_quality_report.runid%type;
END data_quality_report_p;
/


create or replace package body data_quality_report_p as
function pull_data return data_quality_report.runid%type is

new_rid data_quality_report.runid%type;


Start
Select data_quality_report_seq.nextval in the double new_rid;

insert into data_quality_report
Select new_rid, 3, 999999, 999999, accnt_type_cd, cnt, sysdate from
(
Select accnt_type_cd, count cnt (*) of S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd by 2 desc order
);


Return new_rid;
exception
When no_data_found then
DBMS_OUTPUT. Put_line ("NO_DATA_FOUND handles the exception.");
while others then
DBMS_OUTPUT. Put_line ("' handling ANOTHER exception.");


end; -end pull_data

end data_quality_report_p;
/

Hello

Sorry, I was not clear about that.
The owner of the package needs direct privileges (not only privileges through a role) to compile the code, whehter it is DEFINE AUTHID or AUTHID CURRENT_USER. Option (3) does not help in this case; my mistake.

I usually create packages in the same schema tables they use, which was option (2) in my previous message. There may be good reasons why you can't do that; for example, the package may reference multiple schemas tables. In this case, grant the necessary privileges directly to the owner of the whole.

Tags: Database

Similar Questions

  • CouponPrinter.exe does not work. I can download and run the program, but does not, print already added the file name to the list of java exceptions

    running windows xp, update java 7 51, norton antivirus says file is ok, please help

    HI DJDOLLARROB,

    Thanks for posting, as you might expect, there are troubleshooting you can undertake to check why the download does not work. It is highly possible that the source that you have downloaded from cannot be no longer works. Is there a site that you can check to see if it does not work for them either? Also where it is downloaded from?

    Otherwise please see if scanitemswhendone is enabled: change what Firefox does when you click on or download a file

    If download hangs at the last minute (just before reaching 100%), the cause may be an antivirus software that tries to parse the file and during this process the instance of Firefox crashes.

    To resolve the issue, try disabling the analysis as follows:

    1. In the address bar, type Subject: config and press enter. The subject: config "this might void your warranty!" warning page may appear.
    2. Click on I'll be careful, I promise!, to continue on the subject: config page. A list of parameters must appear
    3. Filter the list by typing in the search bar at top. Enter scanWhenDone. Now you should find the "browser.download.scanWhenDone" preference.
    4. Double-click this preference to set the value to false.
    5. Then, try to download something and see if it still crashes.

    Please reply and let us know if this helped you!

  • OLE1. CreateEmbed Bit_str, "Paint.Picture" works under Dos but does more when gave birth off the coast. How can I fix teachix?

    OLE1. CreateEmbed Bit_str, "Paint.Picture" works under Dos but does more when gave birth off the coast.  How can I fix teachix?  Using VB5 to obtain a bitmap for embeded in an Access database. This used to work perfectly, but gives an Error 31032 when the program is spawned off the coast.  It still works from a command prompt.  How I have the code around this, or what is the problem?  Help, please. Thank you

    Hi AllisonBlackmer,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the forum TechNet for assistance:

    http://social.technet.Microsoft.com/forums/en-us/category/windowsxpitpro

    Hope the helps of information.

  • PC runs, but does not start. Monitor, keyboard and mouse with no signal.

    PC runs, but does not start. Monitor, keyboard and mouse with no signal. Pretty much. And when you want me to remove the battery of the bios, or whatever, it seems tight and hard to get out because it is surrounded by other elements.

    All fans work, the power/battery or anything that works I think that, since there is a fan on the right where it is and it seems to work. I remember what happens before, I don't know, but before that, there are many gels. This error below was made before all this happened, but I managed to run f8 and then run normally until it freezes again. Then, after that, it runs but does not start. No beeps etc. The best fans will have plenty of vouches and Bravo to wherever you like me to vouch or maybe send the great service that you provide to administrators if that's even possible, haha.

    Thanks in advance.

    "

    The file is possibly corrupted. The file header checksum does not match the checksum calculated. »

    It is a sign of a lack of food.  Looks like you have a desktop computer?

    Power supplies run about $50.  It is a rectangular box at the corner of the system in which the power supply will from the outside.  It's a pretty standard form in most of the PC and with a little investigation thorough replacements can be found.

    It is usually held in place by 4 screws and can be held in place with a spring clip.

    Most essential, is that you need to buy a replacement with the right number of straight plug forms to adapt to your PC.

    This seems more complicated than it really is and takes about 5 to 10 minutes to do the replacement.

    Look at the power output of the power supply failure and buy a new, more powerful.  New desktop PC usually come usually with a diet under size and what are the causes these failures is too strong a request for devices you have connected.  So, buy one with a higher power rating.  Usually about 500 Watts does the trick.

    If you do not feel upwards to this task, a technician should not charge you much like this.

  • Java Web Start application runs under jre8u40 but not jre8u51

    We have a Java web application that uses javaws. It runs very well under the update of Java 8 40, but under the update Java 8 51 jp2launcher.exe stops right, without launching the application.

    • I found the papers in C:\Users\me\AppData\LocalLow\Sun\Java\Deployment\log, but they are identical between j8u40 and j8u51 (except of course for the order of pots are loaded, the version of jre and the start time).
    • I connected the launch using Process Monitor for the two versions of jre. Under j8u51, jp2launcher.exe ends with just the result of 'SUCCESS' Comparing the two newspapers procmon, I can't choose anything unusual. They have both search in the directory C:\Users\me\AppData\LocalLow\Sun\Java\Deployment and their respective C:\Program Files\Java\jre1.8.0_XX\lib directories and others like, but then the j8u51 there is only.
    • The Windows event logs show any what that touch of Java.
    • I managed to run the jnlp whose value "JAVAWS_VM_ARGS = - Xcheck:jni - XX: - TraceClassLoadingPreorder - XX: + PrintCommandLineFlags-verbose: jni-verbose: class - verbose: gc - XX: + PrintGCDetails-Djava.util.logging.config.file=C:\misc\logging.properties" and connect the stdout/stderr. It looks like an end to newspapers javaws and jp2launcher for versions of the output, then both jre8u40 and jre8u51. Probably in the j8u40 version it launches another jp2launcher.exe to run the application.
      • Comparing newspapers two output gives nothing interesting. Classes are loaded in almost the same order, for the most part identical classes other than the few differences that are explained easily by just be more up-to-date used classes.
    • Finally, I was able to launch the application directly, using java.exe, by getting the customer their unpacking and installing the server files. The application itself works fine in jre8u51, so the problem is definitely javaws himself.

    I find very little documentation on the inner workings of Java Web Start and no documentation at all on jp2launcher.exe. Can anyone suggest what could go wrong here, or other diagnostic measures I can take?

    e: sorry for the strange user name. I tried to change it in my profile, but the forums don't seem to accept the change.

    Hi people.

    I managed to find the solution. There are several factors that interact and I think one of them is a bug in Java Web Start.

    Please see full report at http://stackoverflow.com/questions/31556273/java-web-start-application-runs-under-jre8u40-but-not-jre8u51

  • Skype is running in the background, but does not open on the screen

    Skype is running in the background, but does not open on the screen

    Uninstall ArcSoft software. This application adds a filter cell of webcam and is originally Skype crashing.

    Stack: \Driver\,ArcSoftKsUFilter, \Driver\ksthunk,\Driver\usbvideo,\Driver\usbccgp

  • I have 2 computers that are running windows 7 prem 64 bit family. I'm trying to set up a home group, but does not recognize my extra computer. It is on the network. I have a netgear router wnd3500

    I have 2 computers that are running windows 7 prem 64 bit family. I'm trying to set up a home group, but does not recognize my extra computer. It is on the network. I have a netgear router wnd3500.

    Hi Mark,

    Thank you for writing to Microsoft Communities. The description of your problem, I understand that you have problems setting up a homegroup with Windows 7 computer. Please correct me that I misunderstood.


    Mark, please don't worry I'll try my best to resolve the issue.

    I suggest to go through the following websites, which provide a detailed description on the homegroup and how to set up.

    Home Sweet homegroup

    http://Windows.Microsoft.com/en-us/Windows7/help/home-sweet-HomeGroup-networking-the-easy-way

    Homegroup from start to finish

    http://Windows.Microsoft.com/is-is/Windows7/help/HomeGroup-from-start-to-finish

    If you're still having trouble to set up the residential group, please let us know. We will be happy to help you.

  • Creative cloud runs in the background, but does not open

    I have many many problems with this terrible software.  No two days the same thing.  Today, that it does not open. It shows as running in the Task Manager. but does not open. I have deleted using the Task Manager and tried again, but it still fails to open. I am close to deletion and return to the stand-alone version. This is ridiculous. Anyone can help?

    Hi Andy,.

    We apologize for the inconvenience caused to you. Please end task associated Adobe all the processes that are creative Cloud, CoreSync, CCLibrary, CCXProcess, Adobe CEF Helper, Office of Adobe, Adobe IPC broker, Adobe Crash demon from the Task Manager. Then, start Creative Cloud Desktop Application and then connect you.

    It could be useful!

    Kind regards

    Shelly

  • first items 12, new installation, serial No. accepted, installed and started again, but does not run. I get the following msg-box: ' LoadLibrary failed with error 126: Das angegebene Modul wurde nicht found.»

    first items 12, new installation, serial No. accepted, installed and started again, but does not run. I get the following msg-box: ' LoadLibrary failed with error 126: Das angegebene Modul wurde nicht found.»   Installation in German on WIN7 64 bit professional, Samsung SSD. What can I do to run this program?

    Jürgen Freund

    First 12 items on Window 7 64-bit. What card card video/graphic fact your computer use - AMD Radeon?

    I found this YouTube video about the error 126 precisely to solve the problem.

    How to fix the ERROR 126 when you open programs OpenGL - YouTube

    The link was provided in an old thread from 2013 here by the ID danneomarre (see post 6 of the next thread)

    LoadLibrary failed with error 126: could not find the necessary

    Please let us know if it worked for you.

    Thank you.

    RTA

    Add on... When everything is OK and work, update the 12 to 12.1 update using Help Menu/implementation of an open project.

  • MacBook Pro-life extendable start-up chime, but does not start

    I have a start 2011 15 "MBPro8, 2

    Quad Core Intel Core i7

    2.30 GHz

    Boot ROM version: MBP81.88Z.0047.B2A.1506082204

    Intel HD Graphics 3000 VRAM:512 MB

    AMD Radeon HD 6750M VRAM:1 GB

    8 GB of RAM 1333 MHz DIMM0

    It will not start.  Trying to start the machine, it enters a loop-

    1. startup chime

    2. grey screen with Apple

    3. the small wheel starts to turn under the Apple

    4. the screen goes black

    ... and the cycle starts over.

    The computer does not start in Mode safe.  In an attempt to safe mode the loop above has the addition:

    3. a progress bar is displayed but does not progress.

    I have reset the PRAM

    It will start up in target Mode, so I was able to recover data

    In target Mode, I was able to run first aid utility on the drive.  This has not fixed the problem.

    I can hold down the Option key and see Macintosh HD and the recovery Partition.  If I try to boot from the recovery partition, I get the same loop.

    I can start in the Test of online material, which revealed no material problems

    I can boot in Verbose mode and it always happens in the same place

    Execution fsck_hfs (version 226.1.1 of hfs)

    BootCacheControl: cannot open /var/db/BootCache.playlist: 2 no such file or directory

    ' ' It would be possible for me to insert the "var/db/BootCache.playlist" file using target disk mode?

    Other thoughts?

    Have you tried resetting the SMC?

    Reset the management system (SCM) controller on your Mac - Apple Support

  • Y70 battery is connected but does not load only 61%

    I have a brand new Lenovo Y70 8.1 Windows running and the battery is plugged in but does not exceed 61%.

    It is said: 61% available (olugged, to the do not load).

    I; ve looked several times under Power Options, but I don't see any settings anywhere.

    All Updats of Windows have been installed and the update of Lenovo says it is too.

    Anyone know what is happening?

    Thanks, I found this in the application of "Lenovo settings" under "energy Manager".

  • Service pack 3 is downloaded but does not install

    Service pack 3 is downloaded but does not install

    -Box of OpenFile said Publisher unverified; Race open error box:... ENU.exe is not a valid Win32 application

    s ' Please help, I'm surprised I need it to install TurboTax! -Jim, Salt Lake City

    Although it is certainly possible that your system is compromised because he is so far behind on security patches, probably the download has been altered.

    What antivirus application do you use? What's his current subscription? Its subscription has already been authorized expiration?

    Assuming that the answers to the last 2 questions are Yes and no, respectively, download, install, update and run a scan with each of the following elements (both free).  The scans will take some time, so start one up, go and do something else for a while then come back and start the second time the first completed.

    MalwareBytes AntiMalware
    SUPERAntiSpyware

    See the following for instructions: http://groups.google.com/group/microsoft.public.windowsxp.general/msg/a066ae41add7dd2b

    You will need more of sp3 to install and use TurboTax.  In particular, you'll need .NET Framework 4 (IIRC), so be sure to complete step 5 of the related instructions.  Well, you will need to restart and then revisit Microsoft Update several times until no more need (critical) implemented to date are available.

  • Here's a strange. I have a HTML page with this time a wmv video. It works perfectly from a USB stick or SD card, but does not work when they are copied to the hard drive

    I have an HTML page created with web expression 4. It contains only a wmv video. It works perfectly when it is called from a USB stick or SD card, but does not work when they are copied to the hard drive. The results are the same with IE and Firefox. It don't make no difference if I use Media Player V9 or V11. He has no control on the page Media Player. Video and html files are in the same directory. Here is the code snippet:

    LIFT, DRAG, THRUST and GRAVITY










    If I run it on a machine with Win 7 there is no problem.

    Richard Grosser

    Hi Richard c. Grosser,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Microsoft Expression forums.

    http://social.expression.Microsoft.com/forums/en-us/categories

  • printer is offline but but does not print completely baffled!

    Completely stumped with this. I have a brother MFP990 all in a station. It is connected wireless to my network. I have a laptop computer connected wireless network and it prints fine. My desktop computer, but does not print even if it seems to recognize that it is there. The printer is communicating with my computer and let me know the ink level is low. My scanner works perfectly and scans the computer, no problem. But whenever I try to print, the computer tells me that the printer is offline. I tried to disable Norton firewall, no difference. I tried to uninstall the software, and oddly enough, during the uninstall process, an exceptional print request was printed! When I reinstalled, same problem. Any ideas?

    Hi, Frank,.

    Open the event viewer > application log

    After return that error messages/event ID is related to the question of the printer

    Start > right click on computer

    Select manage

    Select event viewer > application log

    In the meantime, try the following:

    Start > type Services.msc
     
    Press enter
    Scroll down to print spooler
    Right-click on the spooler > select Properties
    Make sure that the Startup Type is set to automatic
    Under the service stop status
    Wait for Windows to stop the printer
     
    Control Panel > open the printer folder
    Right click on the printer icon > select Open
    Do you see the documents listed in the queue for printing?
    Click file > cancel all Documents
     
    Start > right click on computer > select Manage
    Click on continue on window UAC (Vista, Windows 7)
    Select Device Manager
     
    Click on the + sign next to Ieeee... compatible printer
    Right-click on the printer driver and select uninstall
    Click on the + sign next to the imaging device (s)
    Right-click on the printer driver and select uninstall
    Click on the + sign next to printers
    Right-click on the printer driver and select uninstall
    Click on the + sign next to Bus USB controllers
    Right-click on the printer driver and select uninstall
     
    While the printer is turned on, unplug the cable from the rear
    Unplug the cable from the wall outlet
     
    Wait 5 minutes
     
    Plug the cable into the wall jack, and then the back of the printer
    Restart the computer

    Go back, and then restart the print spooler
     
    Go to the manufacturer's website and search for updated drivers

  • After a clean install of Windows Vista, Intel Wifi card is installed and activated, but does not detect the network.

    Wireless card not working after a clean install of Windows Vista

    I did a clean install of Windows Vista Home Premium on my HP Pavilion of 32 bits. I've completely updated Windows via Service Pack 2. Given that the clean install, my wireless card, Intel (r) Wireless WiFi Link 4965AGN, was not able to detect all the networks. The Wifi card is listed under NICs as being installed and activated. the hardware on my laptop Wifi switch is set on "on" and the light is blue, indicating that the card is working.

    I can connect to the internet if I connect physically my computer to the modem with an ethernet cable wireless, so the modem isn't the problem. Other computers can connect to the wireless modem, so my Wifi modem functionality is not the problem. The problem with my computer.

    I tried to uninstall the Intel driver and reboot my computer with the generic driver. Install the driver generic, but my wireless card has not always worked. I then ran an update of windows, nothing helps.

    I tried to install the "Intel® PRO /? Wireless and WiFi Link"drivers for Windows Vista (32-bit 13.1.1.1 the latest version and the previous version 12.4.4.5 32-bit) for the Intel® Wireless WiFi Link 4965AGN directly from the Intel Web site at http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Wireless+Networking&ProductLine=Intel%C2%AE+WiFi+Products&ProductProduct=Intel%C2%AE+Wireless+WiFi+Link+4965AGN. The map didn't always work with a driver.

    In addition to the pilots, I also downloaded a tool of diagnosis of Intel (Intel® PROSet /?) Utility of WiFi wireless connection for Windows Vista 32 -? Bit). Said diagnostic tool the WiFi card is not installed or enabled, however, Device Manager maintains that he is also installed and active.

    Is there a problem that causes Device Manager to say that all is well with the card, but does not map to realize that they diminish the radio signals? Everything's fine, diagnostic, it just does not detect networks around him. Help, please.

    Hello

    The on/off switch actually works?

    Since it is an internal adapter to ensure it is enabled in the settings of configuration/F2 (BIOS/CMOS) often like you
    Start - so look at the screen.

    Have you tried the computer on other WiFi networks? You had a WiFi type problem before the
    Re-install of Vista?

    ---------------------------------------------------------------------------------------------------------------------

    Your router could be suspicious here, you have successfully updated its firmware as a possible solution? And I would like to
    Update your WiFi drivers on computers. How you are positioned in the router? Are there
    obstacles in the path?

    Actually try updating your driver and disabling the network logon.

    Control Panel - network - write down of the brand and the model of the Wifi - double click top - tab of the driver - write
    version - click the driver update (cannot do something that MS is far behind the pilots of certification). Then
    Right click on the Wifi device and UNINSTALL - Reboot - it will refresh the driver stack.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    Download - SAVE - go where you put it - right click – RUN AS ADMIN.

    You can download several at once however restart after the installation of each of them.

    After watching the system manufacturer, you can check the manufacturer of the device an even newer version. (The
    manufacturer of system become your backup policies).

    Repeat for network (NIC) card and is a good time to get the other updated drivers as Vista like
    updated drivers.

    I would also turn off auto update for the drivers. If the updates Windows suggests a just HIDE as they
    are almost always old, and you can search drivers manually as needed.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    ------------------------------------------------------

    Make sure you know the details of connection to your wireless router - SSID and password.

    You lose connection when you do and have to redo your logon.

    Control Panel - Network & Sharing Center - right, click Customize - page set of network locations.
    lower left click on merge or delete network locations - REMOVE all instances of your network (and the
    others you don't use anymore) - REBOOT. Start - Connect To log on to the network.

    -----------------------------------------------------

    Check this box:

    Strange problem with Internet under Vista
    http://www.catonett.com/blog/archives/194

    Windows Vista cannot obtain an IP address from certain routers or some non-Microsoft DHCP servers
    http://support.Microsoft.com/kb/928233/en-us

    ----------------------------------------------------

    And:

    Network connection problems
    http://windowshelp.Microsoft.com/Windows/en-us/help/33307acf-0698-41ba-B014-ea0a2eb8d0a81033.mspx

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

Maybe you are looking for