Validation on the first two letter

Hi,
Can anyone help me how to write a PLSQL code.
The code should check that the first two letter is a letter and then follow by a number e.g AB123456, BC123456.
When entering a number for the first two and error should be appear.
Regards,
Ekas

Is there any PLSQL code that can check that specific validation?A check constraint will do, no PL/SQL code is needed:
SQL> create table t (col varchar2(8));
Table created.
SQL> alter table t add constraint t_chk  check (    regexp_replace(substr(col, 1, 2), '[[:alpha:]]') is null
  2                                             and regexp_replace((substr(col, 3)), '[[:digit:]]') is null
  3                                            );
Table altered.
SQL>                                          
SQL> insert into t values ('12345678');
insert into t values ('12345678')
ERROR at line 1:
ORA-02290: check constraint (HOEK.T_CHK) violated
SQL> insert into t values ('ABCDEFGH');
insert into t values ('ABCDEFGH')
ERROR at line 1:
ORA-02290: check constraint (HOEK.T_CHK) violated
SQL> insert into t values ('AB123456');
1 row created.Edited by: hoek on Jun 11, 2010 3:23 PM

Similar Messages

  • Validating the first two columns of a excel file when importing?

    Hi everyone,
    I have an excel file in the presentation server which has to be uploaded into prog.First the user adds a additonal column in the excel file.
    For example the excel file is intially in this way,
    col1 col2 col3 col4 col5
    Now the user adds one more column 'colx' in the excel sheet and he will upload it into the prog.Before uploading programatically we have to validate that the first two columns of the excel file should be col1 colx(the newly added one).How can I do it?
    Any suggestions please?
    Thank you.

    Hi gopi,
    Thanks for the reply.
    I have one more problem.Now in the excel file I may have only 5 columns in the future it may have more than that.So the internal table which will hold the uploaded values from excel file should be dynamic.I can't declare the internal table with 5 or 6 columns like that.If the user adds some columns in the excel file and upload it,the internal table should hold these columns also.
    i hope u understood my requirement.Can u give me any ideas.If u have any sample code for this kind of requirement.
    Thank you.

  • When I convert my file to excel it cuts off the first two columns, is there a way to fix that??

    When I convert my file to excel it cuts off the first two columns, is there a way to fix that??

    Hey Diann,
    Please let me know whether you are using Adobe Reader or signed up at "https://cloud.acrobat.com/"
    If you are using Adobe Reader, then try converting the file online and vice-versa.
    Let me know.
    Regards,
    Anubha

  • Why does Final Cut Pro change my title's baseline after the first two titles when exporting a master file?

    Hey Guys,
    I want to use a Zoom title (Titles -> Build In/Out -> Zoom).  I only want the title, not a subtitle.  So I insert Zoom's everywhere, type in my stuff for Line 1, delete the contents of Line 2, format it (font, tracking, etc.).  Everything looks great in the Viewer.  I let it render, then export a Master – same as source.  I open the MOV, the first two titles are great.  Then every title thereafter looks like someone changed the position by 100 pixels south of its original location.
    Here's what I've done to troubleshoot it:
    Removed all Zoom's, inserted new ones, removed the contents of Line 2 and left Line 1 alone (i.e. it still reads "Title").  When I export, everything's fine.  The moment I change formatting or put in new copy in Line 1, same thing happens – every title changes position by 100 pixels down.
    Downloaded Digital Rebellion's Preference Manager, trashed pref's/
    I'm using a TTF with a bold type body only.  Figured I'd leave it at Gill Sans Bold.  Same thing happens as soon as I type something custom into Line 1.
    I had a text style saved and removed it.  (Which wasn't easy.  Solution here.)
    Has this ever happened to you?
    Thanks!

    Hey Jim,
    Thanks for the follow-up.  Here are some more details:
    OS - 10.8.2
    FCP X - 10.0.7
    I can't update either of these because of my Avid installation.
    Something else I didn't mention – this happens in a 4K project.  Notice how a default Zoom title looks:
    Lines 1 and 2 are almost stacked on top of each other.
    Here's my title style:
    Here's what the title looks after I apply the title style, modify Line 1, and remove the contents of Line 2:
    And here's how it looks in the exported master file MOV:
    Notice how it's pushed down?
    Then I decided to make a 720p project.  No more title problems.
    So if you have some 4K footage, Jim, give it a go.  Or if there's another 4K-er out there, try this and let me know.
    Thanks!

  • I bought a ipod touch 4g. it worked realy well on the first two weeks, but them it stoped to turn sideways, and i dont know why! i have checked if the portrait orientation was locked, i tried to turn of and on,shuting down and restoring.but nothing works!

    i bought a ipod touch 4g. it worked realy well on the first two weeks, but them it stoped to turn sideways, and i dont know why! i have checked if the portrait orientation was locked, i tried to turn of and on,shuting down and restoring.but nothing works! Can someone help me i dont know more what to do!!!!.
    And this doesn't let whatch to youtube, videos, typing sideways, playns games tha need the acelerometer.......

    What happens when you try to restore the iPod? Error message?
    If this program will not get the iPod out of recovery mode your data should be safe.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • We just moved from the United States to Costa Rica.  The first two days my mac worked great.  Then all of a sudden I was trying to use a game application and the screen went black and there is a white cursor which I can move around, but I can't escape it

    We just moved from the United States to Costa Rica.  The first two days my mac worked great.  Then all of a sudden I was trying to use a game application and the screen went black and there is a white cursor which I can move around, but I can't escape it. When I restart it seems okay and I see my main screen, but only for a second and then it goes black again. 
    This computer was brand new in June.  Is it the humidity???   What can I do.  Please help!!!!

    No guarantess but try smc and pram resets,

  • I am trying to install windows 7 to my Macbook pro with bootcamp but every time I open bootcamp I am only able to check the first two boxes but not the third one saying "install or remove Windows 7", any solutions ?

    Hi, I am trying to install Windows on my MacBook Pro with bootcamp. Every time I open bootcamp I am only able to check the first two boxes but not the third one saying "install or remove Windows 7". I did this before using the same computer and the same hard drive so I am not sure why this is happening now but did´t happen then. Any solutions ?

    Was your Bootcamp info.plist manipulated to change any options?

  • Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,change remotes, no change.Help please.

    Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,changed remotes, no change. Latest software update. This is really annoying.  iPhone remote app works just fine.  Any suggestions?

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

  • Print in PDF only Prints the first two pages

    I am have been ahving problems with my creat PDF account, only printing the first two pages, when i print something to PDF from a webpage.  I.E. Pinterest.  It will only print the first two pages and the rest will be blank or incomplete.  I am at the end of my rope and dont know how to fix it.  I recently got Acrobat 9 standard thinking this may help, but the problem still exists, which irritates me more.  Please help!

    Try here: http://forums.adobe.com/community/createpdf
    There people who use CreatePDF on a daily basis there, who know much more about it .

  • When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, and the safe search button is inoperable. Suggestions?

    When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, the remainder of the results page is blank, and the safe search button is inoperable. When I turn off private browsing and refresh the page, everything works again.
    Anyone else having this problem?

    I have got the same behaviour after the last Safari Update to 5.1.3. It seems that Safari now handles some scripts in a new way. If you debug the Google Website, you will see, that there is some Javascript Error, that seems to prevent to write into local cache. After some searching I wasn't able to finde a solution for this problem, other then disabling Javascript while private browsing to prevent the script loading. You then are able to use Google with the old layout. The option to disable JavaScript can be found in the Menu "Developer", wich has to be enabled in Safari in the options first.
    In my opinion this is a bug that is now occuring, because Apple changed something in private browsing and that has to be fixed by Google now, to run again. Or we will have to wait for 5.1.4, as you can read online Apple will change and bugfix the javascript engine in that version, perhaps this fixes the problem as well. I hope so!
    If anyone is in the developer program perhaps you could test this with the beta of 5.1.4 and tell us if it works.

  • Downloads do not appear all (only the first two) in the download statusbar (could be a ff19 or downloadhelper or unmht problem)

    downloads do not appear all (only the first two) in the download statusbar (could be a ff19 or downloadhelper or unmht problem) and none in the download window
    used ff19
    with
    Download Statusbar v0.9.10 by Devon Jensen
    UnMHT v6.2.0 by http://www.unmht.org
    DownloadHelper v4.9.14
    had to revert to ff18.0.2

    Make sure that you do not run Firefox in (permanent) Private Browsing mode.
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy: Use custom settings for history
    *Deselect: [ ] "Always use private browsing mode"
    Did you try to disable other extensions?
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Only the first two episodes showing

    When I do a search on my podcast in the iTunes Store, the show comes up fine but only the first two episodes are listed. When I click on the show image and go to the show page only those two show up, all four of the episodes are displayed in the other locations that follow the feed.
    Does anyone know why this would happen?

    Actually its really strange, the two missing episodes have been up for a while ( the most recent as of 3 days ago, the older about 12 days) and they never showed up. On a whim I decided to try to resubmit my feed address thinking that maybe I had giving it the wrong one by accident and was given the response that the feed was already taken. When I canceled out of it the new episodes showed up in iTunes. I don't know how but this seems to have prompted the system to recheck my feed and recognize that there were new items available.
    Anyone know why this might be the case? Also, when I view it from the search panel only the first two episodes appear, when you open it by clicking on the image of out logo it shows all four. Any ideas on that? The podcast is called 3 Wise Woodies if you want to see what I mean about how it displays the episodes.
    Thanks for you help.

  • ITunes only burns the first two discs of audible book over and over

    I have purchased, downloaded, and burned many Audible books in iTunes successfully . . . until now.
    NOW I cannot get my current purchased book to burn correctly.
    What I do...
    I create a playlist for the audiobook.
    I drag the audiobook into the playlist.
    I right click on the playlist and ask it to burn to disc.
    I am told the book will have to be spread across multiple discs.
    I click "ok".
    The playlist begins to burn to disc.
    I am prompted to insert another disc.
    I do so.
    This goes on and on for what seems like too many discs (normally, an unabridged audio takes about 8-12 discs depending on the length.)
    I check the discs in a portable player and discover that the first two discs are fine, but that the third and fourth discs are just repeats of the first two discs.
    I check the rest of the discs I have burned (18 at this point) and find that the first two discs are repeated over and over and over again!
    What I did to try and resolve the issue:
    I checked to see if I had the latest iTunes downloaded.  I do.
    I emailed Audible and they had me delete all occurences of the audiobook from my system and then re-download a fresh copy.  I did.
    Tried to reburn the new playlist with the new downloaded audio book.
    The same issue occurrs and I waste another 18 discs.
    It should be noted that the only reason I only wasted these 18 discs each time and not more is because I finally cancelled the burn.
    iTunes was still asking for more discs on disc 18 (and the audio book was only about 10 hours long).
    Any help resolving this would be appreciated.
    Thanks.

    THIS... is precisely why I use Toast.
    I know that doesn't help a lot, but I have NEVER been fond of iTunes for burning.

  • C309a (Duplex Printing): the first two pages don't "duplex"

    Hi, I've got a little annoyance here: I love the duplex printing feature, but the first two pages don't "duplex!" The first page prints fine but doesn't get retracted back inside, and then the second page prints upside-down on a new sheet of paper.  The rest of the document "duplexes" as expected. Is there some option I'm (not) enabling?
    I'm running Windows XP SP3, wireless printing. Also for what it's worth, everything I've duplex-printed have been PDF files.
    Hopefully there's a solution and I don't have to continue leaving the first two pages of my documents blank
    Thanks in advance!

    If you have blank pages in your file you must set the print dialog through print booklet to print blank pages.

  • When I run the cursor over a template it shows several pages but when i select the document it only brings up the first two pages to edit. How do I see them all?

    When I run the cursor over a template it shows several pages but when i select the document it only brings up the first two pages to edit. How do I see them all?

    Skimming the templates in the Template Chooser shows you all of the pages available in the template once you open it. You can insert the one(s) you want, even more than one of any of them. Most users don't want or need all of the different pages, especially when they start the document.

Maybe you are looking for

  • Can my wife and I share audiobooks?

    My wife and I have separate iTunes accounts but wish to share some audiobooks.  Can I download an audiobook from my wife's iTunes account (she uses an iPad) to my iPhone 5S?  It would seem appropriate to be able to synch to a different device and cho

  • I Tunes is nor working on XP

    Hello, has anybody an idea how i get i Tunes to work again! I juist reloaded my i Tunes due to the hint that i should update it. So i did. But now it does not start again. I got the message from Windows ( in German) that Windows is not starting i tun

  • 7110 and The specified domain controller could not be contacted

    Hello, Running a 7110 with 2010.Q3.2.0 Software Release and can't seem to join a Windows 2008 SP2 x64 Active Directory Domain. I get the following: error: The specified domain controller could not be contacted, or the domain is invalid for the contro

  • For some unknown reason, Itunes won't let me edit Audio info

    So I recently synced 1891 songs to my iPhone 5. Whilst the process was completed successfully I noticed where in my itunes library all of the artists were organised accordingly. But suddenly, due to some kind of idiotic magic a lot of my music had mi

  • I have downloaded an ebook into the adobi ereader but when I try and move it across to the kobo desk

    i have downloaded an ebook into the adobi ereader but when I try and move it across to the kobo desktop, it is not appearing in the kobo desktop.