I need my program to fail when it encounters a letter in the employee no..

to whom..
I have this cursor below. I need it to FAIL (as in stop the program its part of) when it encounters an employee number that contains a letter in it. I thought by putting the line ..NOT REGEXP_LIKE(per.employee_number, '[[:alpha:]]').. it might work but of course it just doesn't include those ones in the selection. How can I do this?
   CURSOR c_check_employee (p_emp_number VARCHAR2, p_ni_number VARCHAR2)
   IS
      SELECT DISTINCT per.person_id, per.business_group_id, per.last_name,
                      per.start_date, per.date_of_birth, per.email_address,
                     LPAD (per.employee_number, 8, '0') employee_number,
                      per.first_name,
                      per.marital_status, per.middle_names, per.nationality,
                      per.national_identifier, per.sex, per.title,
                      padd.address_id, padd.primary_flag, padd.address_line1,
                      padd.address_line2, padd.address_line3,
                      padd.town_or_city, padd.postal_code,
                      padd.telephone_number_1, paas.assignment_id,
                      paas.assignment_number, paas.object_version_number,
                      paas.effective_start_date, paas.effective_end_date,
                      paas.job_id, paas.position_id, paas.location_id,
                      paas.organization_id, paas.assignment_type,
                      paas.supervisor_id, paas.default_code_comb_id,
                      paas.set_of_books_id, paas.period_of_service_id
                 FROM per_all_people_f per,
                      per_all_assignments_f paas,
                      per_addresses padd
                WHERE padd.person_id(+) = per.person_id
                  AND paas.person_id(+) = per.person_id
                 AND per.national_identifier = p_ni_number
    --       and NOT REGEXP_LIKE(per.employee_number, '[[:alpha:]]')
          and TRIM (LEADING '0' FROM per.employee_number) = TRIM (LEADING '0' FROM p_emp_number);Many thanks..
Steven

JackyWhite wrote:Sven W. wrote:
You could put a check constraint onto the column. This would prevent wrong values to be entered. Could I? By changing the select statement to add the line..
REGEXP_INSTR(employee_number, '[[:alpha:]]')>0
.. it will only select numbers and stop the program when a letter in the employee number is encountered? I'll give it a test now!
thanks again..If you add this as a restriction to your where clause then you won't get any errors. Those problem records will just be removed from the select.
However my suggestion had beend slightly different. You can create a check constraint on your table. This check constraint will give an error whenever somebody enters (insert or update) employee_number that have an alpha inside. I'm not sure you you can solve your current problem with that, but it might be the better long term solution. It also requires you to cleanup your data first, e.g. remove or change the "broken" employee-numbers.

Similar Messages

  • How do I delete old email addresses from the pop up list that comes up when I put a letter into the "To" box. These addresses are not in my address book.

    How do I delete old email addresses from the pop-up list that comes up when I put a letter into the "To" box? They are not in my Address Book.  Wrong addresses get in the way and I sometimes select the wrong one.

    Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
    charlie

  • My MBP can't input chinese hand writing letter when I selected a letter from the writing pad?

    my MBP (OS X Lion 10.7.5) can't input chinese hand writing letter; it didn't response when I selected a letter from the trackpad!

    cor-el,
    Thank you very much for your advice. The new software of Penpower works rightaway after I installed it on my pc. Thanks again.
    十分感激你的幫忙!

  • RFC to program sapftp failed when check in the document

    Dear Experts,
    I am facing an error while checking in the document in transaction CV01N / CV02N.
    The error is as below:
    RFC to program SAPFTP failed
    Message no. 04205
    I have searched the forum, but could not get a right one.
    While searching I found in some of the discussions that in SM59 there should 2 connections SAPFTP and SAPFTPA, which are auto generated. I could not find these 2 connections in my system. is this the problem? If so how to maintain the same?
    Thanks and Regards,
    Praveen B

    hi,
    First u check that ur RFC is enabled in ur system secondly if u r using FTP for Document storage then u need to check the storage type and established the FTP. for this take the help of an BAsis person.
    Regards

  • Selecting an object fails when creating a new dashboard using the 'New Dashboard and Widget Wizard'

    Hi,
    I am using SCOM 2012 SP1
    I have recently been experiencing an issue when trying to create a new dashboard using the wizard. I get to the step where you select a group or object to add to the  Scope and Counters section. When I try to search for a particular object such as a
    port or interface it times out and returns an error. The error is shown below:
    Please provide the following information to the support engineer if you have to contact Microsoft Help and Support :
    Microsoft.EnterpriseManagement.Presentation.DataAccess.DataAccessDataNotFoundException: Exception reading objects ---> Microsoft.EnterpriseManagement.Common.UnknownDatabaseException: The query processor ran out of internal resources and could not
    produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer
    Support Services for more information.
       at Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String methodName, Message message)
       at Microsoft.EnterpriseManagement.Common.Internal.EntityObjectsServiceProxy.GetManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions(IList`1 managedEntityTypeIds, IList`1 managedEntityBaseTypeIds, IList`1 criterias, String
    languageCode, InstanceQueryOptions instanceQueryOptions)
       at Microsoft.EnterpriseManagement.InstancesManagement.GetObjectsReaderInternal[T](ICollection`1 criteriaCollection, ObjectQueryOptions queryOptions)
       at Microsoft.EnterpriseManagement.Management.DataProviders.ManagedEntityProvider.GetManagedEntitiesByClass(ICollection`1 baseTypeNames, String criteriaString, List`1 valueDefinitions, List`1 sortValueDefinitions, Int32 maxEntities, String typePropertyName,
    String typeWithIconPropertyName, Boolean propertyCollectionRequested)
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethodInvoker.Invoke()
       at Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker invoker)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteInternal[TResult](DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteAsync>b__0[TResult](<>f__AnonymousType0`1 data)
    It appears to be complaining about internal resources, but we have not experienced this issue before and both the management and SQL servers have plenty of resource. The databases are held on a seperate dedicated sql server and I have noticed that when I
    try to search for the object, the sqlservr.exe process immediately consumes 50% CPU while the query is running. As soon as it ends (errors) the sqlservr process drops back to a reasonable number.
    No changes have been made to either the management server or sql server. We were able to create dashboards one day, but then recieved this error the next.
    Has anyone else seen this issue? or can anyone explain what is happening?
    Many thanks

    Hi,
    Asposted earlier,hadt he same problem
    when creating a Dashboard widget type
    State.
    Ones olution I found for this was as follows:
    When creating the State widget,the option
    to specify the criterion I left blank
    and finished the creation of the dashboard.
    With that managed to solve the problem.Of course this
    is not the solution, or the root cause
    of the problem.
    I will examine more about this issue, and sohave
    the ultimate solution and why such behavior,I post
    here.
    thank you
    Wilsterman Fernandes

  • I get messages that I need to upgrade Firefox but when I do I keep getting the messages, including from Firefox. The "help-troubleshooting" tab says I'm using version 8.0.1 but this isn't recognized by others.

    I get messages from gmail, Pandora, and Firefox that my browser is outdated but when I upgrade to version 8.0.1 I still get the messages. No one seems to recognize the upgrade.

    Your User Agent shows that you are using Firefox 3.5.3. Reset your User Agent following the instructions below.
    *See -->https://support.mozilla.com/en-US/kb/websites%20or%20add-ons%20incorrectly%20report%20incompatible%20browser#w_reset-your-user-agent
    *Also see --> http://kb.mozillazine.org/Resetting_your_useragent_string_to_its_compiled-in_default
    *Also see --> http://en.wikipedia.org/wiki/User_Agent
    NOTE: the information that you submitted with your question shows
    *general.useragent.override
    **Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 '''''<u>Firefox/3.5.3</u>''''' (.NET CLR 3.5.30729)
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I would like to propose sites when i type a letter in the addressbar WITHOUT highlighting it, help me ?

    Hello :)
    I am very happy when the Firefox browser suggests me sites I have already visited, when I just type one letter in the address bar, but I don't like that this letter gets highlighted in all the suggested urls,
    I'd like Firefox always to offer me these suggestions, but if possible without highlighting the letter I type, and I don't know if I can (or how to if I can) change the settings of my browser to be so,
    Can you please help me with that?
    Thanks in advance :)

    The involved CSS code can be found in this file that you can open via the location bar.
    * chrome://global/skin/autocomplete.css
    Look for class .ac-emphasize-text and apply modified rules as you like.
    You need to add the !important flag to override rules.
    Add code to the <b>userChrome.css</b> file below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    @namespace html url("http://www.w3.org/1999/xhtml");
    html|span.ac-emphasize-text {
    box-shadow: none!important;
    background-color: transparent !important;
    border-radius: 0px;
    text-shadow: none !important;
    </nowiki></pre>
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    * Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
    * Use a plain text editor like Notepad to create a (new) userChrome.css file in this folder (the names are case sensitive)
    * Paste the code in the userChrome.css file in the editor window and make sure that the userChrome.css file starts with the default @namespace line
    * Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css. Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

  • Can I delete email addresses that pop up when I type a letter in the address bar.

    my mail that I have linked to the mail app is yahoo and everytime I enter a letter into the to section it brings up other emails so I dont need to write it all out. For example: Ill type "M'" so I can email my brother and it will bring his up but then it will show other peoples email that I can click on, either to people Ive contacted once or people that I hardly ever talk to. How can I get rid of this without restting my touch?
    Thanks

    Hi A17,
    There is a way. Go to Contacts on your iPod and delete the ones that start with "M" and see if that works. Delete them from your Yahoo account, then sync with iTunes. Hope this works.
    xxmitchxx90

  • I need to know how to reset a business owned iPad after the employee that set it up has been terminated and will not divulge his password info

    I have an iPad 2 that we need to restore to factory settings.  The employee for which it was issued was terminated and no longer has the username or password that the iPad and Find My iPhone was established with. 
    I have put it into recovery mode 2x...it still prompts for the user name and password of the person that set it up. 
    What do you suggest. 

    Just had an employee terminated most acrimoniously and had an iPhone 5C that was a brick. Apple support can help remove the lock. Better hold onto your original receipt and record the Serial# !  I do not mean the MEID or IMEI but the Serial# found on the original box or Settings>General>About. In my case no receipt or Serial#.  2 hours on the phone between Apple and Verizon and got what was needed. Submitted form and got reply to allow 2-10 business days.
    Here is the form I had to complete and sent to [email protected]..
    ORIGINAL SALES INFORMATION:
    PRODUCT PURCHASE DATE:
    INVOICE/RECEIPT NUMBER:
    PRODUCT SERIAL NUMBER:
    PRODUCT IMEI/MEID:
    PRODUCT DESCRIPTION:
    BUSINESS/INSTITUTION NAME:
    REQUESTOR NAME/TITLE:
    PHONE NUMBER:
    STREET ADDRESS:
    CITY:
    STATE:
    POSTAL CODE:
    EMAIL ADDRESS:
    UNLOCK AUTHORIZATION STATEMENT: I [YOUR NAME] representing
    [BUSINESS/INSTITUTION NAME] authorize Apple, Inc. to unlock the devices listed.
    Best regards,
    The Apple Support Team

  • When I press a letter on the keyboard it does multiple letters when I only press it once

    This has only just happened and it is not always the same letter. The letter on the keyboard changes from time to time. Sometimes the keyboard is unresponsive like when I want to add numbers. I will press "s" and 5  or 6 "s" will appear on the screen.

    You could try it again, and you could also try closing all apps via the taskbar and see if that makes any difference : from the home screen (i.e. not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.

  • Invoice Print Selected Invoices program is failing when language is not US

    Hi All,
    I am trying to run "Invoice Print Selected Invoices" for multiple languages.
    When language in customer setup under "Account Site Information" is 'US' then EN-US: (Invoice Print Selected Invoices) is completing successfully.
    But when I am changing the language from US to some other language let’s say "F”, then "FR-FR: (Invoice Print Selected Invoices)" getting submitted and it is completing in error.
    These are the log messages which I am getting:-
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    p_order_by='TRX_NUMBER'
    p_customer_id='10044'
    p_open_invoice='N'
    p_check_for_taxyn='N'
    p_choice='SEL'
    p_header_pages='1'
    p_debug_flag='N'
    p_message_level='10'
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    FRENCH_FRANCE.AL32UTF8
    Entrer mot de passe :
    MSG-00100: DEBUG: AfterPForm_Trigger +
    MSG-00100: DEBUG: Multi Org established.
    MSG-00100: DEBUG: AfterParam_Procs.Get_Country_Details
    MSG-00100: DEBUG: AfterParam_Procs.Switch_On_Debug
    MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_Low
    MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_High
    MSG-00100: DEBUG: AfterParam_Procs.Get_Tax_Option
    MSG-00103: lp_trx_date_clause = and a.trx_date = a.trx_date
    MSG-00100: DEBUG: BeforeReport_Trigger.Build_Where_Clause
    MSG-00100: DEBUG: P_Choice: SEL
    MSG-00100: Oracle Error in call to Before Report Trigger -6502
    REP-1419: 'afterpform': Abandon du programme PL/SQL.
    Report Builder: Release 10.1.2.3.0 - Production on Ma Avr 2 05:59:27 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Can anyone please tell me what is the problem or is there any mistake in my approach?
    Regards
    Akash

    Please see the following docs.
    R12: Invoice Print Errors With REP-0069, REP-57054, REP-1419 [ID 557171.1]
    Invoice Print Error: Printing Selected Invoices (Multiple Languages) Is Erroring Out With REP-0069: Internal error [ID 731171.1]
    Thanks,
    Hussein

  • How do I solve "import failed" when trying to import folders to the organizer?

    When I try to import folders to the organizer I get an "import failed" message.  Then it says that files or folders selected did not contain any supported file types or they are already in the catalog.  I don't think it can be the latter because I just installed it today and haven't been able to import any files or folders.  Can anyone give me troubleshooting ideas; I can't find any in the help menus.  Thanks a bunch!!

    The JPG data might be corrupted just enough for PSE to choke on the image, although other programs can open the image OK.  Try opening one of the images in XnView, for instance, and saving that image; which will re-write the JPG data correctly.  Then see if Organizer can import it.
    Ken

  • Windows 7 fails when authenticating to another computer on the network

    In Windows 7 (home premium, 64 bit), I am attached to a VPN (Using OpenVPN). Then, whenever I try to either:
    - Use explorer to look at the file system of another computer 
    - Use the remote desktop connection on another computer
    - Map a folder on another computer as a network drive
    ... in all of these cases, I get the authentication dialog and once I send my username and password, it crashes. For example, when I use explorer, it hangs, and then comes back with the message: "Explorer has stopped working"
    I have elsewhere seen a proposed solution for similar symptoms, of deleting this key: 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions\MachineThrottling 
    However, this is not applicable in my case, as the key is not present.
    I don't think that this can be a problem with the network, because:
    a) this works fine from a different computer, running XP,
    b) I have in fact seen this working on this computer, but just once, straight after a system restore, and I can't replicate the success by doing another system restore.
    c) If it were a problem with the network, you would expect Windows to fail gracefully.
    Additionally:
    - Disabling the firewall doesn't help.
    - Disabling the antivirus software (AVG) doesn't help.
    - Doing a clean boot doesn't help.
    I'd be grateful for any suggestions.

    try changing windows authentication levels
    http://social.technet.microsoft.com/Forums/windows/en-US/aca3e2d0-6d43-431f-bbba-3c01aea6d5a6/changing-authentication-level?forum=w7itpronetworking
    http://technet.microsoft.com/en-us/library/jj852207.aspx

  • Plug ins screen says I need to update Java, and when I do I'm told the install was stopped

    The Plug-Ins screen tells me I need to update Java. I click update and everything is fine until the install. I am told that 'the install failed because it was interrupted before it could be completed'. Java says that I am running the latest version, Version 7 update 51, but Firefox says I need to update. What gives?

    Long story short, you do not need to update.
    More info, please see: [https://support.mozilla.org/en-US/questions/990988 Firefox 28.0 is indicating that my installed Java SE 7 U51 is vulnerable (2014 03 20)].

  • LOV selection fails when there are validation errors on the base page

    Hi
    I have lovs and some other required fields on a page . If there are any validation error on one of those text fields and if I open the LOV (not related to the text fields) and tries to select
    an item from the LOV search results, it doesn't do it until unless I go back to the base page and correct all the validation errors on the text fields eventhough those text fields have nothing to do with the LOV.
    Any suggestion is appreciated.
    Thanks
    Anwar

    I am on Anwar's team, and I've been dealing with the same problem, although on a different page.
    The JSPX for a contrived example is below. I can provide backing bean code, if needed.
    The form contains two LOVs. Both fields are required. If you leave both fields blank and click Continue, you get a red box around both fields and error messages are displayed. If you then click the magnifying glass to select from the first LOV, the LOV pop-up is rendered. However, you cannot make a selection, either by double-clicking a line item or by clicking OK (the OK button has no effect). All you can do is cancel.
    Interestingly, the act of clicking the magnifying glass on the first LOV gets rid of the red box around that field. So, once you cancel out, the second LOV actually does work. If there were more than two fields on the page, that wouldn't happen. The problem seems to be that the LOV doesn't work unless there are no validation errors on the page other than for the LOV which is being invoked.
    As you can see, immediate="true" is set on both LOVs. The behavior is the same whether this is true or not.
    I'm left thinking there must be something obvious that we're missing... but none of us can see it.
    Thanks,
    KEN
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document title="Add Item">
          <af:form>
            <af:panelGroupLayout>
                <af:panelHeader text="Header">
                    <af:panelFormLayout>
                        <af:inputListOfValues label="Id" searchDesc="Search" popupTitle="Supplier Id"
                                              simple="true" required="true" id="supplierId"
                                              model="#{viewScope.AddItemBackingBean.supplierIdListOfValuesModel}"
                                              value="#{viewScope.AddItemValuesBean.supplier.id}"
                                              autoSubmit="true" immediate="true"/>
                        <af:inputListOfValues label="Description" searchDesc="Search" popupTitle="Supplier Id"
                                              simple="true" required="true" id="supplierDescription"
                                              model="#{viewScope.AddItemBackingBean.supplierDescriptionListOfValuesModel}"
                                              value="#{viewScope.AddItemValuesBean.supplier.description}"
                                              autoSubmit="true" immediate="true"/>
                        <f:facet name="footer">
                            <af:panelGroupLayout layout="horizontal" halign="right" >
                              <af:commandButton text="Continue"
                                                actionListener="#{viewScope.AddItemBackingBean.continueAction}"
                                                id="continueButton" />
                            </af:panelGroupLayout>
                        </f:facet>
                    </af:panelFormLayout>
                </af:panelHeader>
            </af:panelGroupLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

Maybe you are looking for

  • Mini DVI does not work in windows

    I have no problem using the Mini DVI adapter in OSX but when I go into windows it does not work. Any suggestions would be greatly appreciated. The only reason why I use windows is for the TVUplayer, which currently has no version for OSX

  • No connection to BW system error, help!!

    Hello experts, using the Query Designer we created a certain report, which will be available on our Enterprise Portal. However, the portal is sending us an error whenever we try to execute it. The error we get is: com.sap.ip.bi.base.exception.BIBaseR

  • Moving all music off of my ipad

    I am really new to the whole icloud experience.  I am wanting to remove all music, which is 1.9GB, off of my ipad and into icloud.  My question is how do I do this??  Any help is greatly appreciated !!!!

  • Control_SearchBox.js' not found

    I have fresh SharePoint 2013 Search application and I made first crawl. Now search fails. Why? Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part

  • How to create a instance for the method

    it is showing me dump error for the call method data: i_tab type /SCMB/DM_ORDER_TAB,       grid1  TYPE REF TO /SCA/CL_SVORDER . CALL METHOD grid1->READ_BY_IDS   EXPORTING    IS_CTRL      =     IV_ORTYPE    = gt_po_detl-ortype    IV_LOCKFLG   = /SCMB/