Validate the value of the item only with the alphabets and hyphen

Hi Experts,

I have a text field element, I want to create a posting as

It must contain a hyphen as a separator

example: -.

valid entry

A B

AA-BB-CC

Invalid entry

-A, A-,AA-AB-,-BC-CC-etc.

I tried certain regular expressions but found no solution,

Please suggest me a solution

Kind regards

Jitendra

declare
  v_check_string  varchar2(4000);
  v_error_message varchar2(32767);
begin
  v_check_string := trim(:p1_text_field);
  if ( v_check_string is null
     or (   translate( v_check_string, '#ABCDEFGHIJKLMNOPQRSTUVWXYZ-', '#' ) is null -- only alfabetic and -
        and substr( v_check_string, 1, 1 ) != '-' -- first character not -
        and substr( v_check_string, -1 ) != '-' -- last character not -
        and instr( v_check_string, '--' ) = 0 -- not two ore more repeating -
        )
     )
  then
    null; -- valid string
  else
    v_error_message := 'String: "' || v_check_string || '" is not valid';
  end if;
  return v_error_message;
end;

Tags: Database

Similar Questions

  • How to restore the database only with redolog, ctl and dbf files

    Hi friends,

    I had an oracle 11g database, but the server is down. So I just save only the DBF, CTL and REDOLOG files. But I couldn't save the file spfile and pwd.

    How to restore this database in the other server? How can I recreate the spfile?

    I hope someone can give me a hand.

    Thank you.

    Hello

    Thanks for all your advice.

    I try to recreate an environment equal to the original.

    I have install windows server 2003 and install the database from oracle 10.1 all default options.

    I create the directory D:\oracle\product\10.1.0\oradata\. Then I put the files (*.) CTL *. DBF, *. Log) in this directory.

    After this, I create a pfile file in: D:\oracle\product\10.1.0\db_1\database\init.ora with only the db_name and the control_file, the compatibility settings.

    Then open a CMD and create a service, set the ORACLE_SID and try to start the database:

    oradim-new - sid

    Set ORACLE_SID =

    sqlplus / as sysdba

    startup nomount pfile='D:\oracle\product\10.1.0\db_1\database\init.ora';

    change the editing of the database;

    ALTER database open;

    And, the open database

    After I install Oracle Sql Developer, and I can connect to instance and check the tables.

    But when I try to do an export of CMD, I get tracking errors:

    Export: Release 10.1.0.2.0 - Production on Jue 30 Abr 10:04:24 2015

    Copyright (c) 1982, 2004, Oracle.  All rights reserved.

    Contrase±a:

    Conectado has: Oracle Database 10 g Enterprise Edition Release 10.1.0.2.0 - product

    ion

    With partitioning, OLAP and Data Mining options

    Exportaci¾n made in el juego WE8MSWIN1252 character y el juego CARAC

    Teres AL16UTF16 NCHAR

    Exportando toda database...

    . exportando tablespace definiciones

    . exportando people

    . exportando usuario definiciones

    . exportando roles

    . exportando recursos costos

    . exportando rollback segmentos definiciones

    . exportando enlaces a the database

    . exportando sequence n·meros

    . exportando directorios alias

    . exportando espacios of numbers in context

    . exportando numbers of Ajas functions bibliotecas

    . exportando tipo p·blico sin¾nimos

    . exportando privado tipo sin¾nimos

    . exportando definiciones objetos types

    . exportando actions y objetos del sistema procedure

    . exportando actions y objetos procedure pre-sequence

    . exportando agrupamiento definiciones

    EXP-00056: is ha UN error 24324 ORACLE sown

    ORA-24324: Service Manager no inicializado

    EXP-00056: is ha UN error 24324 ORACLE sown

    ORA-24324: Service Manager no inicializado

    EXP-00056: is ha UN error 24324 ORACLE sown

    ORA-24324: Service Manager no inicializado

    EXP-00000: the exportaci¾n no ha terminado correctamente

    Someone knows this problem?

    Best regards.

  • Validate the form and submit

    Hi all, I have created a simple form that when the Send button is clicked goes to another page, I'm eager to validate the form before to ensure that the proper test was registered. I can get this working, but when I get a message box saying that the criterion is entered is incorrect and I click OK in the message box the form nevertheless opens the next page. How can I do this so that the shape is not go further if it is incorrect.

    My code is shown below, any help would be appreciated.

    I used javascript for example, when you use vbscript, but it works essentially the same. If you change the type of button HTML submit button, so it will not submit automatically when you click on it, but will run the validation function when you click on it. In the logic where the form data are validated, you can send the form then, but where the data of the form validation fails, you do not offer. Sort of, looks like you submit the form, so when data passes and fails (TheForm.Submit). Sorry I can not translate exactly in vbscript.

  • HP Officejet 4630 - number tab only allows me to use the alphabet and my password all numbers.

    Just create new Officejet4630 all-in-one. Using the wireless network wizzard.  How to make the number numbers of entry of the Panel instead of letters.  I put my word password - what is all the numbers and the wizzard picks it up as letters.

    Thank you

    RO

    Hi RoCryan,

    Please become a member of the community of HP support.  I understand you are trying to enter your network password in the Wireless Setup Wizard to connect to your Officejet 4630.

    When you try to enter a number, you press the number the number your require. While looking at the front panel of the printer when you press a number which has corresponding letters, you should get the opportunity to choose characters that you want by pressing the same number until the character, you have need is highlighted. For example, if you want a '3', when you press the '3' on the front panel of the printer, the first character is a tiny would"; you have to press 3 until the 3 is highlighted (there is place your options ', 'e', 'f' '', 'E', 'F' or ' 3' ").

  • Microphone works only with Windows 7 and StarCraft 2

    I have Windows 7 64 bit is installed on a computer HP Pavilion Elite (HP-M9600T), and I'm having problems to make my microphone to work with Windows 7 and Starcraft 2 (SC2).  The strange part is that I have an old analog microphone that works, but it's quality is very bad.  I bought 3 or 4 new microphones (some analog other USB) and none of them have worked.  I tried standalone and headset microphones.

    Whenever I tried a new micro, I went in the 'Sound' Panel and check that the microphone is not muted.  I check that the microphone level is high (and if mic boost is available I assure me that it is also at the top).  Then I test the microphone via the 'Listen to this device' feature in the properties of Microphone Panel and can hear my voice through my speakers when I talk.  I also see the green bar on the acoustic Panel fluctuate everytime I speak.  However, no one can hear me when I play StarCraft 2 unless I unplug the new microphone and plug the old microphone.  StartCraft 2 settings are configured to use the default device and StarCraft 2 also has a test feature of "Listen to this device" and I can hear my voice through the speakers.  Just like in the sound Panel, when I speak I can see the Soundbar of StarCraft 2 fluctuate in recognition of my voice.  However, only the old work of mic.  If my old microphone had a mute and better quality, I would ignore the problem.  However, this is not so I would get a new mic work.

    All the drivers seem to be up-to-date and indicate that they are working correctly.  I uninstalled and reinstalled StarCraft 2.  I also reinstalled Windows 7.  I used two generic drivers and installed the drivers RealTek supplied with my machine.  The two sets of drivers give me the same result.  I thought they might be in conflict, so I uninstalled the RealTek drivers, but I got the same result.  Teh generic drivers recognize my mic fine, but no one can hear me.  Any ideas?

    Hi tlonni,

    You can try the following steps and check if it helps to solve the problem.

    a. Click Start, click Control Panel and then double-click sounds.

    b. in the sound dialog box, click the recording tab, click on the microphone and then click Properties.

    c. click on the Advanced tab, click to clear applications to allow him to take exclusive control of this peripheral checkbox and then click OK.

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How does conditional formatting with dates in a beach (not only with a beginning and an end date)?

    In Figure 3.6.1 conditional formatting.

    I want to highlight a cell with a date, say January 8, 2016, if the date is included in a list of dates, say the following:

    Date to be highlighted in the case of:

    25.3.2013 1.8.2016 8.1.2016

    List of dates to look in:

    Header 1 Header 2 Header 3

    1.1.2016

    28.10.2015

    3.4.2012

    2.2.2016 8.1.2016 31.12.2016

    When we look at the conditional formatting rules, I found a rule of that date is in the range. So, I selected the start and the final cell in my region in the table 'List dates' and confirmed the rule. But nothing has changed - what can I do?

    Hi ohi3000,

    While conditional highlighting saw is somewhat improved, it's going to be work to do what you want. You will need to compare your cell to every cell in your range:

    For example, a rule for each cell. You could probably deal with formulas and additional cells, but which may require an extra cell for each date that you want to match.

    Quinn

  • Printer feeds a blank sheet with each printed page only with HP Envy and Windows 8

    My HP ENVY Phoenix h9 - 1440t PC running Win 8 causes my HP Photosmart C7280 AIO feed a blank sheet before printing each page.  The printer is connected wireless to the router and works normally when printing to my HP dv9000 equipped of VISTA.  Is this a problem of victory 8?  How should I do?

    Hi Gnerd5

    I understand that the computer with win8 feeds a blank page before printing the Photosmart c7280.

    You go to the website www.hp.com and download drivers for win8?

    The software may not be installed correctly.

    I would recommend that you download the drivers from the url I've provided, simply select the appropriate operating system and if it is 32 bit or 64 bit and select the driver-product installation software.

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?product=3204785&LC=en&cc=us&DLC=en&lang=en&cc=us

    or you can run the installation of printer HP Assistant for windows from the link below.

    http://support.HP.com/us-en/document/c02691615

    To determine if this is 32-bit or 64-bit click on the url.

    http://support.HP.com/us-en/document/c00757948

    If you need more simply make assistance let me know.

  • When I type, the alphabet and the numbers are mixed together. Can I fix?

    I need help fixing my computer online.  My alphabet and numbers are mixing up.

    You use a wireless keyboard.  If so, check if the batteries are charged

  • What is the value of repeat items only?

    I'm trying to understand the value of repeating only objects. I was hoping to create a list with the editable elements < li > and < li > does not have a tag that is supported for the editable regions. But it is supported as a repeat region. Can someone explain to me, or provide an example of the real world, of why this might be useful to the customer? In other words, why a customer would want the opportunity to move up, down, add, or remove an item, but not be able to change the content of the element?

    Is there a workaround to create a combo box or list items?

    Thank you.

    Hello antlion.

    You can wrap the content of the

  • s in editable divs. You have created your repeating group and applied repeatedly = "true" for the list items, but only InContext Editing allows regions editable on div, th, and td elements.

    In Dreamweaver, select the content of your

  • then choose Insert > InContext Editing > create editable region. Dreamweaver invites you to 'wrap the current selection with a DIV tag and then transform '. Click OK, and then repeat this step for each item in the list. The result will create boxes for your list items, and you look at something like:

  • In Hotmail, I can see only the Inbox but can't open messages. Also, I can not open all of the other categories. It is only with my netbook and is a recent problem. From an office, the account is fine.

    I was read and send e-mails from my netbook and desktop computer without problem. This week, on my netbook, I can only Hotmail and see the Inbox. I can not open the mail, nor can I open one of the other sections or even get to page 2 of the Inbox. There is no problem with the desktop computer. Is there something I may be changed by chance on the netbook that prevents me from using Hotmail? Thanks for any help you can give me.

    Hello Sheila and R. BruceMacdonald,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • Hot spot doesn't work only with I Phone and other devices Application Compatibility

    Point hot apperas to work and show my iPhone as a user, but I can't access the internet with the phone?

    Hello

    Thanks for posting your question in the Microsoft Community.

    You can check these links:

    iOS: Troubleshooting Personal Hotspot

    http://support.Apple.com/kb/ts2756

    iOS: Understanding Personal Hotspot

    http://support.Apple.com/kb/ht4517

    If this does not help, then contact Apple support team.

    http://www.Apple.com/contact/

    It will be useful.

  • Inline mask is used only with explicit width and height?

    As the subject says, a simple question I could not just handle set % in width and height, so I think that the inline masking is not a parent. That's why with resizable layouts I link the mask property = "{", another group of the layout. I'm doing this right?

    Thank you!

    F

    This seems to be the case.  Do you mind filing a bug for that?

  • SSL works only with 10.3 and jdk 1.6.0_13

    I get the error following activation of SSL, when I use the jkd 1.6.0_13 and WebLogic Server 10.3

    August 21, 2009 11:30:16 AM GMT + 00:00 > < emergency > < security > < BEA-090034 > < is not tuned for SSL, java.io.IOException: PKIX: OID not supported in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11. >
    < 21 August 2009 11:30:16 AM GMT + 00:00 > < error > < WebLogicServer > < BEA-000297 > < incompatible security configuration, java.security.cert.CertificateParsingException: PKIX: OID not supported in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11 >

    According to this http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=de09e021066ab47e8f8c8f62ceb43?bug_id=6832375, it is a question of WebLogic.

    Someone at - it a solution?

    Published by: user532164 on August 21, 2009 03:57

    Which JDK version? I think it was JDK 6 - update 13

    I know that there is a problem which, in a version of the JDK, Sun has added a new CA to one the cacerts file which has an algorithm that is not supported.

    http://Java.Sun.com/javase/6/WebNotes/6u13.html

    Root certificates that are included

    Root certificates are included in this version. The following root certificates have been added:

    * Two additional certificates of root CA from T-systems (see 6803022).
    * Two Unizeto root certificates (see 6803036).

    If I'm right, then the offending certificates are

    ttelesecglobalrootclass2ca and ttelesecglobalrootclass3ca

    You can remove them by using the keytool utility:

    keytool - delete - keystore $JAVA_HOME\jre\lib\security\cacerts-alias ttelesecglobalrootclass2ca - changeit keystorepass
    keytool - delete - keystore $JAVA_HOME\jre\lib\security\cacerts-alias ttelesecglobalrootclass3ca - changeit keystorepass

  • How can I get a history of the ignition and extinction of the vm

    I want to be able to see the history of the ignition and extinction for my virtual machines. It's because I want to be able to see how long it has been that some the powerd off VMs were actually absent powerd and therefore not used.

    -& gt; distribution is not good because it is cleared whenever the VM is powerd off and is powerd of VMs that I need this info for.

    I've had a good look around, but I can't seem to find something that fits my needs. I had the thought that I could create a custom field that records this but I wouldn't really know were to start.

    Any help will be appreshiated.

    Thanks for the update, I need to do the same only thing hurried upward a quick go with the code below.

    use strict;

    use warnings;

    Use File::stat;

    Use Time::localtime;

    Use getopt;

    use VMware::VIRuntime;

    use VMware::VILib;

    Use diagnostics;

    datetime #use;

    Use vars qw ($browse_task $ds_mor);

    1. validate the options and the connection to the server

    OPTS::parse();

    OPTS::Validate();

    Util::Connect();

    ##########################################################

    #################################################################

    Print "\n". ' This script can take up to 1 hour to run so maybe better to go and have a cup of tea. « \n\n » ;

    Print "looking for virtual machines with a pray of date editing NVRAM file to 2008-12-30 T 00: 00:00:-". "\n\n";

    ##########################################################

    1. get a view of all virtual machines

    My = $vm_views

    Vim::find_entity_views (view_type = > 'VirtualMachine',)

    filter = > {'name' = > qr / ^ /});

    foreach my {$vm (@$vm_views)}

    my $power = $vm-> run - > powerState-> val;

    If {(eq 'poweredOff' $power)

    My $datastores = $vm-> the data store;

    {foreach (@$datastores)}

    My $dss = Vim::get_view (mo_ref = >$ _);

    My $host_data_browser = Vim::get_view (mo_ref = > $dss-> browser);

    My $datastore_mor = $host_data_browser;

    our $ds_mor = $dss;

    My $ds = $dss-> info-> name;

    My $vmname = $vm-> name;

    my $path = [$ds] "$vmname";

    my $level = 0;

    My $browse_task;

    My $vm_array = Vim::get_views (mo_ref_array = > $ds_mor-> virtual machine);

    My @vms;

    my = $match;

    my $files = FileQueryFlags-> new (size of the file = > 1,

    fileType = > 1,

    change = > 1

    );

    My $hostdb_search_spec = HostDatastoreBrowserSearchSpec-> new)

    matchPattern = > $match,

    Details = > $files);

    {eval

    our $browse_task = $datastore_mor-> SearchDatastoreSubFolders (datastorePath = > $path,)

    searchSpec = > $hostdb_search_spec);

    };

    }

    My $vmxpath;

    1. create a vmx file path each containing a list from the data and the VC store.

    {foreach (@$browse_task)}

    My $found = 0;

    If (defined $_-> queue) {}

    My $y = $_-> folderPath;

    my $x foreach (@{$_-> file}) {}

    $vmxpath = $x-> path;

    "my $path = $y'. '. $x-> path;

    My $modif = $x-> change;

    If ($modif ' 2008 - 12-30T 00: 00:00') {}

    Print "power state =". "." $power. «' Vmname: ", $vm-> name, ««','-»»»

  • Creative cloud begins only with a white background, so I can´t install anything. My system Windows - 8.1

    Since today my creative cloud begins only with white background and nothing else. I reinstalled it twice, but the excists still problem.

    Thx for the help

    BP

    Hello

    Please try this-

    1 leave the CC desktop application by clicking on the 'Tools' icon (top-right) and choose Exit on the menu drop down.

    2. go in C:\Users\\AppData*\Local\Adobe and rename the folder to OOBE.old OOBE.

    Launch application Office CC again.

    * AppData is a hidden folder.

    Let me know the results.

    Concerning

    Dorin

Maybe you are looking for

  • Form required if condition of meeting

    I hope that someone can help me with a formula allowing several possible answers based on criteria in the worksheet 3. The first sheet has the details of the vehicle. Veh Reg front of cabin at the rear of the 27 ft. trailer Front of the cabin at the

  • When I've upgraded to Firefox 4 my refresh button has remained the same. I thought it was supposed to be news?

    You are using Windows XP, just updated Firefox and the Refresh button is always on the left side. I thought that with Firefox 4, it was supposed to be in the address bar?

  • LabVIEW arduino uno bad data transfer

    Hello I have some problems with the transfer of data from the arduino uno to labview. I did a VI where I can control the power of a heater with measurements of temperature with arduino uno. The problem is that from time to time the incorrect temperat

  • start missing rtl120.bpl

    original title: getting started on startup rtl120.bpl that said he is missing from my computer

  • Switchable graphics can I or not?

    My T61P with NVIDIA graphics died on me on Friday. I was 'under the gun' and tried to recover quickly and decided to replace it with another series of T. I scored a 'Fixer' T500 (2422 7VU; 09/09 xxxxx) off the coast of craigslist. He acknowledged my