How can I implement a check constraint like this

A column can have this values: first 3 letters can be �ing� �fig� �erd� then it can either have �1,2,4,5� and then 3 more numbers.
Like this: ing1003 or fig2432 etc.
I have tried this:
columnName LIKE �[ing-fig-erd][1-2-4-5][0-9][0-9][0-9]�
But it doesn�t work. I have been looking around and haven�t found anything that can help me with this.
Anyone got any suggesting?
Cheers
envida

CHECK(code LIKE '[ing,fig,erd,][1,2,3,4,5][0-9][0-9][0-9]'))This is a regular expression. Oracle database does not yet support regular expressoions (10g will). So what it is actually doing is apllying the whole string as a literal. Because there are no wild cards, any row where code literally does not equal '[ing,fig,erd,][1,2,3,4,5][0-9][0-9][0-9]' will fail i.e. all of them.
If you really want to use regular expressions either have a look at the PL/SQL package OWA_PATTERN or consider importing the Java Regexp package and implementing some Java Stored Procedures. Alternatively you can could cook up something using translate or replace.
Cheers, APC

Similar Messages

  • How can i modify the check constraint   in the table

    How can i modify the check constraint in the table. This table containts check constraint, condition is code_value between 1 and 4. codevalue is column name.
    Please suggest me.

    Go to tahiti.oracle.com, pick version browse reference manual and see the alter table statement
    Also read the goal of this forum.
    Your question is more appropriate to Database general forum
    General Database Discussions
    Gints Plivna
    http://www.gplivna.eu

  • How Can I Speed Up My Video Like This? (Example Included)

    iMovie is currently optimizing my video so figured i'd ask this now rather than when i'm editing.
    I recorded video of myself getting a haircut and would like to speed the video up and add some music to it; similar to this video i found on youtube.
    How can I speed up the film like this and slow it down as done in this video?
    http://www.youtube.com/watch?v=-OmFShCpXSU

    Quite easy to do.
    Watch the tutorial here:
    http://www.apple.com/ilife/tutorials/#imovie-timing
    You can access these tutorials and ask questions from within iMovie Help.
    Regards,
    Z

  • How can I do a Background image like this (example inside)

    Check this out:
    Click Here
    Notice if you view the background image by itself, its much bigger than what is appearing on the website in the browser.  Is it set to automatically adjust to your monitor size?  How can I achieve this through CSS?
    Also, how can I setup a transparent background (like in the middle of the page?)
    Thanks

    "Is it set to automatically adjust to your monitor size?  How can I achieve this through CSS?"
    It's an illusion.  The body background image is defined with a fixed position, so the image is actually floating off to the left when viewport width is decreased.  Another example of this can be seen here along with the CSS code used to create it.
    http://alt-web.com/DEMOS/fixed-background.shtml. 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    HTML Validator -  http://validator.w3.org
    CSS Validator - http://jigsaw.w3.org/css-validator/
    Tutorials - http://w3schools.com/

  • How can I export the same quality like this video ?

    I found this video and upload here :
    http://www.mediafire.com/?4uoygmlvfm5uccu
    HD 720p
    and the file size is very small : 3.87 MB with length : 38s but has very good quality.
    Does anyone know how to render like this ?

    I can only guess what you want exactly.
    To make the top menu item move left when the cursor overs above it tou could do something like:
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible {
       margin-left: -3em;
        width: 8em;
    I hope this helps.
    Ben

  • How can i implement the default value for this variable?

    In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
    The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
    select
    rec_num into RECS_TO_DELETE
    from sys_config
    where
    sys_code=55;
    But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
    In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable  in case the above SELECT INTO fails for some reason.

    Hi,
    You have to assign a value before the execution...
    DECLARE
        RECS_TO_DELETE NUMBER(9) := 1000;
    BEGIN
        SELECT rec_num
        INTO   RECS_TO_DELETE
        FROM   sys_config
        WHERE  sys_code = 55;
        DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
           DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    END;
    /Regards,

  • How can I make a smart form like this one ?

    hi
    according to my business requirements I need to create a PDF form which contains a table with variable number of rows (containing numbers) , so the user should be able to add or remove rows to the table as much as he needs to , and there should be a row showing the total at the bottom of that table.
    I'm absolutely sure that this is possible to be implemented in PDF using javascript but I need some help to do it.
    I saw a working example - the same concept I required.
    >> you could have a look here -
    http://www.windjack.com/PDFSamples/ListPrograming_Part1_XFAForm.pdf
    any idea how I can do so ?
    thank you.

    hi George
    thank you for helping.
    I thought about the same idea >> to add fields and hide them and then show them one by one upon to user reuest , but I think that will solve just a part of the problem regarding the functionality ,,, while the formatting issue won't be solved ,,, I mean look at the form I linked to ,,, the table borders and final appearance remains the same even after adding a new row.
    is it possible to do so if I used AcroForm and hide the fields ?
    and how will I get the total of those variable number of rows after user finished adding rows ?
    regarding the other thing you mentioned (pushing items down as new rows are added) ,,, I think I can avoid this by adding the table in a separate page ,,, because according to my business requirements ,,, rows that will be added won't exceed 30 maximum.
    thank you for your time.

  • How can dust get under the screen like this ?

    I have a large piece of dust under my screen about an inch up and an inch from either side of the screen.
    I use a cover on the rear of my phone, and have a zagg cover for the screen. How on earth can a speck get this far in ? I thought these were pretty much closed units.
    Is this something Apple would exchange for ?

    A forum search will reveal that several people have reported this and have gotten a replacement.
    You can make an appointment at the Genius Bar and they will let you know if they can give a replacement.

  • How can I get a cool intro like this one on my videos using iTunes?

    http://www.youtube.com/watch?v=WBMD6ihVKTo

    hi George
    thank you for helping.
    I thought about the same idea >> to add fields and hide them and then show them one by one upon to user reuest , but I think that will solve just a part of the problem regarding the functionality ,,, while the formatting issue won't be solved ,,, I mean look at the form I linked to ,,, the table borders and final appearance remains the same even after adding a new row.
    is it possible to do so if I used AcroForm and hide the fields ?
    and how will I get the total of those variable number of rows after user finished adding rows ?
    regarding the other thing you mentioned (pushing items down as new rows are added) ,,, I think I can avoid this by adding the table in a separate page ,,, because according to my business requirements ,,, rows that will be added won't exceed 30 maximum.
    thank you for your time.

  • How can I implement a Digital I/O counter with a maximum source frequency of 80 MHz (like 6602 board) using CompactRIO?

    How can I implement a Digital I/O counter with a maximum source frequency of 80 MHz (like 6602 board) using CompactRIO? It appears as if the Digital I/O modules for CompactRIO are much slower than this.
    Thank you,
    --Ray

    Hi Ray,
    The highest frequency input we offer for C Series modules is 20 MHz if you are doing LVTTL and 10 MHz for 5 V TTL.  These modules are the 9402 and 9401, respectively.  Unfortunately, there is no 80 MHz input on this form-factor.
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • How can I implement IMAQ correlation for 16bit image?

    Hi
    When using IMAQ correlate. vi in Machine vision Filter catergory, the vi only works for 8 bit source and template image case.
    16 bit source image case makes error.
    But I need 16 bit source image without losing image information, I want to use full 16 bit image correlation with 8 bit template.
    How can I implement the code in labview?
    Need help.
    Many thanks.

    Unfortunately you can't do so.
    There are some functions in the Vision Lib that only accept 8bit images. In order to use them you have to convert your image to an 8bit Image.
    Keep in mind that converting an Image to 8bit will not necessary result in a loss of data. Check your Images, it might be that you are not using the full range of a 16bit value. you might be able to use a mixture of dynamic shifting and bit shifting in order to convert an image to an 8 bit, then embedding these criterias in the image and use them to convert back to a 16bit at a later time without losing any data, or in most cases minimal precision loss. 
    If you would like to attach one of the images you are using, I can take a look at it to see if this is possible in your case.
    Good luck,
    Dan,
    www.movimed.com - Custom Imaging Solutions

  • How can I implement a comfirmation window when closing javafx application?

    hi,guys
    I'd like to add a confirmation window when user is closing my javafx application,if user click yes, I will close the application,if no ,I wouldn't close it ,how can I implement this function?
    primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                        try
                             //todo
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            });

    Hi. Here is an example:
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Pos;
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.*;
    import javafx.scene.control.*;
    public class ModalDialog {
        public ModalDialog(final Stage stg) {
         final Stage stage = new Stage();          
            //Initialize the Stage with type of modal
            stage.initModality(Modality.APPLICATION_MODAL);
            //Set the owner of the Stage
            stage.initOwner(stg);
            Group group =  new Group();
            HBox hb = new HBox();
             hb.setSpacing(20);
            hb.setAlignment(Pos.CENTER);
            Label label = new Label("You are about to close \n your application: ");
            Button no  = new Button("No");
            no.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stage.hide();
            Button yes  = new Button("Yes");
            yes.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stg.close();
             hb.getChildren().addAll(yes, no);
             VBox vb =  new VBox();
             vb.setSpacing(20);
             vb.setAlignment(Pos.CENTER);
             vb.getChildren().addAll(label,hb);
            stage.setTitle("Closing ...");
            stage.setScene(new Scene( vb, 260, 110, Color.LIGHTCYAN));       
            stage.show();
    }Test:
       import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.*;
    * @author Shakir
    public class ModalTest extends Application {
         * @param args the command line arguments
        public static void main(String[] args) {
            Application.launch(ModalTest.class, args);
        @Override
        public void start(final Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            Group root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
           primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                                    arg0.consume();
                        try
                         ModalDialog md = new ModalDialog(primaryStage);
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            primaryStage.setScene(scene);
            primaryStage.show();
    }

  • How can I implement a real time datawarehouse

    Hi, I'm a little lost here but I want to know how can I implement a real time datawarehouse in sql server, I don't know if it is only to make the extraction process the shortest time possible.
    Thank you

    Hi Mega15, 
    I agree with everything Seif and Louw said, but I'd like to add that if you are using SQL Server 2012 or 2014 and you want to use DirectQuery or ROLAP mode (depending on what SSAS mode are you using, tabular or multidimensional) you may be interested on
    using columnar indexes on your base tables. 
    Analytical and aggregated queries will take GREAT advantage from these indexes, they will perform much better than with traditional B-Tree indexes in most of your scenarios. 
    Regards. 
    Pau.

  • How can i make a CHECK in an ALTER table, to compare 2 Variables of TWO different tab

    I have 3 tables:
    EVALUATION (No_expert, No_article)
    EXPERT (No_expert, origine, name)
    AUTHOR_ARTICLE (No_Article, Code_author)
    AUTHOR (Code_author, Name, Original)
    and my question is: How can i make a check to refuse each time an EXPERT ADDED to the EVALUATION table. If this one is an AUTHOR, in other words, the EVALUATION.No_expert must <> than AUTHOR.Code_author.
    This is what i did but it doesn't work:
    ALTER TABLE EVALUATION ADD CONSTRAINT No_expert
    CHECK (EVALUATION.No_expert <> AUTHOR_ARTICLE.Code_author);
    thank a lot
    luong.

    See Disabling (graying-out) Form Fields by Thom Parker. It covers both Acrobat and LiveCycle forms.

  • In KA02 screen how can I get different functional area like (Production, Sales, Adminstration etc)

    In KA02 screen how can I get different functional area like (Production, Sales, Adminstration etc)

    Hi,
    Please check below configuration for defining functional areas for cost elements
    SPRO> FI > FI Global settings> company code> cost of sales accounting>Functional area > enter functional area
    Regards,
    Jyoti

Maybe you are looking for

  • Error: sync audio & midi

    Hi, I've searched the forum and it seems that a lot of people are having this problem - although I haven't found a solution. I am getting the following error message: "Error while trying to sync audio and midi. Sample rate 42572 recognized. Check con

  • Cost component split transfer for Profit center valuation in ke27

    Dear All, We have activated multiple valuation/transfer prices. Material ledger is also activated. We want to transfer cost component split to CO-PA by ke27. We have defined separate costing keys for access to actual cost estimate for legal and profi

  • Compile java applications,servlets etc.

    I am a newbie to java...what do i need to compile java applications,servlets etc.

  • Search help to filter values

    hi friends, appreciate your help on this search help issue TYPE   ACTCODE DUN     A01 DUN     A02 DUN     A03 COL     A06 COL     A07 i need to have a search help on selection screen when it loads, search help should have only values TYPE = DUN pleas

  • SNMP Alert.

    Hello, I am trying to find out whether the alert from the SAN switch can be pointed to my email without using snmp manager server, third party monitoring tool or call home feature. Its a Cisco MDS 9509 - version 4.2(7a) SNMP and community strings has