Syntax to only allow certain values in column

What is the syntax, when I create a table, to only allow certain values in a specific column ?
create table x
col1 char(1) <- for example, only want to allow Y or N
) tablespace myspace;

That would be a check constraint. Please check the oracle syntax on constraints.
create table x
col1 char(1),
CONSTRAINT check_col1
CHECK ( col1 in ('Y','N') )
) tablespace myspace;

Similar Messages

  • (new to scripting) Only allow certain paragraph styles to break to next column/page

    Hi all,
    As stated, I'm very new to scripting. I've done a few small scripts to automate Photoshop tasks and such. I'm in the process of trying to learn Javascript as much as possible, with the hope of bringing about more efficiency for our small production department. It's a daunting task, but I'm trying my darnedest.
    One of the number one goals I have is the find a way to automate pagination of weekly transaction records. These records run between 32 to 48 pages normally, with each page having 5 columns. Creation of these pages is very systematic, so it would seem that this process should be able to be automated, but there are some challenges I'm having a hard time thinking about how to attack.
    One of the key tasks needing to be figured out is getting the records to go in with headings and subheadings always starting at the top of a page/column. Just about all the copy comes in with predetermined paragraph styles, so a script should easily be able to search for instances of each style. What needs to eb accomplished is only allowing the flow of copy to break on certain styles and not others ... (counties, towns, etc.)
    For example: if you have the following  ...
    Countyland <styled "county">
    Utopiatown <styled "town">
    46 Appletree Lane ...... $500,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Dystopia Village <styled "town">
    47 Orangeplant Road ...... $400,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    If the two records above were to fall near the end of a column, the break to the next column should NOT occur anywhere except:
    - Before the county (causing the county to start at the top of the next column
    - Before the second town (Dystopia Village, forcing that town to the top of the next column)
    - After both (forcing whatever town/county is next to goto the top of the next column)
    So basically, I need to find a way PREVENT column breaks where they should not occur. Inserting column breaks is one thing (I know how to do that). Prevention is the issue though that confounds me.
    Does anyone have any thoughts of how to achieve such a thing? I know there are "non-breaking space" characters ... is there, or could there be, some kind of a "non-breaking return" character? Or would it be more feasible to test for the paragraph style at the bottoms of columns and insert column breaks in once it finds an appropriate match?
    Am I going about this all wrong?
    Again, any help or suggestions are more than welcome.
    Thanks much.
    ~Nate
    FYI .. using InDesign cs5.5

    I am now wondering about a possible solution. It would be one hell of a challenge for me to figure out how to code it, but I at least need to figure out the theory first, then I'll try to figure out how to code it.
    Again, the issue at hand is preventing column breaks for the "listing" style in the following example. Please note, the number of "listing" lines varies. If the following two entries (in a long list of similar entries) were to be near the end of a column, I'm trying to cause the flow of text to break only before a county style, or a town style (if it's not the first town in the county).  Basically, no breaks in the middle of listings.
    Countyland <styled "county">
    Utopiatown <styled "town">
    46 Appletree Lane ...... $500,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Dystopia Village <styled "town">
    47 Orangeplant Road ...... $400,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Naomi previously suggested messing with the "keep options" in the styles. This will solve the issue of preventing breaks before listing details start. But it won't help in keeping listing details from breaking, since the number of lines can vary.
    I'm now thinking ... might it be possible to have a script search all copy, looking for the last line of listings, and then apply a second listing style with a different keep option setting? The "normal listing" style would "keep next 1 line". The "last listing" style would not, therefore, allowing a break.
    Here's a map of what I'm thinking: (bear with me on the terrible syntax, this is just for illustrative purposes)
    listingNormal has keep with next 1 line applied
    listingBreak does not keep with next line
    if currentLineStyle == listingNormal
    AND
    style of next line != listingNormal {
    currentLineStyle = listingBreak
    Does this make sense? If so, does this sound feasible?
    Thanks any and all.
    ~Nate

  • How do I only allow certain users to print in color?

    Product Name: HP Color LaserJet Professional CP5225dn Printer (CE712A)
    Operating System Installed: Windows 7 Enterprise (64bit)
    I work at a K-12 school and purchased the HP Color LaserJet Professional CP5225dn Printer (CE712A) for use in our computer lab. I would like to know if it is possible to have it so that only certain users can print in color (possibly put a password on it). I know the cost for color is higher, and therefore, would like it so that students have to approve through teacher if they want to print in color.
    We are running it on our Print Server (networked) not through USB.
    Thank you for the help.

    Hi,
    That's a very good question actually. In my corporate networks, we are talking about hundreds of laser printers and the ONLY thing we can do: only allow people access to a set of mono laser printers, not all printers. For example, the following printer is using B&W as default but can't stop users to print in colors if they could access to the resourse:
    Regards. 
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Detail page only for certain values

    I have a page that searches a few tables.
    its a overall search, but there are records we dont want to
    allow anyone to
    edit based on a value.
    So my question is... i have a results page which is already
    setup to display
    all records found.. with a link(go to detail page) how can i
    code it so if
    any of the results have a certain value that link is not
    available?
    Example
    Name Phone Email
    Contact Details
    John 555-555-5555 [email protected] Yes View
    Dave 222-333-4545 [email protected] No
    Jess 854-896-7852 [email protected] Yes View
    Using ASP, SQL2005 and DW8

    Can anyone help with this one?
    I just want to disable the link to the detail page if the
    value for Contact
    is NO then disable Details link
    Using ASP, SQL2005 and DW8
    "Daniel" <[email protected]> wrote in message
    news:f2d35r$806$[email protected]..
    >I have a page that searches a few tables.
    >
    > its a overall search, but there are records we dont want
    to allow anyone
    > to edit based on a value.
    >
    > So my question is... i have a results page which is
    already setup to
    > display all records found.. with a link(go to detail
    page) how can i code
    > it so if any of the results have a certain value that
    link is not
    > available?
    >
    > Example
    >
    > Name Phone Email Contact Details
    > John 555-555-5555 [email protected] Yes View
    > Dave 222-333-4545 [email protected] No
    > Jess 854-896-7852 [email protected] Yes
    > View
    >
    >
    >
    > --
    > Using ASP, SQL2005 and DW8
    >

  • I want to set up Firefox to only allow certain pages to load - how do I do this?

    My children are having my old laptop and I dont want them to be able to 'stumble' across anything unsuitable.
    How can I set up Firefox so that it only allows pages to load from websites I choose?
    Thanx!

    See:
    * https://support.mozilla.com/kb/Parental+controls
    * http://kb.mozillazine.org/Parental_controls

  • Blocking p2p or setting up a firewall to only allow certain programs?

    Hello there,
    I have a wireless dual-n router (WRT610N) and a cable modem (CM100) both from linksys.
    My problem is that we live in an aprtment with 6 people and sometimes the connection crawls even with 2-3 people using the internet. My concern is that my roommates are file sharing like hell sometimes and eating all the bandwith. We're talking 20second to load the google main page slow, no person should be making the network that slow when it's just me and them using it.
    So I'm interested in options to block access to bandwith killing activities. Friends have recommended that I set up a firewall and only permit certain programs access but I have no idea how to go about doing this. Another option would be if their was just a way to limit their bandwith, I already have my computer set with the highest prioriety on the network and it doesn't help.
    Please let me know of any solutions you can suggest for this problem it sucks to be dishing out extra for highspeed internet + powerboost just to have all of fizzle away the second the connection hits the router.  

    You cannot limit their computer's bandwidth, however if you know what time they are using the bandwidth and downloading from Internet you may block the Internet access for them using the Access Restrictions, you can enter their MAC Addresses and schedule a time when you want to Deny Internet Access for them...

  • Only allowing certain photos to be sent in SMS

    Hello,
    I have only had my Xperia Z3 Compact for a few days, but I have taken several photos on it. When I try and send a photo through a text message it only shows certain ones which will send. Any other photo I choose pops up with "photo could not be added". Why does it do this and how can I fix it to send all of my photos?

    Try this
    settings > apps > all > album/messaging > clear data > restart the phone and check again 
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • How to 'Only' allow Numeric value in the Edit Box in AcroDialogs

    Hi all,
    I've create an AcroDialog wizard, I need to allow onlu numeric values in the Edit Box. Can someone please help me with this validation?
    Regards,
    Chris

    There isn't a keystroke event for custom JavaScript dialogs, or any proper interactive events for the fields.  You can validate fields when the user presses OK, and you can test fields when the user changes focus by setting the "Action" property for the field.  But the only practical way to restrict user input to numbers is to use George's suggestion.  There is a number property for the fields but it has an undesirable side affect and I never use it.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • How can I restrict Lion to only allow certain network users to login when bound to an Active Directory?

    Hi,
    I'm trying to find a way to configure which network users can login to a lab of iMacs running 10.7.4. They're being deployed using DeployStudio, and the Macs are bound to an MS Active Directory by a script that runs as part of the workflow. I'd like to have another script run after the AD binding to permit only users in certain AD groups to be able login to them.
    I'm halfway there, in that using dseditgroup I can easily add AD groups or individual users to the relevant group (deseditgroup -o edit -a <domain\\group name> -t group com.apple.loginwindow.netaccounts. After running this I can see the desired groups added to the list in Sys Prefs -> Users & Groups -> Login Options -> Options. However, membership of this group is deemed irrelevant by the fact the radio button above this list for 'Allow these users to log in at login window' is still set to 'All network users' and not 'Only these network users'.
    Does anyone know of a way to enable the 'Only these network users' option via the Terminal/a shell script?
    Thanks,
    Chris

    I tried that, thinking it was exactly what I wanted, but it still sends stuff as SMS (green bubble).

  • How to only allow certain users to use internet?

    Hello, I've recently taken over the job of overseeing the internet connection here in my building. We have a shared internet connection and I was told to just give out the same WEP key to everyone. The problem now is that many people have canceled, but the WEP key still works. I want to make sure that only people paying for the service are using it. What is the best way of doing this?
    1. Generate new WEP keys? I think I can only generate 4. Is there a way of generating more?
    2. Block certain "Device Numbers" or "mac addresses?"
    I really know very little, so any help would be really appreciated.

    change the wep key first and then go to the go to the wireless and then on wireless network access (on the set-up page of your router) and click on the button select MAC address of networked computers and it will display the mac address of the client's that was able to connect using the new key and so you can just easily copy it on the permit only MAC address box to flter the connectoin.  So it's much easier than askign each 1 of the client's for the mac address.
    Do this right after dissemnating the new wep key to the clients,

  • TS3581 My Bluetooth only allows certain tunes to be played

    I've successfully connected by iTunes to the Bluetooth system on my Prius, and although the entire playlist is on the display only certain tunes are playable; it's as if the touch screen has a mind of its own.  Does anyone know what I'm doing wrong?  There's nothing in the manual about it.  I've re-connected, and it still doesn't work.  Free downloads from Starbucks, however, do play. 

    I have the corolla 2014 with my iphone 4 ios 5.1.1 connected by bluethoot and it seems there is one bug...
    I dont know if its the same for you but before pairing the iphone to your car you have to go to your music in your iphone and choose Songs.. When you are in Songs push play on a song then pause.. after that go to the bluethoot section for pairing the iphone to the car.. All the Songs Will be fine like that.. But if you switch to Album in your iphone it Will only play this album and you Will not be able to change to an other album... The iphone has to start on the "Songs" section in music.. It's a kind of weird bug.. But you can play all the songs that way but not by album.. It is like that for me on ios 5.1.1 i dont know if ios 6 or 7 will change something but i dont like the 6 or 7 and a lot of usefull things have been removed.. Anyways ;)

  • I cannot get my new Ipod Nano to pair with my bluetooth Headphones. It just searches endlessly.  These same headphones work with my blackberry playbook.  Does Apple only allow certain bluetooth devices to pair?  i.e. only the ones sold on their site?

    I cannot get my new Ipod Nano to pair with my bluetooth Headphones.  It searches without finding it. This headset works fine with my blackberry playbook.  Any suggestions? 

    thanks for reply... I saw on the Nano package that it is only compatible with bluetooth 4v.  Is that the same as A2DP.
    That's probably the problem... it wasn't a high-end headset. 

  • PO approval only when certain value in PO is changed from its referrence PR

    Hi All,
    Need your help on this one. I have a scenario, where it is mandatory to have an approved Purchase Requistion as a reference to create a PO. I have configured this part. Now, the requirement is, because this PO is getting created in reference to an approved PR, it doesn't require any approval. However, if the buyer changes any value in the PO, which is different from the PR, then it would trigger a Purchase Order approval.
    Please do let me know, if there is a standard way to map this scenarion in SAP ECC 6.0.
    Thanks and Regards,
    Anirban

    Hi Ravindran,
    Thanks a lot for your inputs. I have done the PO approval configuration, and the PO approval is working fine. My problem is that, when I am creating the PO with an approved PR, the PO approval is getting triggered. I do not want that. I want the PO approval to not get triggered, because, it is getting created with reference to an approved PR. However, if the buyer makes any changes in the PO, which changes the value of the PO as compared to the PR, then it should trigger the PO approval process.
    Any tips/comments on this particular scenario? Would be looking forward to your reply.
    Thanks and Regards,
    Anirban

  • Pulse train generation fails with certain values for "number of samples"

    I'm generating a retriggerable analog output signal, and so I'm using a counter as the sample clock (see: Retriggerable AI Using Retriggerable Counter). I am finding that, above a certain number of samples, and only for certain values of the number of samples, the counter task gives me error -200305, "Desired finite pulse train generation is not possibe." The error crops up only when actually starting the task.
    The analog signal that I'm trying to generate will be about 800 kHz, so my counter is set to run at the same frequency. I find that the counter task works fine if the number of samples to generate is anywhere between zero and 671,088 samples. Setting the number of samples to 671,089 gives the error above, as does 671,090 samples and so on. However, using 671,096, the counter task works fine. After that, the counter seems to output fine only if the number of samples is divisible by 8.
    The only thing I can think of is that (617088 samples) / (800000 Hz) = 0.839 s. At the internal clock rate of 20 MHz, 0.839 s is 2^24 samples, and it is a 24-bit counter on this hardware. So if it's this internal counter rolling over, that's fine and I can work around that. But if that's the case, what I don't understand is why increasing the number of samples in increments of 8 samples still works.
    The hardware is a PXI-6733 board, running with LabView 7.1.1 and NI-DAQmx 8.1.

    Hmmm,  multiples of 50 & 100?  Now I'm puzzled again.
    Here's how to make sense of the 100 kHz timebase idea though, even if it turns out not to be the right explanation.  For a retriggerable finite pulse train, you actually use a pair of counters.  If you were to program it manually, you could set your output counter to generate a continuous pulsetrain at 800 kHz using the internal 20 MHz timebase.  This output counter would also be configured to use the other counter's output as a digital level-based pause trigger.  So the 800 kHz pulsetrain is only output while the other counter's output is, say, high.
    The other counter is configured for retriggerable pulse generation.  The pulse duration or high time should be set for (# pulses) / (800e3 pulses/sec).  This other counter can be configured to use the 100 kHz timebase, so its high time would then have to be an integer multiple of 10 usec.
    So let's see...  An 800 kHz pulsetrain is possible with a 20 MHz timebase (exactly 25 cycles).  A 700 kHz (28 + 4/7 cycles) or 900 kHz (22 + 2/9 cycles) is not.  So when you request those other frequencies, you actually get a near approximation.  I dunno if DAQmx can be queried for the actual value correctly or not -- I recall an early version that reported back whatever freq you had asked for rather than what it actually used.  Queries based on ticks (rather than time or freq) did return what was actually used, as I recall.
    Let's suppose a request for 700 kHz gets truncated to 28 cycles of the 20 MHz timebase making a 1.4 usec period.  Then 50 of those periods becomes 70 usec, which is evenly divisible by the 100 kHz timebase.  Bingo!  (Note: 70 is the least common multiple of 10 and 1.4)
    Now suppose the request for 900 kHz turns into 22 cycles of the 20 MHz timebase, or a 1.1 usec period.  Now it takes 100 of those periods to get to 110 usec, which is also evenly divisible by the 100 kHz timebase.  Bingo again!  (Note: 110 is the lcm of 10 and 1.1).
    Did you follow the method here?  It should help you figure out expected results for various output freqs and #'s of samples.
    -Kevin P.

  • Sharepoint Error Message "Configuring column based defaults is only allowed in document library lists"

    We set up a SP 2010 site with several document libraries. Library A works fine only when I click on column default value settings I get the following error message:
    "configuring column based defaults is only allowed in document library lists"
    This list is a normal document library and all other settings work fine. If I create a new document library or go to the settings of document library B I don't see this problem and the feature works fine.
    How can I solve this problem within this library since I cannot delete the library and replace it by a new one.
    Thanks.
    library settings page of this library:

    Hi,
    According to your post, my understanding is that
    when you clicked on column default value settings you got the error message.
    What are the column types in the library?
    It seems that some column types don't support default value settings.
    I recommend to create a new library with the same columns to check whether you can set
    default values.
    If so and the error message persists, please check the SharePoint ULS log to find more information about this error, the ULS log file is in the location: C:\Program Files\Common Files\Microsoft
    Shared\Web Server Extensions\14\LOGS
    You can check the ULS log by the methods here:
    http://blogs.msdn.com/b/opal/archive/2009/12/22/uls-viewer-for-sharepoint-2010-troubleshooting.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for