Field constraint for days of week using single letter representation.

I know I can add a check constraint for m,t,w,r,f,s,u
How can I add a constraint that will allow any combination of the above.
For example it would allow m or mf, or mwf
Someone said it could be done with trim but I can not figure it out.
Thanks in advance.

You can use regex functions, for example :
create table t1 (v varchar2 (15) constraint c1 check (regexp_replace(
                                                      regexp_replace(
                                                      regexp_replace(
                                                      regexp_replace(
                                                      regexp_replace(
                                                      regexp_replace(
                                                      regexp_replace(v, 'm','',1,1),
                                                                        't','',1,1),
                                                                        'w','',1,1),
                                                                        'r','',1,1),
                                                                        'f','',1,1),
                                                                        's','',1,1),
                                                                        'u','',1,1) is null) );
You can try to do this code more simple, using only one regexp function.

Similar Messages

  • Char for Day of Week

    Hello
    Is there a char which stores the day of the week. Like what i mean is a infoobject which stores that 1st day means monday etc...

    Hi,
    To display the current date in report using an Exit variable on the 0CALDATE and passing the SY-DATUM should help you.
    I don't think there is an particular char which stores the day of week like sunday,monday etc...
    Hope it's useful.
    Regards,
    Suresh

  • How to write the expression for multiple texbox selection using single textbox status

    Hii frnz,
    can you see  the below image  if the value of the text box is stopped means Red i want to display the entire row(all the texboxs values should be displayd in the red colour only) should be display in Red colour only. 
    How to implemet it is in SSRS reporting side.....
    Thanks ! In Advance....

    Just give an expression as below for the color property
    =IIf(Me.Value = "Stopped","Red","Green")
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Up data for the next week or just let it go over?

    Everyone on my plan except my poor son has unlimited data - he became old enough to have a phone too late.  He is going out of town on a school trip on Thursday and is thisclose to bumping up against his data limit (which happens every month).  Normally I wouldn't do anything, but I do want him to be able to use his phone/data on the trip.  I can't find an easy way to up his data online.  Not being on hold for 30 minutes for customer service is worth something to me as well.  Should I up his data amount or just let him run over a GB?  Are we talking either $10 (to up his data plan) or $15 (to go over his data)?  I'll pay an extra $5 not to have to call them.  And then have to call them back when our new billing cycle starts in a week - LOL.

    My son has had a phone for 2+ years now, so he is well versed in using wifi when it is available.  However, we live in a rural area and wifi options are not plentiful.  His biggest drain, I think, is that he won't use his high school's wifi because he says it's crap.  Not sure I believe that, but he understands the consequences (running out of data before the end of our billing cycle) and normally lives with them without complaining.  In this one case, I want him to have data even though he's used his allotment up for the month.  We are on a nationwide plan and our billing month ends on the 6th.
    If what mrniceguy says is accurate, my choices are to call them and pay $20 and have to call them back to lower it again, or do nothing and pay $10.  In that case, I choose to do nothing and spend less money. :-)
    I have usage controls set for him, so I went in and bumped up his limit usage to close to 3 GB and will go back in May 7 or soon after and put it back to where it is normally.
    Our family must be data hogs.  I don't use a lot of data because we have home wifi and I also connect to my employer's wifi; my husband's job does not have wifi so he's a pretty big user; and my daughter, who is in college but lives off campus, routinely uses ~12 GB of data every month.
    We will stay on this plan as long as possible, and know that if we want new phones, we will have to pay full price.  We also have all the phones fully insured so that if something happens to one of our phones, we don't have to drop $500+ until we are ready to. I am going to look into moving my son to Straight Talk so that he can have unlimited data too, and if he doesn't see any negative changes, we will all switch.  No reason to pay so much more every month for the same product.
    Thanks for the replies!

  • SimpleDateFormat: when day of month becomes day of week

    I have a weird situation where the SimpleDateFormat class seems to interpret the "dd" mark as day of week instead of day of month when I use a certain pattern. The following code demonstrates the problem:
    public class ByteTest {
        public static final String PATTERN = "mm HH dd MM F";
        // public static final String PATTERN = "dd MM yyyy";
        public static void main(String [] args) throws Exception {
            String str = "11 11 08 11 1";
            // String str = "24 11 2004";
            System.out.println(strToDate(str, PATTERN));
        public static Date strToDate(String date, String pattern) throws ParseException {
            SimpleDateFormat formatter = new SimpleDateFormat(pattern);
            formatter.setLenient(false);
            return formatter.parse(date);
    }The result (at least for me) is:
    Exception in thread "main" java.text.ParseException: Unparseable date: "11 11 08 11 1"
    at java.text.DateFormat.parse(DateFormat.java:335)
    at ByteTest.strToDate(ByteTest.java:20)
    at ByteTest.main(ByteTest.java:14)
    When I change "dd" from 08 to 07, I get this:
    Sat Nov 07 11:11:00 EET 1970
    ...and finally, when I change the pattern (done here by uncommenting the commented lines and commenting the ones above them), I get:
    Wed Nov 24 00:00:00 EET 2004
    So, as you can see, for some reason "dd" is interpreted as day of week number in the weirder pattern (which unfortunately we have to use in a pattern matching thing we are using). Any ideas?
    When I comment the line with setLenient(false), it also works fine, but unfortunately we need to use that flag because otherwise users could input weird values for the various fields.
    I tried adding Locale.UK to the parsing method, but that made no difference so clearly my locale (+02:00 GMT) is not at fault.
    I also considered if the day might be out of range since using this pattern we get year 1970, but clocks start counting from 1.1.1970 right? So that doesn't seem a likely cause either. :-/
    The markers for day of week in SimpleDateFormat are E and F; so I guess the question is, when does d become E or F...

    I'm not sure I quite understand what the problem is... the reason why you can't parse that date is that it's invalid, Sunday November 8 on 1970 goes to the second week of the month, so day-of-week-in-month is 2, not 1.. so the string you should pass is "11 11 08 11 2"

  • 8500 909a is on my network for days then it disappears and reinstall is the only way back

    I am hoping someone can help me.  I am a computer reseller as well as the tech support provider to my customers.  I have tried everything that my 20 years experience has taught me and I cannot figure this out. 
    OS - Windows 7 Professional - with Administrative rights both locally and network wide.
    4GB Ram and ample hard drive space.
    Latest 8500 drivers from the web (Full package) downloaded and installed.
    Networked using Netgear VPN Prosafe with a Server (2008 Std Edition) and 3 workstations as well as the HP 8500 (909a).  I AIO wired to my router, and I have a static IP assigned in the printer.  I have also reserved the static IP in my DHCP server so that the number isn't accidently handed out.   The printer will stay on the network for days sometimes weeks.  For no apparent reason, it just disappears.  The scanning doesn't find my computer and my computer doesn't see a printer any longer.  It sees the other HP Laser I have on the network (never losing that one - ever). 
    I am very tired of uninstalling and reinstalling to get this printer back. 
    Hoping someone has an answer for me.

    I assume this is WIn7 64-bit?  If so, there are Firmware and Updates here that you should try.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Function Modules to get First day of week, month, Year

    Can anyone name the Function Modules for getting First day of week, month ,year.

    to get first day of week use this function;   WEEK_GET_FIRST_DAY
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
               EXPORTING
                    WEEK         = '201107'
               IMPORTING
                    DATE         = l_date
               EXCEPTIONS
                    WEEK_INVALID = 1
                    OTHERS       = 2.
    with DATE_COMPUTE_DAY function you can get date number in week.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.

  • How to download  n  files  to FTP server in background using single report?

    Hi all,
    I have one requriement where i have to download 7 different text ( *.txt ) files to FTP server weekly using single program in background mode.
    I have populated all the 7 internal tables with their corresponding data.  But i dont know how to proceed further.
    Please help me out .....
    Thanks in advance..

    hi,
    U can store the Internal table name and File name in an internal table.
    Then loop at that table and call function called 'GUI_DOWNLOAD' inside that loop.
    Rgds,
    Sanjeet

  • TABLE-FIELD NAME FOR AGENT (SALES ORDER)

    HI
    I am making despatch report agent wise .
    Can any one tell me the table-field name for agent it is used in saleorder
    t.code va01 .
    Regards
    Rakesh Kumar Singh

    Whereever you can see that Input Field for Agent..Click F1, click Technical Information..You can see the Table and Data Element and Field Name..
    Incase it is a structure, click on the data element..click Where Used List..You will get a list of tables.

  • Easy way to change field label for all UIs?

    How would a customer change a field label for all UIs that use this field/attribute, which is not really a translation?
    What I was able to find seems to be that we would need to edit Resource Bundles and that it will be much easier in Release 8:
    1. Section More on Resource Bundles in https://blogs.oracle.com/fadevrel/entry/translating_your_customizations has this key passage:
    This is an industry open standard (OASIS) format XML file with the extension .xliff, and store translated values for the strings used by ADF at run-time. The general process is that these values are exported from the MDS repository, manually edited, and then imported back in again.This needs to be done by an administrator, via either WLST commands or through Enterprise Manager as per the screenshot below. This is detailed out in the Fusion Applications Extensibility Guide.
    2. That blog posting also says this will get easier in Release 8:
    Currently planned for Release 8 is something called the User Interface (UI) Text Editor. This tool will allow the editing of all the text shown on the pages and forms of Fusion Application. This will provide a search based on a particular term or word, say “Worker”, and will allow it to be adjusted, say to “Employee”, which then updates all the Resource Bundles that contain it.
    3. I found the video How To Customize Field Labels but it seems that is one UI label at a time...

    Hi vedette and Uchiha.
    while we cannot talk here about features of future releases, rest assured we are working on material that will help you understand and use the functionality, from official documentation to blog posts and videos.  Please keep an eye on your blog at https://blogs.oracle.com/fadevrel and our Youtube channel at http://youtube.com/FADeveloperRelations -- as soon as R8 becomes publicly available you can expect to find useful information on those sites, among them a blog post that summarizes new features that are important for developers and then more indepth coverage.
    Thanks for your patience.
    Oliver
    Fusion Apps Developer Relations
    https://blogs.oracle.com/fadevrel

  • Decrease the field width for apex item..

    I cant decrease the field width for apex item. i used apex_item.text in the select query report region.
    i want to change the field width. i tried to change the element width..but no use. pls help how to change it.
    thanks and regard,
    skud.

    The third parameter to apex_item.text is p_size. You can set the field width with this parameter.
    Jure

  • UDF for last day of week/month

    Input is a Date(For example: 2010/03/12) in String  format.
    I need to extract the last day of that week and return it as a string output.
    For example if input is 2010/03/12 and thatu2019s a Thursday my output should be 2010/03/14 i.e Saturdayu2019s date.
    Similarly I need to extract last day of month too.
    Thanks in advance
    Soumen...

    Hi,
    I did not develop this one... but just use "search" button on roseindia and you will have the answer (I think):
    [http://www.roseindia.net/java/beginners/DayOfYearToDayOfWeek.shtml|http://www.roseindia.net/java/beginners/DayOfYearToDayOfWeek.shtml]
    and do not forget that Google is your friend...
    do a research with : Java last day of week, and you have plenty of examples.
    Thanks.
    P.S: Say us when you will solved your problem.

  • Can I use my norwegian iPhone 4 in the US for a few weeks?

    Can I use my norwegian iPhone 4 in the US for a few weeks?

    So I have lived in Daegu, South Korea for 9 months now. And our iphones work perfectly.
    Thankfully we didn't sell our phones in NZ, I had a look online and NZ doesn't lock IPhones to their networks like other countries.
    We went to SKT (in Daegu / National University of Ed) and bought new simcards for $10 each.
    Then signed up for contract / plans.
    We pay roughly $50 a month for unlimited data, 200 minutes, 600 text messages.
    It costs $9 to roam overseas a day.
    We've managed to travel to Japan and Hongkong using our South Korean sims.
    It' been pretty succesful for us.
    All I can say is, do heaps of research peeps, and don't stress :-)

  • New Discussions: for day time use only? (-: A darker blue, please!

    Thanks a lot Mods for your efforts.
    I spend some time on these boards every day, so I can see things are going better and better.
    I like the new Discussions better than the previous, especially everything that comes with this new ability to put much more on one page (like being able to see A LOT (not only five) of "Recent topics in this category", or that the topic's titles can be longuer than before, or being able to read the whole thread without jumping to "the next 15 posts" like before. I set "My Posts" to "50", this too was not possible before. Etc.)
    Now my request:
    At first I thought, like many others, that the "blue dot" and the "blue half-dot" were too small, and that we couldn't see the small grey "New!" because it was not red.
    Now after all this time since Nov14, I finally understood what was wrong, because
    (1) the new kind of eye fatigue I didn't experienced before, and
    (2) a change in my computer's room lighting configuration.
    The real problem is not the blue dot size (altough I'm sure if it was a square it would work better), it is its environment.
    We have a white line after a light blue line, and this is a great feature to differenciate between topics. Works great within a thread too, to differenciate posts.
    But one side effect of this is that the whole page "feels" slightly blue.
    I'm not sure, but a human eye physicist could perhaps explain another kind of (more insidious?) side effect caused by the alternance of lines. Perhaps depending on which color are chosen for them?
    Anyway, there is no problem with a page that "feels" blue, when the text is black.
    The problem starts when the text ALSO is blue. Especially light blue...
    I find the text blue color too light. Even the "visited link" purple is too light.
    Given that the background is blueish, I mean. Otherwise it'd be fine.
    This was not easy to understand, because the [defect/effect] is not obvious: the overall picture is nice.
    But it became obvious to me when I saw that I have no problem IF I set my screen's brightess to "very bright".
    New Discussions: for day time use only?
    ==> Please, would it be a problem (or too difficult to set perhaps?), to try a darker blue text for two or three weeks, see if we like it better? (along with a slightly darker purple for the visited links).
    Thanks again for all the great work!
    Axl

    Hi Axl,
    Some one had posted this about color,I do not remember who,sorry.
    I thought it was interesting.Hopeful this color issue can be alter but deepening the colors as you & many have requested.
    http://www.grc.nasa.gov/WWW/usability/colorcss.html
    Good luck, Eme

  • Unless I repair my hard drive every other day I am unable to delete songs from iTunes or email messages from Postbox. I've only had an iMac for a few weeks, is this normal?

    Unless I repair my hard drive every other day I am unable to delete songs from iTunes or email messages from Postbox. I've only had an iMac for a few weeks, is this normal?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if it frightens you, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

Maybe you are looking for

  • DMS_integration points

    Hello Team, We are implementing DMS for loading of drawings, pdf excel and word files for the customer in the content server. As i am new to DMS i had earlier posted threads and have got very large useful help from this forum. Now my doubt is which a

  • Publish to Flickr in LR4

    When I try to publish to Flickr from LR4 after about an hour I get error saying file to large.  Only published about 17 out of 600 images. If I try to restart fails quickly.  How do I publish all of these to Flickr.

  • HFM APP error when loading security file

    <p><font size="2" color="black">Good Day,</font></p><p> </p><p><font size="2" color="black">I am getting this error whenloading security file in HFM APP.</font></p><p> </p><p><font size="2" color="black">User not found with identity=native://DN=cn=0a

  • I can not open youtube videos on my macbook pro

    i can not open youtube videos on my macbook pro, it says "this video is currently unavailable" in every video I open

  • Installing Windows on a separate partitioned hard drive?

    Hi I have updated my MacBook Pro to 10.5 with Boot Camp. I want to run Windows XP on this computer but I do not want to partition my laptop's hard drive itself. Is their a way I can use my external hard drive instead to run Windows instead of my lapt