Is it possible to force a value in at least one of several columns?

Is it possible to define a constraint that says at least one of a set of columns must have a value?
I have a table of securities.  There are three types of security identifiers that I am recording: CUSIP, SEDOL, ISIN.  So I have a column for each type of identifier.  Is it possible to set a constraint to make sure that at least one of those
columns has a value?
Thanks.
J
http://digitalcamel.blogspot.com/

Hi J,
Try like this,
CREATE TABLE T1
CUSIP int ,
SEDOL int,
ISIN int,
CHECK (CUSIP IS NOT NULL OR SEDOL IS NOT NULL OR ISIN IS NOT NULL)
INSERT T1 SELECT 1,NULL,NULL
INSERT T1 SELECT NULL,2,NULL
INSERT T1 SELECT NULL,NULL,3
INSERT T1 SELECT NULL,NULL,NULL
SELECT * FROM T1
sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

Similar Messages

  • How to force waveform graph cursors to show Y value on more than one plot?

    Hello
    Is it possible to show more than one Y value on waveform graph cursors?
    Thanks in advance.
    Pawel

    Hi Dennis
    That is correct, on graph woth multiple plots I want to display multiple Y values of plots at the same X value.
    I know I can use property node to access cursor list etc. and this is how I have done it, but my question was rather if it is possible to force the cursor legend to display more than one Y value (as a native display). As a default it displays one value and you can choose which plot you want to stick to, but it would be a great feature to have possibility to expand cursor legend to display more than one value.
    The question has nice consequences. If it was possible, you could use a property node to export image of the graph, control sizes, or even simple "copy" data from the popup menu. Otherwise we need to "artificially" glue the exter
    nal controls displaying Y values if we want to export pictures, etc.
    But since you did not answer that I supose it is not possible, as I thought.
    thanks anyways.
    kind regards
    Pawel

  • Is it possible to force 16/32-bit stack alignment without using the optimizer?

    The compiler emits code targeted at the classic Pentium architecture for the -m32 memory model.  I'm running into problems mixing Sun Studio compiled code with code built with other compilers because the other compiler builds under the assumption that the stack is 16-byte aligned.
    The only way I've found to force Sun Studio to comply with that restriction is with -xarch={sse2a,sse3,...}, but this causes the code to pass through the optimizer.  As noted in the documentation, if you want to avoid optimizations you must remove all flags that imply optimizations -- that is to say, there's no way to disable optimizations once enabled.  This should not, however, be treated as an optimization because it's an ABI requirement.
    I've scoured the documentation, spent many hours googling, digging through forums, and asking questions.
    The best I've come up with is the -xarch option which is sub-optimal because it has side effects.  I tried -xchip=pentium4 (this is what my other compilers have set as their default target), but the generated code doesn't force 16-byte stack alignment.
    Is there a way to force the compiler to emit code conforming to a different ABI without using the optimizer?
    -Brian

    Thank you for your response.
    I hope you won't mind my asking: do you have a way to prove that it's not possible to force 16-byte alignment without using the optimizer?  I ask because your username / profile don't give the impression you work for Oracle, so while I think you're probably right it's at least possible that we're both mistaken.  I haven't been able to find any documentation on either stack alignment or altering the targeted ABI short of using the -xarch flag, and even there the details are fairly sketchy.
    -Brian

  • Where it is possible to change the value separator in Custom Field?

    Hello,
    This is a question around the "Custom Fields" and "Lookup Table"
    I linked a "Custom Field" to a "Lookup Table".
    I select the option "Allow multiple values to be selected from lookup table"
    When I used this "Custom Field" in a view, the selected values are separated by a comma ",".
    Where it is possible to change this value?
    I saw another project server where the character is a semi-column ";" and I would like to test with ";".
    Thank you in advance
    Pascal Jean

    Hi,
    This will be triggered by your regional settings.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |
    Hello,
    Thank you for the answer.
    Do you mean the "local regional settings"?
    Because, depending on the PWA site I'm connected to I don't have the same values. I'm obviously using the same workstation.
    Regards

  • Is it possible to force only a single evaluation of a function?

    I am only an occasional user of numbers...
    The question:  Is it possible to force a single evaluation of a function like TODAY() ?
    i wanted to place the current date into a gas milage numbers document, and I foolishly
    used =Today().
    Well the second time I entered the date as above I noticed that the previous entries had
    of course been changed to the current date ;(
    ie the Today function is re-evaluated whenever the spreadsheet is re-opened.
    Is there a slick way of forcing a single evaluation of functions like Today() ?
    Jerry

    Badunit,
    I have a keyboard shortcut for Insert > Date & Time that has been working faithfully for about two years now. Prior to that I hadn't had good luck, so it may be my choice of key combination that I assigned to this action. If you'd like to try it, I use:
    Shift-Option-Command-D
    Regards,
    Jerry

  • After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe. Already reinstalled 3 times and always sa

    After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe.
    Already reinstalled 3 times and always says the same message.
    thank you

    Only two had virus on windows XP this week and wiped them with Avast. The itunes asked me to install the update, and so I did. but it always gives me that message.

  • Parameter validation failed. It is not possible to provide valid values for all parameters

    I'm trying to test passing in parameter values from the URL.    I have RS 2008 .   I created an ultrasimple report based on a stored procedure output.  There is no validation, No available values, No default values.  
    I'm trying to run the report like this:
    /Reports/Pages/Report.aspx?ItemPath=%2fProduction%2fDBA+Reports%2fTest&iTest=1
    I get:
    Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)
    the one int parameter is iTestId 
    The RS log file says the following:
    processing!ReportServer_0-54!9138!01/25/2013-09:22:51:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters., ;
      Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters.
    What am I missing?

    Hi F-ram,
    From your description, you want to pass multiple parameters via URL, right? To pass multiple parameters through URL, we can use an ampersand (&) to separate them. For example, I have a report with two parameters p1 and p2. The report is deployed in a
    folder on the Report Server. When I navigate to the report on the Report Server, I can see the report URL is http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render.
    If I need to pass parameters through URL, I can just add &p1=value1&p2=value2 at the end of the URL and the entire URL would be http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render&p1=value1&p2=value2
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    Charlie Liao
    TechNet Community Support

  • Is it possible to use the value of a string to reference a component in the

    I'm fairly new to Java so this may be a stupid question!
    Is it possible to use the value of a string to reference a component in the code? For example in the code below, Wall is a class holding 3 different arrays. The Robot class has an array called finishBricks. When the buildWall method is run it receives the integers width and height which are used to construct the dimensions string. I want to use this string to then load the appropriate Wall array into the finishBricks array.
    I hope this makes sense! Any help would be greatly appreciated!
    class Robot {
    public double[][] finishBricks;
    public void buildWall(int width, int height) {
    Wall w = new Wall();
    String dimensions = "Wall" width "x" +height;
    this.finishBricks = w.xxxx; // where xxxx is replaced by whatever the String dimensions is
    class Wall {
         public double[][] Wall4x2 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-13.55,27.45},
              {-30.00,-20.35,27.45},
              {-30.00,-22.00,28.65},
              {-30.00,-16.85,28.65},
              {-30.00,-10.05,28.65},
              {-30.00,-03.25,28.65}
         public double[][] Wall3x3 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-13.55,27.45},
              {-30.00,-15.20,28.65},
              {-30.00,-10.05,28.65},
              {-30.00,-03.25,28.65},
              {-30.00,-01.60,29.85},
              {-30.00,-06.75,29.85},
              {-30.00,-13.55,29.85},
         public double[][] Wall2x4 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-08.40,28.65},
              {-30.00,-03.25,28.65},
              {-30.00,-01.60,29.85},
              {-30.00,-06.75,29.85},
              {-30.00,-08.40,31.05},
              {-30.00,-03.25,31.05},

    Map walls = new HashMap ();
    walls.put ("2x2", new double[][] {
        new double[] {
            1,
            0
        new double[] {
            0,
            1
    double[][] wall = (double[][]) walls.get ("2x2");

  • Is it possible to set valid values at run time?

    Hi,
    I'am using a BPM Presentation and I want to know if it is possible to set the values of a combo box depending of the value of other field in the same presentation ando if so how to do it? I tried to do somethin like:
    var = fiedlValidValues()
    I tried to use refreshValidValues but it says that cannot execute the action in a presentation, I don´t know wath else to do
    but it doesn´t works, any idea??
    Thanks in advance
    Marig
    Edited by: user646988 on 05-feb-2009 19:30

    Hi, thanks Anup
    I followed your advise but i didn´t success. I have question, if I'm getting the default values of a field with a method using a query. The type field is String and I'm using it into a combo box so the method I'm using returns a String[], is something like this:
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = var2
    do
    clases[] = row.clase
    end
    return clases
    But if I use a method for the onChange property if the field how to set the default values?
    I tried with
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = field1
    do
    clases[] = row.clase
    end
    clases = claseValidValues()
    But this is not working, do you have any ideas??
    Thanks
    Edited by: user646988 on 15-feb-2009 19:36

  • Is it possible to sort dimension values in order different from alphabetic?

    Is it possible to sort dimension values in order different from alphabetic. То use this sorting in BI Beans. In 10g r2 with awm 10.2.0.2. I try to add attribute like it was show in this forum, but nothing changes.

    Could be usefull if you use java AW api... here's the java code I'm using to create the sort_order attribute
    Dimension myDim = yourAW.findDimension("DIMNAME");
    Attribute myAttr = myDim.createAttribute();
    myAttr.setName("freename");
    myAttr.setClassification("DEFAULT_ORDER");
    myAttr.setIsDefaultOrder(true); // TO NOT FORGET
    myAttr.setDataType("INTEGER");
    myAttr.Create(AWConnection);
    globalAW.Commit(AWConnection);
    It creates a variable - integer - that defines the default order of the dim values. I'm viewing it with AWM and BIBeans. The order is respected with Level-based and Value-based hierarchy but my hierarchies are really simple and unique for all the dimensions.
    BUT !!!! Be carefull, if you don't have any hierarchy in your dimension, you must have at least one level - the default NONE level. Otherwise, it won't work ???

  • Re:Is it possible to copy the values of KP26 of 2010 to 2011?

    Dear Friends,
    Is it possible to copy the values of KP26 of 2010 to 2011?
    Moderator: Please, avoid asking basic questions

    Thank My Dear Friend.
    Regards,
    Hari

  • Is it possible to change the value of "maxdatafiles" after creating a db??

    Hi, all.
    Is it possible to change the value of the followings after creating a database??
    -maxdatafiles
    -maxinstances
    -maxlogfiles
    -maxlogmembers
    -maxloghistory
    Thanks and Regards.

    Hi Chris,
    Thanks for updating that but here's what in Oracle Doc:
    From Oracle Documentation (Oracle® Database New Features Guide 10g Release 2 (10.2))
    Eliminate Control File Re-Creation
    With the control file enhancements, there is no longer a requirement to re-create the control file when changes in the configuration parameters are made. These include the MAXLOGFILE, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES, and MAXINSTANCES parameters.
    This feature eliminates database downtime when a configuration parameter change is made in the control file
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14214/chapter1.htm#sthref12
    Regards

  • Is there possibility to add dimension value into hierarchy using dml or spl

    1 Is there possibility to add dimension value into hierarchy using dml or spl?
    If such possibility exists how to do that.
    2 Is it possible to sort dimension values inside one branch of the hierarchy?

    What version of OLAP are you using and how did you create your AW (e.g., AWM)?
    Assuming that you're used either AWM or the Java API for AWs in 10g, there isn't an OLAP DML for adding a dimension member to a dimension (and have all the meta data kept in sync); you must load dimension members using AWM the Java API for AWs.
    So, make your changes in the the dimension table and process that table.
    For sorting, you can add a sort attribute to the dimension. Add the sort attribute to the model, indicate that it's used for sorting, add the sort attribute to your dimension table and maintain the dimension.

  • Is it possible to get the value of variable through answers page ?

    Hi all,
    I had Dynamic variable ETLRundate . I want use this variable in Answers page to see the out put ?
    Is it possible to get the value of variable through answers page ?if so how I can use ?

    Hi
    Use the link below and download the documentation
    http://www.oracle.com/technology/documentation/bi_ee.html
    I think you will find what you are looking for in the Answers, Delivers, and Interactive Dashboards User Guide, but in short the syntax to display a variable value is as follows:
    As shown above the syntax for using a presentation variable is:
    @{variablename}{defaultvalue}
    For Session variables use:
    @{biServer.variables['NQ_SESSION.variablename']}
    For repository variables use:
    @{biServer.variables['variablename']}
    Rgds
    Ed

  • Is it possible to increment a value in a function

    is it possible to increment a value dynamically with in a function

    CREATE OR REPLACE function TEST
    (V_COUNT in NUMBER(10),V_LP in NUMBER(3),V_COUNTER in NUMBER(10))
    RETURN varchar2(40)
    IS
    V_NAME varchar2(40);
    BEGIN
    IF (V_COUNT = 1)
         THEN
         --some code
         EXIT;
    ELSIF (V_COUNT > 1)
         V_LP:=0;
         V_COUNTER:=1;
         WHILE ( V_COUNTER = 1 )
         LOOP
              V_LP:=V_LP + 1;
              --SOME CODE
         END LOOP;
         IF ( V_LP = 1 )
         THEN
              --SOME CODE               
         END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    THIS IS MY CODE

Maybe you are looking for

  • Flash Builder 4.5 crash on load OS X 10.7

    It was working, the app crashed during a build then would not reload. After a short bit of time it returns an error alert with instructions to look at the log file. Looking at the .log file and the console there are several Java errors (see bellow) T

  • How do I get a MS Word doc from my mail's inbox to Pages so I can change it?

    How do I get a MS Word (or MS Excel) doc from my mail inbox on the iPAD to the Pages (or Numbers) app so it can be changed or modified?

  • Line Item Fast enry for vendor Accounts

    Hi All, I want to post the vendor items using fast entry. Is this possible in SAP? or if there is other way round for entring the bulk vendor items in a single entry instead of manually putting single single item? Regards, Parul Sharma

  • Premiere Elements 9 vs iMovie '11

    I have been playing wiht the new PE 9 and it seems pretty nice but on my MAC it is a little sluggish at times (maybe it runs better on a PC). I have 4g mem on my 1 1/2 yr old macbook Pro with the new snow leopard. It is the demo so maybe that is why.

  • BC4J JBO errors over-ride

    We want to catch our JBO exceptions using folowing method package be.iadvise.apps.serverinventory.model.messages; import java.util.ListResourceBundle; public class MessageBundleExceptions extends ListResourceBundle private static final Object[][] sMe