Multiple Columns Integrity Check With Existing Volition Tolerance

Hi
I want to add a unique check on my table like
alter table Tab_A add constraint my_Cons unique(Col1, Col2, Col3);
But as my table contain violating non unique rows of Col1, Col2, Col3 the above statement fails, I don't want to delete or alter my existing violating records but I still want to implement this unique constraints for new records.
Please advise how?
Wishes

I discuss how to do this with the NOVALIDATE clause in my latest blog entries:
http://richardfoote.wordpress.com/2008/07/28/novalidate-constraints-no-really/
http://richardfoote.wordpress.com/2008/07/30/novalidate-constraints-part-ii-does-it-matter/
Hope it helps.
Cheers
Richard Foote
http://richardfoote.wordpress.com/

Similar Messages

  • APEX Interactive Report - sum multiple columns table1 X with table2 value

    I have a challenge in oracle apex, were i want to sum multiple columns to give 3 extra rows namely points, Score, %score. There are more columns but chose only few for now.
    Below is an example structure of my data:
    Town | Sector | Outside| Inside |Available|Price
    Roy-----Formal----0----------0----------1------0
    Kobus Formal--0 ---------0--------- 1------0
    Wika ---Formal----0----------0--------- 1------0
    Mevo----Formal----1----------1---------1------0
    Hoch----Formal----1----------1---------1-------1
    Points--------------2----------2----------5-------1
    Score-------------10---------10---------10------10
    %score-----------20---------20---------50------10
    Each column has a constant weighting (which serves as a factor and it can change depending on the areas) in this case the weighting for this areas are the ones in the first row for the sector Formal:
    Sector |Outside| Inside |Available|Price
    Formal----1----------1 ----------1-----1
    Informal--1----------0 ----------2-----1
    I tried using the aggregate sum function in apex but it wont work since i need the factor in the other table. Which is where my challenge started
    To compute the rows below the report:
    points = sum per column * weighting factor per column
    Score = sum of no of shops visited (in this case its 5) * weighting factor per column
    % score = points/Score * 100
    The report should display as described above. With the new computed rows below.
    I kindly ask anyone to assist me with this challenge as i tried searchin on the internet for solutions but havent come across any.
    Thanks a lot for your support in advance!!

    >
    Please update your forum profile with a real handle instead of "823433".
    I have a challenge in oracle apex, were i want to sum multiple columns to give 3 extra rows namely points, Score, %score. There are more columns but chose only few for now.
    Below is an example structure of my data: Use <tt>\...\</tt> tags as described in the FAQ when posting code and sample data and layouts. Please edit the OP and reformat the example using <tt>\...\</tt> tags so it's clear.
    Town | Sector | Outside| Inside |Available|Price
    Roy-----Formal----0----------0----------1------0
    Kobus --Formal----0 ---------0--------- 1------0
    Wika ---Formal----0----------0--------- 1------0
    Mevo----Formal----1----------1---------1------0
    Hoch----Formal----1----------1---------1-------1
    Points--------------2----------2----------5-------1
    Score-------------10---------10---------10------10
    %score-----------20---------20---------50------10Each column has a constant weighting (which serves as a factor and it can change depending on the areas) in this case the weighting for this areas are the ones in the first row for the sector Formal:
    Sector |Outside| Inside |Available|Price
    Formal----1----------1 ----------1-----1
    Informal--1----------0 ----------2-----1I tried using the aggregate sum function in apex but it wont work since i need the factor in the other table. Which is where my challenge started
    To compute the rows below the report:
    points = sum per column * weighting factor per column
    Score = sum of no of shops visited (in this case its 5) * weighting factor per column
    % score = points/Score * 100
    The report should display as described above. With the new computed rows below.
    I kindly ask anyone to assist me with this challenge as i tried searchin on the internet for solutions but havent come across any.How critical to the solution is using an interactive report? It would be much easier to do this in a standard report where you've complete control over the query SQL and the report structure.
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • Select multiple columns from tab with group by

    hi
    i have a table with many columns suppose in that i have 2 columns as date and time
    and in my table i am getting suppose data like
    columns -> date time a b c
    22-may-2207 10
    22-may-2207 17
    23-may-2007 5
    24-may-2007 12
    24-may-2007 15
    i want to select all columns with data with unique data with max of time for that particular date
    answer :-
    22-may-2007 17 a b c
    23-may-2007 5 a b c
    24-may-2007 15 a b c
    with all other cloumns also with this
    plz help me i am trying too much and not able to solve this.

    try this
    select datecol, timecol, a, b, c
    from (
    select datecol, timecol, a, b, c,
            rank() over(partition by datecol order by timecol desc) rn
    from my_table
    where rn = 1
    order by datecol;Message was edited by:
    Jens Petersen

  • Crystal Report multiple columns

    I'm having trouble with Crystal Report's multiple columns in the detail section.
    The details section, the multiple columns is checked then the printing direction is across - down. Since the form I am using is a pre-printed form, by estimation it can only allow at best 30 records in one page, that is 15 in the 1st half of the column and another 15 records on the next. For visual:
    Invoice No    Invoice Date        invoice total                                               Invoice No    Invoice Date        invoice total
    1                                                                                16
    2                                                                                17
    3                                                                                .
    .                                                                                28
    14                                                                                29
    15                                                                                30
    For some reason there is this giant space after the last set of rows before it prints out the page footer. This giant blank section disrupts the layout of the page footer section.
    Here are some info on the details section as configuration is involved:
    Format with  Multiple Columns - checked
    In Paging: New Page after 30 visible Records
    In Layout: Width: 3.5 in       Height: 0.0 in
                     Horizontal: 0.0 in      Vertical: 0.0 in     
    Printing Direction: Across-Down
    Anyone knows how to suppress it or have the page footer move upwards?
    P.S To see actual pre-printed form, please download this [http://www.mediafire.com/i/?csu0q75mjynys2k]
    Edited by: Khristine Angelei  Basilla on Mar 1, 2012 8:34 AM

    Now why didn't I try that out. Actually, initial plan was 2 subreports.
    So when I added the second subreport in the group footer section, it only prints the details on the last page, which should not be the case as I need to be printed on all pages.
    I'll test it out. I'll post an update soon.
    Thanks.

  • Multiple Column Detail

    I'm doing my 2nd ever Crystal Report using the Visual Studio 2008 version. The report has 2 different types of detail lines, each with their own corresponding heading. I made two groups, two details and set conditional logic to determine which one prints for each type of data. This works great. But I need 1 (and only 1) of the details to do a "Format with multiple columns" type display with 2 or 3 columns of the data fields in each row of the dataset for this particular detail. I can't see a way to set "Format with multiple columns" for only 1 of the detail lines. I'm thinking there must be some way to do what I want (perhaps an array?) but I can't find any examples on the web or in the books I have. FYI I tried doing this task with a Sub Report for the multi column detail but I ran into problems with the headings, pagination, and using multiple datasets so I abandoned that approach. Could someone please offer some help?

    Hi Paul,
    I don't think it is possible to make one detail section with multi column and the other without. I think by using fake group you can get it. Try this
    Create a formula like
    whilereadingrecords;
    true
    Now insert a group on this formula as the multi column option can apply to group footer or we may not depending on the option that we have in section expert>Layout>Format Groups with Multi Column.
    So place the fields that you dont want mulati column option in the group footer and see the preview.
    I hope this may help!
    Regards,
    Raghavendra

  • Practice to integrate ATG with existed website?

    My company have launched B2C business for around one year. We developed a website and a simple back-end administration console with JSP. Next phase we plan to focus on functions like website analytics, customer interactive and marketing campaign. We're looking for some commercial solutions. If we buy ATG, where is the integration point with existed website?

    Refer to this thread on the same topic
    ATG Siebel Integration

  • Install fails every time - integrity check

    Trying to install 10.1
    Dowload Manager starts ... gets to end of download, and then after a while gives first error window which states "Installer did not pass integrity check" with option to resume.
    When I try resume ... it start again and this time fails with error "Installer did not pass integrity check  (16262.304.371)
    Tried it several times - same result.

    Hi, please read this thread and post back the info: http://forums.adobe.com/thread/657743
    Thanks,
    eidnolb

  • Comparison of multiple column values with a single column value

    I have two separate tables say Tab1 and Tab2
    I want to select some datas , which is common to both the tables.
    In tab1 , there is a column 'STATE' and it's value is 'A'
    In tab2, there are multiple columns for the state, say STATE_A,STATE_B, STATE_C ETC and a row is present with the following details
    STATE_A = 1, STATE_B =1 ,STATE_C =0,STATE_D=1
    I need to select STATE when STATE_A ='1',
    if my STATE='B', this STATE has to be selected since STATE_B =' 1', similraly
    if my STATE='D', this STATE has to be selected since STATE_D =' 1',
    If my STATE='C', STATE_C should not get selected since it's '0'.
    Is it possible to do this in a single SELECT statement, where I have some other checks also or else how can I achieve it?

    Maybe this will help
    Select * from STATE_MAS ;
    STATE
    A
    B
    D
    F
    H
    Select * from STATE_CHILD
      STATE_A   STATE_B   STATE_C   STATE_D   STATE_E   STATE_F   STATE_G   STATE_H   STATE_I   STATE_J
            1         0         0         1         1         0         0         0         0         0
    CREATE OR REPLACE FUNCTION GET_STATE (P_VAL VARCHAR) RETURN NUMBER IS
    V_SQL VARCHAR2(200);
    V_COL VARCHAR2(35);
    P_RETURN NUMBER ;
    BEGIN
    V_COL := 'STATE_'||P_VAL;
    V_SQL := 'SELECT 1 FROM STATE_CHILD WHERE '||V_COL||' = 1 ';
    EXECUTE IMMEDIATE  V_SQL INTO P_RETURN ;
    RETURN P_RETURN ;
    END;
    SELECT STATE FROM STATE_MAS
    WHERE GET_STATE(STATE) = 1 ;
    STATE
    A
    D

  • Multiple Columns in Integration Script

    Hi All
    I am looking at data integration from R12 to HFM, my client has decided not to use ERPi and instead is opting for custom built processes culminating in an FDM integration script to pull data from an ODI staging table / view (please don't comment on that bit I have tried to advise them!)
    My issue is that when loading their TB data they want to do so in both entered and functional currency (members on the Custom4 dimension in HFM). What I am not sure about and would like some advice on is whether or not it is possible to have a multi-load style integration script with two data columns as I would be able to for file imports or whether I am limited to only 1 data column?
    If limited I assume I can amend my integration script to loop through the recordset twice and pick up different data columns each time to create the second record?
    Any help will be greatly appreciated :-)
    Regards
    Stu

    i know your request is old but you can use the pivot unpivot function to transpose your multiple columns into lines in a temporary table. I do that for debit/credit/balance situations :-)

  • Checking multiple columns using "IN"

    I have a query
    select 1 from tableA
    where
    cond1 = val1 and
    exists
    ( col1, col2, col3, col4 ) IN
    ( select
         cola, colb, colc, cold
    from
         table B
    where
         cond1 = val1
    Will this condition Checking for multiple columns in the IN work ?
    I actually mispelled a column name ( say colb ) in the sub query but it did not give a error, but executed fine by matching part of the columns alone?

    The execution plans look strangely similar.
    SQL> CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT NOT NULL);
    Table created.
    SQL> INSERT INTO t1 (c1,c2,c3)
      2  SELECT dbms_random.value(0,9)
      3       , dbms_random.value(0,99)
      4       , dbms_random.value(0,999)
      5  FROM   dual CONNECT BY LEVEL <= 10000;
    10000 rows created.
    SQL> CREATE TABLE t2 AS SELECT * FROM t1 SAMPLE BLOCK(10);
    Table created.
    SQL> BEGIN
      2      DBMS_STATS.GATHER_TABLE_STATS(user,'T1');
      3      DBMS_STATS.GATHER_TABLE_STATS(user,'T2');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t1 WHERE (c1,c2,c3) IN
      2         ( SELECT c1,c2,c3 FROM t2 )
      3 
    SQL> @xplan
    Plan hash value: 1275841967
    | Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |      |     1 |    18 |    12   (9)| 00:00:01 |
    |*  1 |  HASH JOIN RIGHT SEMI|      |     1 |    18 |    12   (9)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL  | T2   |   209 |  1881 |     3   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL  | T1   | 10000 | 90000 |     8   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("C1"="C1" AND "C2"="C2" AND "C3"="C3")
    SQL> SELECT * FROM t1 WHERE EXISTS
      2         ( SELECT NULL FROM t2
      3           WHERE  c1 = t1.c1                   
      4           AND    c2 = t1.c2
      5           AND    c3 = t1.c3 )
      6 
    SQL> @xplan
    Plan hash value: 1275841967
    | Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |      |     1 |    18 |    12   (9)| 00:00:01 |
    |*  1 |  HASH JOIN RIGHT SEMI|      |     1 |    18 |    12   (9)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL  | T2   |   209 |  1881 |     3   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL  | T1   | 10000 | 90000 |     8   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("C1"="T1"."C1" AND "C2"="T1"."C2" AND "C3"="T1"."C3")
    SQL>

  • Creating Select List with multiple columns

    I want to create a select list with multiple columns. I followed the demo application model described in the by Denes Kubicek (Currently my reference for APEX !!)
    The code is as follows:
    CREATE OR REPLACE FUNCTION getcrops(p_cropid IN NUMBER)
    RETURN VARCHAR2
    IS
    v_cropid VARCHAR2 (400);
    v_fcode VARCHAR2 (400);
    v_product VARCHAR2 (400);
    v_var VARCHAR2 (400);
    v_fname VARCHAR2 (400);
    v_acres VARCHAR2 (400);
    v_style_start VARCHAR2 (400);
    v_style_end VARCHAR2 (400);
    v_return VARCHAR2 (400);
    BEGIN
    FOR c IN (select "CROP"."CROPID" as "CROP ID",
         "CROP"."FIELDCODE" as "FIELD CODE",
         "CARROTPRODUCTLIST"."CARROTPRODUCTNAME" as "PRODUCT",
         "VARIETYLIST"."VARIETYNAME" as "VARIETY",
         "FIELD"."FIELDNAME" as "FIELD NAME",
         "CROP"."SIZEINACRES" as "ACRES"
    from     "FIELD" "FIELD",
         "CARROTPRODUCTLIST" "CARROTPRODUCTLIST",
         "VARIETYLIST" "VARIETYLIST",
         "CROP" "CROP"
    where "CROP"."CARROTPRODUCTTYPE"="CARROTPRODUCTLIST"."CARROTPRODUCTID"
    and     "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
    and     "CROP"."FIELDID"="FIELD"."FIELDID")
    LOOP
    v_cropid := TO_CHAR (c.'CROP ID', 'FML999G999G999G999G990');
    v_fcode := c.'FIELD CODE';
    v_product := c.'PRODUCT';
    v_var := c.'VARIETY';
    v_fname :=c.'FIELD NAME';
    v_acres :=c.'ACRES';
    FOR i IN 1 .. 12 - LENGTH (c."CROP ID")
    LOOP
    v_cropid := v_cropid || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'FIELD CODE')
    LOOP
    v_fcode := v_fcode || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'PRODUCT')
    LOOP
    v_product := v_product || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'VARIETY')
    LOOP
    v_var := v_var || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'FIELD NAME')
    LOOP
    v_fname := v_fname || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'ACRES')
    LOOP
    v_acres := v_acres || ' ';
    END LOOP;
    v_return := v_cropid || v_fcode || v_product || v_var || v_fname || v_acres;
    END LOOP;
    RETURN v_return;
    END;
    I created this anonymous Pl/SQL function at a application level ..Then I followed up to create a select list with a function inside. However I could not create select list with the command suggested in the demo which is
    select getcrops(cropid) d, cropid r from crop;
    APEX (2.1) returns a error message. What am I missing ? Should the function be called from somewhere else after creating a regular select list..? Where the functions (Pl/SQL) should be ideally stored for application level access..? and for across application level access ? How can I check the function works good. Help is appreciated.

    Still really one column.
    If they need to be independent then you've got to have three selection lists.
    %

  • Integration with existing business applications

    Hi, could anyone share with us in what way OBIEE is commonly integrated into our existing business applications?
    By a linked page embedded or just let users log in to dashboard or any by api or by webservice or any others?
    Thanks!

    Hi
    please refer following links, so that you can get some understanding in using SOAP API of OBIEE with other technology(Java/PHP) web applications...
    http://oraclebizint.wordpress.com/2007/07/31/customizing-obi-ee-soap-api/
    http://gerardnico.com/wiki/ide/eclipse/eclipse_how_to_consume_a_webservice_with_wtp
    check below url in your local installation to see what are the web service methods available for you to communicate..
    http://localhost:9704/analytics/saw.dll?WSDL
    for a simple and easy way 'gourl' functionality can be used..but necessary care to be taken as you pass your username and password in url parameters..
    check below tutorial..
    http://oraclebizint.wordpress.com/2007/07/30/customizing-obi-ee-%E2%80%93-go-url-parameters/
    hope thats solves your problem!
    -Niranjan K

  • GROUP BY with multiple columns.

    I have little query about GROUP BY clause.
    Sometimes we will give multiple column names in GROUP BY .If it behaves in the same way as ORDER BY (multiple columns) i would love to have an example where I can use GROUP BY multiple columns. Anyways howsoever it behaves it will be really appreciated if anyone can explain a scenario where GROUP BY with multiple columns can be used.
    I know about the usage of aggregate functions with GROUP BY but using only one column.
    Thanks..!!!

    Hi,
    Group by is used for grouping of same records. check this bellow scenario
    SELECT registrationid, dateofbirth, age FROM prawin62 WHERE registrationid = 22;
    22     1/23/1975     54
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66SELECT registrationid, sum(age) FROM prawin62 WHERE registrationid = 22 GROUP BY registrationid;
    22     384SELECT registrationid, dateofbirth, sum(age) FROM prawin62 WHERE registrationid = 22 GROUP BY registrationid, dateofbirth ;
    22     5/18/2011     330
    22     1/23/1975     54Thanks,
    Praveen

  • Format with multiple column

    Post Author: vman
    CA Forum: General
    I am working a report that has had the details section format with multiple columns selected.  I want to change the report and remove the check box, but it is grayed out.  How can I get the report details section back to default without the detail size constraints?

    Post Author: rcoleman
    CA Forum: General
    Bearing in mind that I'm a relative newbie to the report writing/Crystal world...the only thing I can think of is that maybe the report was written using an older version of Crystal and this option wasn't available. Another possibility, if it's a sub-report, you might try making a copy of the sub-report saving it with the same name, deleting the old sub-report, replacing it with the copy you made. I know that has worked for me when I've had problems with the re-import when opening is greyed out.

  • Treeview with multiple columns

    I googled alot about creating a treeview with multiple columns similar to a listview in details mode with the added benefit of nodes and roots. I got some answers but I was wondering if visual 2008 itself has such an option, and if not what is my best
    choice?
    Debra has a question

    I just wanted to know if in the visual studio 2008 itself there is an option to have a multi column treeview or a listview with nodes...
    Debra has a question
    Hi Debra,
    >> a multi column treeview
    As far as I know, the standard Microsoft .NET TreeView does not support columns, and if you want a tree control that supports columns, you could turn to the link from Tony:
    #TreeView with Columns
    http://www.codeproject.com/Articles/23746/TreeView-with-Columns
    >>a listview with nodes
    I made a research about “a listview with nodes” and found no results. I checked the ListView Class and did not find information about nodes.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

Maybe you are looking for

  • Jar download not working over dial up

    Hey, Our webstart application works just fine while connected to the lan at work. The various jars required by the application are downloaded without any problems. However, when I try to access the same application over dial up (I have tried netzero

  • What can I delete to free up more disk space?

    I have backed up on my time machine and have deleted all video and some books? but I still didn't free up very much room. when I check Get Info I have a capacity of 79.55 GB and have used 78.7 GB and have available 844.6 MB. I don't know what else I

  • Access rights on external usb drives gets reset.

    Hi! I use external usb-drivers for backup. I don´t wont other users on my iMac to access this drives, so I have set the access rights for "Everyone" to *"no access"*. This works as intended, for a while... But for no reason what so ever, the access r

  • RoboHelp options within FrameMaker

    This question was posted in response to the following article: http://help.adobe.com/en_US/techcomsuite/tcs/using/WS1b49059a33f77726-31aee1b1342288940d-7 fc0.html

  • Deleting CollectionNodes at runtime

    I am doing an app where there is a need for multiple (number is arbitrary) independent group chats. I first tried to solve this by using 'nodes' inside a single 'collection node' but found it does not scale, because every user is getting every messag