PL/SQL message problems 10g

Hi,
Im having a problem with using the message function in my PL/SQL statement.
When I use for example:
MESSAGE('This is an example');
No message is displayed, the condition is being checked, I can tell, because it will not let me navigate away from the field, until the field is correct, I am checking that the field is less than a certain number.
However the error message I have defined in MESSAGE('This is an example') does not appear anywhere?
Why is this?

MESSAGE function is user defined function in your project, isn't it?
You can use raise_application_error instead of that,
or you might to be able to get it by turning SEREVEROUTPUT ON.
SQL> execute raise_application_error(-20100,'My Error Message');
BEGIN raise_application_error(-20100,'My Error Message'); END;
ERROR at line 1:
ORA-20100: My Error Message
ORA-06512: at line 1
SQL> execute dbms_output.put_line('Test Message');
PL/SQL procedure successfully completed.
SQL> set serveroutput on
SQL> execute dbms_output.put_line('Test Message');
Test Message
PL/SQL procedure successfully completed.
SQL> execute MESSAGE('SHOULD NOT EARN MORE THAN MANAGER');
BEGIN MESSAGE('SHOULD NOT EARN MORE THAN MANAGER'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'MESSAGE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Similar Messages

  • Problem executing a sql query in 10g environment

    Hi,
    I am having problem executing the following sql query in 10g environment. It works fine in 8i environment.
    I tried to_number(to_char) and it did not work.
    **A.APPL_ACTION_DT >= TO_CHAR("&v_strBeginStatusDate&", 'DD-MON-YYYY') AND A.APPL_ACTION_DT <= TO_CHAR("&v_strEndStatusDate&", 'DD-MON-YYYY')))**
    Any suggestions..
    --Pavan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I would be surprised if that worked in 8i as posted, although I no longer have 8i to test. You do not tell us the error message you are getting, but there are several things wrong with what you posted.
    First, the substitution variable requires only the & at the beginning, you have one on each end of your string, the one at the end will remain in the string that is passed to the database.
    Second, you cannot TO_CHAR a string with a date format as you are trying to do. The TO_CHAR function is overloaded and has two basic forms TO_CHAR(date, format_model) and TO_CHAR(number, format_model). Note that neither takes a string. It would appear that at least current versions of Oracle choose the second signature unless specifically passed a date datatype.
    SQL> select to_char('&h', 'dd-mon-yyyy') from dual;
    Enter value for h: 12
    old   1: select to_char('&h', 'dd-mon-yyyy') from dual
    new   1: select to_char('12', 'dd-mon-yyyy') from dual
    select to_char('12', 'dd-mon-yyyy') from dual
    ERROR at line 1:
    ORA-01481: invalid number format modelalthough I suspect that the error you are getting with your posted code is more likely to be ORA-01722: invalid number.
    Depending on the data type of appl_action_date, you are probably lokoing for TO_DATE instead of TO_CHAR.
    John

  • SQL: Having problems passing a date value to dynamic SQL

    SQL Version 2008 (not R2)
    Problem:  1)  I'm getting the following error message when trying to run the sql code below.
    SQL "Messages" Returned when running code:
    Msg 206, Level 16,
    State 2, Procedure uspxc_WAWP_10_Get_VPData, Line 0
    Operand type clash: int is incompatible with date
    Loaded VP DATA for Month: 20121201
    Problem Code Line: 
    SET @dynamicSQL = 'EXEC ' + @StoredProcedureName + ' ' + @DEVModeYN + ', ' + CAST(@WIPMonth as varchar);
    Any help would be greatly appreciated.  I've spent several hours trying to get around this error.
    Full Code:
    ALTER PROCEDURE [dbo].[uspxi_XIUD_98_DataConversionGET_VP_WIPJobHistory] (@DEVModeYN nchar(1) = 'D', @WIPMonth Date)
    AS
    BEGIN 
     SET NOCOUNT ON;
     DECLARE @returnCode AS INT ,
       @dynamicSQL AS VARCHAR(8000),
       @msg as varchar(60),
       @DEVModeYN nchar(1) = 'D',
       @WIPMonth date = '20121201',
       @StoredProcedureName AS VARCHAR(60)
     SET @returnCode = 0
     SET @StoredProcedureName = 'uspxc_WAWP_10_Get_VPData'
    -- Check to see if @StoredProcedureName exists in the database.
    IF EXISTS(SELECT name FROM sys.procedures WHERE name = @StoredProcedureName)
     BEGIN 
      -- RUN SP to Import VP Data for each WIPMonth parameter value
      SET @dynamicSQL = 'EXEC ' + @StoredProcedureName + ' ' + @DEVModeYN + ', ' + CAST(@WIPMonth as varchar);
      SELECT @dynamicSQL;
      -- RUN stored procedure for WIP Month
      EXEC (@dynamicSQL);
      SET @returnCode = 0;
      SELECT @returnCode;
      SET @msg = 'Loaded VP DATA for Month: ' + @WIPMonth;
      PRINT @msg;
      GoTo SPEND
     END 
     ELSE
      SET @returnCode = 1;
      SET @msg = 'NO DATA IMPORTED for Month: ' + CAST(@WIPMonth as varchar(10))
      PRINT @msg
    SPEND:
    END
    Bob Sutor

    When you work with dynamic SQL, you should never build a full SQL string by concatenating values, because this is more difficult to get right and also has problems with SQL injection and efficient use of the SQL Server cache.
    So the correct way to do this in dynamic SQL would be:
    SET @dynamicSQL = 'EXEC ' + quotename(@StoredProcedureName)  '@DEVModeYN, @WIPMonth';
    EXEC sp_executesql @SQL, N'DEVModeYN nchar(1), @WIPMonth date',
                       @DEVModeYN, @WIPMonth
    A lot easier and cleaner! (Note that the variable @SQL must be declared as nvarchar.)
    ...however, in this particular case, this is still an overkill, and there is no need for dynamic SQL at all. EXEC accepts a variable for the procedure name, so:
    EXEC @StoredProcedureName @DEVModeYN, @WIPMonth
    ...but it does not stop there. You can make all these changes, but you will get the same error. To wit, you get the error on Line 0, which means that it is the call to the procedure that fails. Apparently, you are passing an integer value, when you were
    supposed to pass a date. Maybe you forgot to put the dates in quotes?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Message 207, Severity 16 - Invalid Column Name

    The Config Manager 2012 system seems to be very sick with SQL Message 207, Severity 16 - Invalid Column Name messages in the Management Point logs.  The column is populated by NULL values.  The error message in the logs suggests I refer to the
    Config Man, SQL, or Knowledge Base for further details.  I've looked around but I'm not really sure if this is a "repairable" problem.  Has anyone seen this before and can point me in the direction to a solution?  The server is a standalone
    Primary.

    Hi Niall and Torsten,
    Installed in September of last year.  Windows Server 2008 R2 Standard, SQL 2008 R2 SP2 (10.50.4000). 
    The text from the log reads:
    Microsoft SQL Server reported SQL message 207, severity 16: [42S22][207][Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'Distinguished_Name0'.
    Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
    Followed by:
    Discovery Data Manager failed to process the discovery data record (DDR) "D:\Program Files\Microsoft Configuration Manager\inboxes\auth\ddm.box\adsu9110.DDR", because it cannot update the data source.
    Possible cause: On a Primary site, it is probably a SQL Server problem.
    Solution:
    1. Review the immediately preceding status messages from this component about SQL Server errors.
    2. Verify that this computer can reach the SQL Server computer.
    3. Verify that SQL Server services are running.
    4. Verify that the site can access the site database.
    5. Verify that the site database, transaction log, and tempdb are not full.
    6. Verify that there are at least 50 SQL Server user connections, plus 5 for each Configuration Manager Console.
    If the problem persists, check the SQL Server error logs.
    Possible cause: On a secondary site, Discovery Data Manager probably cannot write to a file on the site server, so check for low disk space on the site server.
    Solution: Make more space available on the site server.
    As far as I can tell the services are running, there is no disk space issue, the server can access the database, not sure about the logs or the connections.

  • Form_check.php returns SQL Configuration Problem

    Hello, I am hosting the MUSE outside of BC and the form cannot send out email. http://<website>/scripts/form_check.php shows that there is a SQL Configuration Problem. How to fix?

    Repplying to myself Ok, after lots of frustration, tickets to web host admin, forum crawlign it looks like the problem was either on the PHP-versio or the name of the form. The forms were titled with Scandinavian characters and "/"-mark so after simplified the forename from muse the messages came trough! The thing is that also did change in control panel of my web host from PHP-version 4.3 to PHP 4.5 so not sure which one did the job, actually i did try with fresh-starndard forms out of Muse and also with the complexly-named ones and the later did not come trough with the PHP-version change. So i would expect that it was both - naming and php-version.
    Hopefully this will help others since painful form-issue it was. Used woo-forms for whole but in terms of easy updatebility i decided to go with MUSE one. Tool still missing crucial features like radio buttons but looks like Muse been little hobby of Adobe so features coming in one by one, slowly but surely.
    Not sure though if next time will be building site using DW since these small limitations - issues makes life so much harder. When the app works it works like charm but when issue arrises you better of building stuff from scratch.

  • Continuing the "status message problems" issue...

    in response to ralph johns suggestion to delete the buddy list file from my library to solve the outdated status message problem...
    RJ- haha.. i'm not sure i'm going to try the "beat it with a stick" approach quite yet.. i think i found out whats causing the problem. when i would use iChat on campus using our school's wireles, i didnt have the problem of outdated status messages. but when i come home, i do.. and i believe the reason is because i'm using a Belkin G Wireless router. although i do hard line, i'm almost positive this is the problem. i did some research online and it isnt one of the approved routers for iChat.
    so is my only option to buy a new compatible router to solve the problem? or is there somewhere i can go that can tell me what ports to open for a belkin router?? we're getting close... i can feel it!!! haha thanks..
    -brent

    Hi Anders,
    in order to quickly fix that problem, I would just adapt the provisioning function where the warning shows up and make sure that the function uError is called so that an error is created instead of a warning.
    Are you using the SAP Provisioning Framework or a custom provisioning framework. Which repository are you using?
    Best regards
    Holger

  • SMS_Hierarchy_Manager Errors: SQL Message 15063

    Hi there,
    I recently brought up SCCM 2012 and have started the migration process from our old 2007 environment. We have a simple SCCM configuration. One site server (primary), has the following roles installed: Component Server, Distrubution Point, Endpoint Protection
    Point, Fallback Status Point, Management Point, Reporting Services Point, Site Database Server, Site Server , Site System and the Software Update Point.
    Everything seems to be working good thus far, however the  SMS_Hierarchy_Manager Component is reporting the following error 1-5 times a day (at random times)
    Microsoft SQL Server reported SQL message 15063, severity 16: [42000][15063][Microsoft][SQL
    Server Native Client 10.0][SQL Server]The login already has an account under a different user name.
    SQL is configured for Windows Authentication. Everything seems to be working fine but I must have something
    incorrect in the SQL config (not surprising, I'm not strong on the SQL side of things). 
    Looking forward to any advice! 
    Thank you :) 

    Hi - Did anyone work out a resolution to this issue?
    I found that the error was being generated when a Discovery task was being run, which explains the random times. You can recreate the error by forcing a full discovery (Forest,
    Group, System, or User). I ran a SQL Profiler, but it didn't provide anything useful, and didn't elaborate on which user if was trying to add to the database. I our case the site server computer account is being used - it wasn't a sysadmin, but even
    after making it one it didn't make a difference.
    If anyone has other suggestions, let us know.
    Cheers,
    David
    dm

  • NEED HELP IN SQL HOMEWORK PROBLEMS

    I NEED HELP IN MY SQL HOMEWORK PROBLEMS....
    I CAN SEND IT VIA EMAIL ATTACHMENT IN MSWORD....

    Try this:
    SELECT SUBSTR( TN,
                   DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1) + 1),
                   DECODE( INSTR(TN, '#', 1, LEVEL) , 0 ,
                           LENGTH(TN) + 1, INSTR(TN, '#', 1, LEVEL) )
                   - DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1 ) + 1)
           ) xxx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XXX                               
    234123                            
    1254343                           
    909823                            
    908232                            
    12345
    SELECT regexp_substr(tn, '[^#]+', 1, level) xx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XX                                
    234123                            
    1254343                           
    909823                            
    908232                            
    12345 

  • "Blocked plug-in message" problem on my OS X 10.6.8. (Safari's 5.1.10). Any solutions for a non-techie (step 3 on Adobe Flash's instructions leads to dead end). Thanks.

    "Blocked plug-in message" problem on my OS X 10.6.8 (Safari's 5.1.10). Any solutions for a non-techie (step 3 on Adobe Flash's instructions leads to dead end, i.e. product for sale). Thank you. 

    Prior to updating flash player, you must first uninstall all previous versions.  Make sure you are downloading from the proper Adobe website = Adobe Flash Player Software
    Flash Player Uninstaller
    Repair permissions and restart your computer after the installations.

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • I get message, Problem scanning. Something went wrong. Please try again.

    My printer was working fine when scanning, but now I get a message: 
    Problem scanning.  Something went wrong. Please try again. I turned my printer off, rebooted my computer...updated the printer from hp website...but nothing.  I can see the document in preview, and I hear the scanner working.  HELP!!

    Hey there @leandermw , Welcome to the HP Forums
    I understand you're having scanning problem with your Deskjet 2540, on Windows 8.1 and would like to help you.
    I would first suggest that you run the Print and Scan Doctor, and choose "fix scanning" to see if the tool can correct the issue. Send me the results in your reply as well.
    If you have the printer connected to a network, either wireless or ethernet, try power cycling the network devices:
    Turn off the printer and computer and unplug the router for 1 minute (do not press any buttons on the router).
    Plug the router back in and wait another minute, next turn on the printer and computer and try scanning.
    You can also power reset the printer itself:
    Press the Power button to turn on the product.
    With the product turned on, disconnect the power cord from the rear of the product.
    Unplug the power cord from the wall outlet.
    Wait at least 15 seconds.
    Plug the power cord back into the wall outlet.
    Reconnect the power cord to the rear of the product.
    If the product does not turn on by itself, press the Power button to turn it on.
    Ensure the printer is plugged in directly to the wall outlet, avoiding power bars and surge protectors. This ensures the printer is receiving full power and may help greatly.
    Try scanning from the HP scan software on your computer, and also make a copy from the front of the printer.
    Write me back with the results
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • SQL injection problem

    hi
    How can we solve SQL injection problem in JDBC ?
    this means if we have a form with text field and the user must enter a number say 4 , instead he entered "4 or true" this will concatenated with the SQL query and return all records because of "or true"....
    is there any solutions ?
    i tried PreparedStatment and it words but not alwayes
    good luck

    i clearfied this in my first post
    if u didnt got what i mean u can google it
    http://www.google.com
    thanksYou didn't gently provide keywords, like I always do, so I cannot learn from you.
    Well, with a "reproduceable example" I mean that you have to post a short but complete working code snippet which reproduces the problem. So that we can copy'n'paste it in our environment here and test/debug it ourself and then eventually confirm the SQL injection.

  • Not Converted : Free-hand SQL connection problem

    While converting a Free Hand SQL report from Desktop Intelligence to Web Intelligence report in BI XI 3.1, I am faced with the problem
    Not Converted : <REPNAME> - Free-hand SQL connection problem
    It is be noted that there are some other Free Hand SQL Reports, that go converted and published without any error. The subject report has two Data Providers; one referring to the Universe and other from the Free Hand SQL tagged to a DB Connection

    Ajay,
    Some more points that can be of consideration to you to help understand my problems.
    The conversion from DeskI to WebI is in the same version BI XI 3.1 and not to BI 4.0 in which Free Hand SQLs is not supported.
    I have converted one other Free Hand SQL Report with an error "Partially Converted : <REPNAME2> - Conditional or permanent Hide Header not available in Web Intelligence", for which I had to edit the report in InfoView and un-tick the "Show When Empty" property of the table ( http://www.forumtopics.com/busobj/viewtopic.php?t=197157&view=next&sid=e6840aafa2d1267c66dae164d1dbf9db ). I think the solution mentioned in this link does not meet the purpose as the table is not displayed in the design time after the above untick.
    Coming back to our issue, further probing into this aspect I stumbled upon this link meant for RCT for BI 4.0 version
    https://csdwportal.dhhs.state.nc.us/downloads/Business%20Objects%20XI%20R4.0%20Docs/SAP%20BusinessObjects%20Report%20Con…
    where in Section 3.4.9, there is a mention of the limitation in conversion as under
    "Conversion of reports with free-hand SQL or stored procedures is only possible in Connected mode, since the Report Conversion Tool needs to use the secured connection to the database that is saved in the CMS."
    I want to how the secured connection to the database in REPNAME2 is different from the subject report REPNAME1 as REPNAME2 got partially converted. The error reported for Subject report is "Free Hand SQL Connection Problem" and not conversion problem which can occur after the connection is established.
    I did check the security properties of various FHSQL connections in the CMC and all of them are identical in nature.
    Please advise

  • Learning PL/SQL in Oracle 10G XE

    Successfully installed Oracle 10G XE on my desktop. I'm a newbie Oracle user who wants to learn PL/SQL through Oracle 10G XE.
    Is this possible? Hope you can give me tips and advice on how I would start with this?
    Thanks!

    Certainly possible. I would suggest you crack open the PL/SQL Users Guide. DO you have previous programming experience? If so, looks at the examples.

  • SQL Command problem in Application Express 3.2.0.00.27

    To Oracle Application Express Development Team,
    Yesterday I installed Oracle Application Express 3.2.0.00.27.
    While doing my r&d, I came across one problem in SQL Command.
    For example I wanted to run sql "select * from tab"
    When I checked "Autocommit" checkbox it worked fine.
    But when I unchecked the "Autocommit" checkbox it gave me following error:
    ORA-01003: no statement parsed
    Please check post
    http://www.oraclebrains.com/2009/03/sql-command-problem-in-application-express-3200027/ for more details.
    Cheers

    I can't find the log file (a good indication that something went wrong)
    Here's the transcript of the session...
    SQL> startup upgrade
    ORACLE instance started.
    Total System Global Area 599785472 bytes
    Fixed Size 1288820 bytes
    Variable Size 264242572 bytes
    Database Buffers 331350016 bytes
    Redo Buffers 2904064 bytes
    Database mounted.
    Database opened.
    SQL> @apxpatch.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Wrote file apxset.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    SQL>
    SQL> @apxldimg.sql
    PL/SQL procedure successfully completed.
    Enter value for 1: C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1
    old 1: create directory APEX_IMAGES as '&1/apex/images'
    new 1: create directory APEX_IMAGES as 'C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1/apex/images'
    Directory created.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Commit complete.
    timing for: Load Images
    Elapsed: 00:03:30.03
    Directory dropped.
    SQL>

Maybe you are looking for

  • Reports with prompting stop working when moved from Crystal10 to crystal 11

    Issue: We are having trouble with Crystal Reports XI. It appears that the Crystal 10 runtime included the ability to process reports that used prompting. If we run the same report with the Crystal XI runtime, it fails. I can send a sample of the repo

  • What happened to that little grinder on the toolbar to show it was working

    It was a little grinder/pinwheel that you could put on the toolbar it is gone. Also why isn't Forecast Fox add on not compatible

  • Remove Domain from Search indexes

    Interesting dilemma, I've created a site through iWeb, bought the domain from godaddy and hosted on mobile me for now at least. I"m using this site to communicate with friends and family about volunteer work I"ll be doing in an unsecure, developing c

  • "Failed to load resource" error

    Hello, Does anyone give me help? Some of my deployed applications became unable to run  at all. The error message in Chrome development tool's console is "Failed to load resource: the server responded with a status of 404 (Not Found)" Before last wee

  • Mass / Multiple entries in Web variables

    Hi experts, i am looking for a possibility to upload mass/multiple selection entries in variables (web queries). I didn't find standard functionality like in Excel to upload variable entries via .txt file or copy from clipboard. Does anyone know how