Need help with trigger for whitespace and caps validation

I need to create a table trigger that will generate an error whenever a specific column does not contain all caps or has whitespace when records are either inserted or updated. I'm new to writing SQL, so any help is appreciated!

In 10g
SQL> create or replace trigger trigg_sample
  2  before update or insert on sample
  3  for each row
  4  declare
  5  lv_pos number;
  6  begin
  7  select regexp_instr(:new.col1,'[a-z|( )]') into lv_pos from dual;
  8  if lv_pos > 0 then
  9  raise_application_error(20000,'The column contains lowercase or white space characters');
10  end if;
11  end;
12  /
Trigger created.
SQL> desc sample;
Name                                      Null?    Type
COL1                                               VARCHAR2(20)
SQL> insert into sample values('DFD') ;
1 row created.
SQL> insert into sample values('dfdfd') ;
insert into sample values('dfdfd')
ERROR at line 1:
ORA-21000: error number argument to raise_application_error of 20000 is out of
range
ORA-06512: at "XLS_ADMIN.TRIGG_SAMPLE", line 6
ORA-04088: error during execution of trigger 'XLS_ADMIN.TRIGG_SAMPLE'
SQL> insert into sample values('DFDF ') ;
insert into sample values('DFDF ')
ERROR at line 1:
ORA-21000: error number argument to raise_application_error of 20000 is out of
range
ORA-06512: at "XLS_ADMIN.TRIGG_SAMPLE", line 6
ORA-04088: error during execution of trigger 'XLS_ADMIN.TRIGG_SAMPLE'
SQL>

Similar Messages

  • Need help with BAPI_PR_CREATE for BOM and Service

    Hi all,
    My requirement is to do a mass conversion program for PR creation, so I'm planning to use either BAPI_REQUISITION_CREATE or BAPI_PR_CREATE.
    The difficult part is that, I need to be able to change the compononent (BOM) for subcontracting and also be able to input service lines for service type PR.
    I know that for service I can use BAPI_REQUISITION_CREATE, it has a specific structure for that, but does BAPI_PR_CREATE provide the same functionality as well?
    As for altering component (BOM) , I couldn't find any parameter in both function to do the work.
    Does anyone have this requirement before and can advice me about this. Thanks in advance.

    My problem is solved.
    I was be able to convince the user to use standard BOM insteand of customizing them in PR. As for service, I use BAPI PR_REQUISITION_CREATE

  • Need help with Italics for ePub and InDesign CS5

    Could someone help a me out. I just can not find the answer to this and I know it should be simple, I am just missing it.
    I am creating an ePub from CS5 InDesign. All I want to do is have the italics that are shown in the text box in InDesign, show up in the epub file.
    I would prefer not to say what I have done (I think I have tried everything, but obviously I did them all wrong, so no point listing them) and I am hoping someone can do a simple, step by step guide to how to have italics show up in the ePub file.
    Sorry if this question is beneath everyone, this is really annoying that I can not figure this out on my own.

    Yup, done this.
    In InDesign, the text is Italic. It has the Character Style Italic associated with it.
    But when I export to ePub, it is not italic.
    Here is the HTML from the xhtml file for a single line of what is supposed to be italic text,
    <p class="normal normal-override-2" xml:lang='en-us'><span class="italic italic-override">Words that should be Italic.</span></p>
    The above line does not show up as italic in any of the 3 readers I am using to test with.
    Now, in the css sheet, the span.italic-override does not have anything associated to font-style. If I manually add the font-style italic, then re-pack everything, it works.
    It just seems to me a bit absurd to have to export the epub, unpack it, open it in dreamweaver, add the font-style, and repack it just to have something as simple as italic work.
    So, I am missing something, I get that... I just can't figure out what!

  • Need Help with logins for SQLPLUS and Database Control

    Hi,
    I am new to Oracle. I installed "Oracle 10g Standard Version" on Win XP Pro. I have two questions regarding logins:
    (1)     After installing the software I used “dbca” to create a General Purpose database. At the end of the database creation I clicked on the Password Management button and I entered the password for SYS, SYSTEM and SCOTT. Then at the DOS command prompt I typed “SQLPLUS” and I can login as SCOTT and system, but I cannot as login as sysdba or sysoper. I get invalid username/password; logon denied message.
    But I can type “SQLPLUS /NOLOG” and then issue command “connect /as sysdba” and connect successfully as sysdba. Any idea why I cannot login sysdba or sysoper?
    (2)     When I go to windows Start->All Programs->Oracle - OraDb10g_home1 and select “Database Control”. A browser windows open up Database Control page. I cannot start Listener nor Start up a Database Instance. No matter whether I try SYS, SYSDBA, SYSOPER or SCOTT I cannot login. Any idea what is going on here?
    At the SQLPLUS command prompt if I enter “select status from v$instance;” I get status as “OPEN”.
    I am lost in Oracle world as a typical newbie. Many thanks in advance for any advice or pointers.
    Thanks
    Joe

    (1) Yes I can login if I type "sqlplus / as sysdba". Does that mean "sysdba" doesn't have a password?
    (2) when I run "emctl status dbconsole", I get a message saying "Environment variable ORACLE_SID not defined. Please define it." Can someone tell me what should I do?
    Thanks
    Joe

  • Need help with my iPhone 5 and my Macbook Pro.

    Need help with my iPhone 5 and my Macbook Pro.  I was purchased some music on itunes at my mac. Some reason I deleted those music from both on Mac and iPhone 5.  Today, I went to my iPhone iTunes store inside of iCloud to redownload my puchased. But those song won't able to sync back to my iTunes library on my Mac.  Can anyone help me with that ??....
    iPhone 5, iOS 6.0.1

    You've posted to the iTunes Match forum, which your question does not appear to be related to. You'll get better support responses by posting to either the iTunes for Mac or iTunes for Windows forum. Which ever is more appropriate for your situation.

  • I need help with my text tone and I have ring tone. no text tone for the 4s.

    I need help with my text tone. I have ring tone no text tone. I have a 4s.

        Hi Sarar2333!  Let's get your text tones working again!
    Here's a link with instructions how to enable and change your alert sounds for your text/notification settings on your iPhone 4S: http://vz.to/1stiF8a.  You can ensure text tones are enabled by selecting a tone in the "Text Tone" setting.  Let me know how that works out for you.  Thanks!
    AnthonyTa_VZW
    Follow us on Twitter @VZWSupport

  • Need help with buying graphics card and ram for MSI 865PE NEO 2-V

    Hi,
    I want to buy 1GB of ram for motherboard MSI 865PE NEO 2-V I need help with finding correct parts.
    I also want to buy 512Mb or 1GB graphics card.
    as i said before i need help with finding correct ones so they match motherboard, I would appreciate if any one would post link to cheap and fitting parts.
    I found graphics card allready, i just need to know if it will fit.
    the card is
    NVIDIA GeForce 7600 GS (512 MB) AGP Graphics Card
    Thanks for help.

    here you can see test reports for your mobo:
    http://www.msi.com/product/mb/865PE-Neo2-V.html#?div=TestReport

  • HOW DO YOU GUYS DEAL WITH APPLE.. SO CONFUSING...NEED HELP WITH SPECS FOR PURCHASE OF IMAC 21.5

    Hi guys, been reading your forums, blogposts, etc and am getting more confused.  I'm just a video girl trying to produce meaningful content through web videos for small to mid sized businesses and want to come over from the dark side. 
    Good news,, I dont need a super giant system,  I do simple editing for web videos, minimal graphics, no motion graphics, no animation etc. currently using CS4, will probably end up with 5.5.
    I want to get imac 21.5 or 27 if i have to..  So here's the question we all have,,, what do I really need besides an Apple fairy godmother to figure this crazy stuff out?????
    I want to be able to have firewire add on, but the rest is what I need help with.   So i've been looking at cs6 specs, even though im not there yet, eventually will be,, so just need to run cs4 now and build from there.  I also want to eventually move to final cut down the road so I want imac able to upgrade to final cut.
    WHAT DO I REALLY NEED MINIMALLY FOR NOW?  WHAT CAN I GET LATER IF i CHOOSE TO DO MORE AND NEED MORE POWER?
    cs6:
    Multicore Intel processor with 64-bit support
    Mac OS X v10.6.8, v10.7, or v10.8**
    4GB of RAM (8GB recommended)
    4GB of available hard-disk space for installation; additional free space required during installation (cannot install on a volume that uses a case-sensitive file system or on removable flash storage devices)
    Additional disk space required for preview files and other working files (10GB recommended)
    1280x900 display
    7200 RPM hard drive (multiple fast disk drives, preferably RAID 0 configured, recommended)
    OpenGL 2.0–capable system
    DVD-ROM drive compatible with dual-layer DVDs (SuperDrive for burning DVDs; Blu-ray burner for creating Blu-ray Disc media)
    QuickTime 7.6.6 software required for QuickTime features
    Optional: Adobe-certified GPU card for GPU-accelerated performance
    Any responses would be great.  I know you guys are busy answering the really high end tech questions

    All the current iMac models (both 21.5" and 27" with OS X Mt. Lion 10.8) will run CS4, 5.5 and 6 just fine.  They will also run Final Cut Pro X just fine.  Ditto for most any application you may want to use.
    Below are some notes (specific to your apparent requirements) that may help you with your purchase decision:
    Notes on purchasing a 21.5" iMac
    All 21.5" iMacs come with 8GB RAM but you cannot add more later.  I strongly suggest getting the maximum RAM (16GB) when you order the iMac.
    The basic hard drive is a 1TB 5400rpm drive.  It will work fine with Adobe CS but you will probably want the added speed of the optional 1TB Fusion drive for better performance. Some people will recommend/argue for one of the optional SSD drives instead, but they are very expensive and still only come in relatively small capacities - I don't recommend the SSD drives.  Get the Fusion drive and spend any extra money on a good external hard drive for backup and/or extra storage instead of an SSD.
    Notes on purchasing a 27" iMac
    All 27" iMacs come with 8GB RAM and you can add more later, up to 32GB
    The basic hard drive is a 1TB 7200rpm drive - it will be fine with Adobe CS.  There are upgrade options to a 3TB 7200rpm drive or a 1TB or 3TB fusion drive - these will be fine also.  There are also SSD drive options, but I do not recommend them. (Same comments as above.)
    Notes on all the current iMacs
    iMacs no longer come with built-in CD/DVD drives.  If you need one, you will need to purchase the Apple Superdrive accessory drive ($79)
    All of the iMac graphic processors (GPU's) are compatible with Adobe CS 4, 5.5, 6
    It is very difficult to impossible to change or upgrade the hard drive later on, so don't buy low-end thinking you can add a better internal hard drive later.
    Be aware that Macs always come with the latest (most recent) version of OS X.  And OS X Mavericks (10.9) is due to be released soon (in the next month or two).  There is no guarantee that the older Adobe CS 4 or 5.5 versions will run on OS X Mavericks.  If you cannot upgrade to CS 6 in the near future, you may want to purchase now rather than after OS X Mavericks is released.
    For what it's worth, I'd recommend the 27" iMac if your budget can afford it.  You will appreciate the larger screen size and added capabilities over the years you will use the computer.

  • Need help with pagination for book

    I am working on a book and need help with the pagination. I was able to make the TOC and front matter show the numbers as Roman numerals, and the body of the text as Arabic numerals, but I can't figure out how to restart the numbering sequence for the body of the text. So the front matter is numbered i-xvi, and the text is 17-681. I need the text to start with the number 1. Each subsequent chapter is a section break as well, if that makes a difference.
    Many thanks,
    J

    Click on the page that shall start on number one. Open Inspector palette > Layout inspector (2nd tab) >
    Section > Start at: > 1

  • Need help with coding for HTML5 Video with Flash fallback

    Hello, need help with my coding in Dreamweaver CS5.5 for HTML5 video with Flash fallback. Not sure if the coding is correct. Do I need anything else Javascipt etc?

    The reason you see a blank page is because it's trying to load the file that is pretty humungous and there is no preloader. So, you see a white screen till it complets loading.
    Also, the reason why its loading a SWF file and not any of HTML5 type video is because your doctype declaration is XHTML1.0 and not HTML5.
    Change the 1st line in your .html file from:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    to:
    <!DOCTYPE html>
    Then see if your HTML5 video types load with <video> tag.

  • I need help with searching for an image inside another image

    I need to write a program that checks for a specific image (a jpg) inside another, larger, image (a jpg). If so, it returns a value of true. Can anyone help me?
    Winner takes all. First person to solve this gets 10 dukes.
    Please help.

    Hi,
    I would use a full screen image Sequence made with png for transparency and put your article behind. no auto play, stop at first and last image. and information for swipe to display article.

  • Need help with clickbios ii terminolgy and values. Z77A-GD65 / 3770k

    Hello All 
    I recently purchased a Z77A-GD65 board and after searching I've found the differences in terminology between this and my previous Asus board but still have a couple of settings I cant find any info on.
    System Specs:
    motherboard: msi z77a-gd65
    cpu: intel 3770k
    ram: corsair vengeance 2133mhz 1.5v
    psu: corsair 850w
    First things first is I believe I am running in turbo oc mode. I've selected the oc genie tab on the center right of the bios screen and proceeded to change settings there. With cpu voltage on auto and vdroop set to 50% at 4.6ghz. (I'll try and get screenshots of bios settings soon)
    The following are the terms I need help with:
    In the my oc genie section;
     1. Long duration power limit
     2. Long duration maintained
     3. Short duration power limit
    In the main overclocking section;
     4. Digital Compensation level (not in owners manual, options auto/high)
     5. Cpu core ocp expander (enabled for overclock 4.5ghz+?)
    In the CPU Features section;
     6. long duration power limit w (does "w" stand for watts?)
     7. long duration maintained s   (does "s" stand for seconds?)
     8. short duration power limit
     9. primary plane current limit a  (does "a" stand for amps?)
    10. secondary plane current limit
    11. primary plane turbo power limit
    12. secondary plane turbo power
    I know those are a lot of settings, but would appreciate any simple definitions as to what they do and recommended values for mild overclocking (4.5-4.80)
    Also on my previous board (Asus P8P67 Pro) my 3770k was stable in prime95 for 18 hrs at 4.5ghz fixed 1.155v with only ram timings put in manually and LLC set to extreme.(or whatever max is called in asus bios) Voltage was fixed and everything else was defailts.

    Well I'm back.  Been digging around for a few days and found some answers to my questions.
    First things first s that for some reason I could not adjust voltage values with the + or - symbols. Clearing cmos did not help this. I had to reflash the bios to get this functionality back as well as clearing cmos before and after the flash.
    So I figured out the values in the oc genie section are the same as the normal section but only used when your using the oc genie. (numbers 1-3)
    Digital compensation level and ocp expander should be set to high and enabled respectively when going for higher overclocks. (4 and 5)
    Now for the rest of my questions ( 6 through 12) I have found suggested settings and some info after hours and hours of searching but still have a couple of questions about them.
    Long/short duration power limit, and primary/secondary plane turbo limit. I see suggestion settings of 250 or 255. I take it this is simply max supplied watts to the chip? If so why the 250/255 values? Is that the highest the board will give? Is plane turbo limit related to the enhanced turbo stated and how much wattage can be drawn there while the other limit is for any non turbo frequencies?
    Long duration maintained, I've seen 60 suggested a lot. Why is this?
    There's not an over abundance of info on these boards as compared to asus so it seems info is a little less documented and video tutorials explaining things are next to none.
    Any help would be appreciated. Thanks 

  • Need Help With Download For Airport Express

    Ok, computer dummy here needing help with airport express. We were given airport express last night from a friend who recently purchased a newer gadget. He told us we would need to come here to download the operating system. I see lots of links to updates but no links for someone like me who has never had anything like this on my computer before. Does anyone know what link I would need to use? We have a pc with windows XP. Thanks so much for your help!

    Hello jesschambers. Welcome to the Apple Discussions!
    The AirPort Express Base Station (AX) doesn't have an "operating system" per se, but it does have built-in firmware which pretty much is the same thing. In addition, in order to administer the AX, you will need the AirPort Admin Utility for your Windows PC.
    Here are the links for the latest versions of both:
    o AirPort Express Firmware Update 6.3 for Windows
    o AirPort 4.2 for Windows

  • HT4528 I need help with my I phone and I can get verizon to let me on there to talk and I will have to have my phone so that I can do what you tell me to do

    I need help with my phone it is not ringing and I cant figure where in here to make it so it will something has been pushed so I cant hear any calls or texts

    Not when you insist on being so impatient.
    These are user to user support forums.  No one here is paid to read or respond to messages.
    Try explaining the issue instead of the jumbled, rambling mess of a title and we will be happy to assist.

  • Need help with ext. SWF and XML

    I'm trying to create an External SWF to load into my main
    site (photography).
    Home | Portfolio | Published Work | Bio | Contact
    The SWF I want to load externally is Portfolio because it has
    5 sections
    Those 5 sections are:
    -Editorial
    -Adventure
    -Fly Fishing
    -Multimedia
    -Weddings
    I'm looking to keep this dynamic as possible, but I'm one of
    those guys who doesn't write code from scratch, but knows AS well
    enough to modify a base or a generic template if ever given. It
    would be easier to use one subsection as an example, which could be
    applied to all others.
    e.g. "Fly Fishing" 1-Main container; 5-10 thumbnails (1
    dyanamic thumbnailcontainer)
    - I don't know XML (but can modify it). basically having an
    ID tag for each image, possibly dynamically generate a thumbnail
    too. Also have a spot for dynamic text to load in (captions with
    multiple text lines for images upon onRelease - maybe this could be
    it's own MC that loads on top of the main photo container)
    - on (release) on a thumbnail: there would be a little
    information icon that would appear. If you mouse over, it would
    overlay a layer over that specific ID photo, and the text appear.
    RollOut it would fade out the layer above that specific ID photo.
    - Transition: FadeOut/Blur/Exposure Blur, something
    interesting to that nature.
    - Thumbnails: is it just easier to create thumbnail images
    manually, and just create a separate container?
    - Image folders: I would imagine each section would have
    it's own watch folder. For example "Fly Fishing" would be a folder
    "/swfImg_flyFishing/", but perhaps having one XML file.
    - XML file details
    id
    location
    caption summary
    title
    As you can see, if I had one template to build off of, I
    could repeat it self for the others. I need help and if there is a
    flash component (free or purchase) that does at least 70% of what I
    need, please share information. thank you!Portfolio

    I know doing a pushback to the client requires Flex Data
    Services, but since I don't use FDS I can't tell you exactly how.
    But look in the documentation about "pushing" data to the client.
    Once you've figured out how to do that, you can trigger that push
    once you've finished editing the xml file. You may want to ask over
    in the FDS forum.

Maybe you are looking for

  • Markup missing in extensions

    It seems after the update from Public Beta 6 to Final Version some things are missing. Widgets were missing but have since been solved on how to make them appear. However inside of the Extensions pane in system Preferences, it seems the new Markup pa

  • Is conditional calculation in the report possible?

    Hi, While using currency translation in a query, amounts are being multiplied by 100 for currencies JPY, KRW & TWD. Is there a way to divide these currencies by 100 if currency key is one of above mentioned type? I've already checked notes 153707 & 7

  • In MSS, Other than Manager to access the employee in the Org Unit

    Hi all, IN our current project, for MSS, Head of the Org Unit (A/B 012) triggers the Personnel Change request, First Level Approver (HR-Partner from Custom Infotype) approves the PCR and Admin process the PCR. Now the requirement is changed... HR-Par

  • Offline Approval: RBBP_NOTIFICATION_OFFAPP Vs RSWUWFMLEC

    Experts, In SRM 5.0 we have given with new report "RBBP_NOTIFICATION_OFFAPP" and BADI "BBP_OFFLINE_APP_BADI" over the previously used "RSWUWFMLEC" for offline approval. But the old report also exist in the system. Can anybudy explain me if I can use

  • Rename file automatically when moving

    How can I rename a file automatically when moving a file from one folder to another when there is a file with the same name in the other folder?