Compare multiple columns and update a column based on the comparison

Hi all

I have to update the column STATUS of the slot structure of the table.

Status should be 'P' if all the columns count are equal on the other should be "F".

The value of the column can be "NA'. If the value is NA, then avoid this comparison column; compare only other 3 columns.

My output should look like below.

State of cnt1, cnt2 cnt3 ID cnt4

1   4       4       4     4       P

2   4       5       4     4       F

3 4 4 NA 4 P

NA 4 4 3 4

I tried with the statemnt with BOX WHEN conditions and DECODE UPDATE, but could not succeed, can someone please help

To do this, if you use my statement in response #11 box (Re: Re: comparison of multi-column and update a column based on the comparison of)

Tags: Database

Similar Questions

  • Under certain conditions, update a table based on the comparison with a SQL statement

    I have a table (table 1) that has 4 columns:

    UID. THE NEST | VALUE1 | VALUE2

    I have another statement SQL (STMT) that returns the 3 columns of a few other tables:

    UID. THE NEST | VALUE1

    Now this is the condition of the way in which I want to put up-to-date TABLE1:

    First, to compare a pair of UID and PID of STMT with those in TABLE1,

    -1, for any new pair UID and PID not in TABLE1, insert a new line of STMT in TABLE1 set TABLE1. Value2 = 0 (I already did this).

    2, for an existing UID and PID pair in STMT and TABLE1, do:

    a. in TABLE1. Value2 > 0, update TABLE1. VALUE1 = STMT. VALUE1

    b. to TABLE1. Value2 = 0 and if TABLE1. VALUE1! = STMT. Value1, update of TABLE1. VALUE1 = STMT. Value1, otherwise nothing to do.

    I can't seem to come with a solution for condition 2. Any help is appreciated!

    Hello

    Here's one way:

    MERGE INTO  table1  dst
    USING          (
                 SELECT  ...   -- your stmt query goes here
             )   src
    ON         (    src.uid  = dst.uid
             AND      src.pid  = dst.pid
             )
    WHEN MATCHED THEN UPDATE
    SET           dst.value1 = CASE
                                   WHEN   dst.value2 > 0
                        OR     (   dst.value2 = 0
                             AND dst.calue1 != src.value1
                        )
                        THEN   src.value1
                               END
    WHERE   dst.value2 > 0
    OR (    dst.value2 = 0
       AND  dst.calue1 != src.value1
       )
    ;
    

    This assumes that the combination (uid, pid) is unique in stmt. It doesn't have to be unique in table1.

    sb92075 wrote:

    -1, for any new pair UID and PID not in TABLE1, insert a new line of STMT in TABLE1 set TABLE1. Value2 = 0 (I already did this).

    FUSION could also do parts 1 and 2 together, in the same statement.

    2, for an existing UID and PID pair in STMT and TABLE1, do:

    a. in TABLE1. Value2 > 0, update TABLE1. VALUE1 = STMT. VALUE1

    b. to TABLE1. Value2 = 0 and if TABLE1. VALUE1! = STMT. Value1, update of TABLE1. VALUE1 = STMT. Value1, otherwise nothing to do.

    Why are they not simply your needs ' uid and pid that already exist in stmt and table1, if table1.value2 > = 0, then the value table1.value1 = stmt.value1 "? Are you concerned about shooting triggers unnecessarily? It has something to do with null values? The MERGE statement above does exactly what you asked, but, depending on your needs, something simpler and more efficient could do it as well.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    If you ask on a DML statement, such as UPDATE, the sample data will be the content of the or the tables before the DML, and the results will be the State of the or the tables changed when it's all over.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, June 6, 2012 14:51

  • How can I update several lines based on the comparison of the fields table 1 and 2

    I create the following SQL to test what I found a method to update the records where the fields below the game, but what ends up happening is that the update functions works the first time and then basically updates everything to null. I don't understand what I'm doing wrong. New to this.

    UPDATE SLS_HDR B
    DEFINE (B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT, B.UPDATED_DT)
    (SELECT =
    A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
    A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
    A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2, A.PLAN_DEL_DT, A.TXTA, A.TXTB,
    A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT, A.PAY_CONTACT, A.ORD_AMT, SYSDATE
    Of
    SLS_HDR_TEMP HAS
    WHERE
    A.FIN_COMP = B.FIN_COMP AND
    A.LOG_COMP = B.LOG_COMP AND
    A.ORD_NO = B.ORD_NO AND
    A.TRANS_DT = B.TRANS_DT AND
    A.BP_TYPE = B.BP_TYPE AND
    A.STATUS <>B.STATUS);

    Can someone advise?
    Thank you

    Published by: 903292 on December 19, 2011 13:15

    you don't have a where clause in your update so no-matched lines will be updated with null values

    UPDATE SLS_HDR B
    SET ( B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT,B.UPDATED_DT )
    = (
              SELECT
              A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
              A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
              A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2,A.PLAN_DEL_DT, A.TXTA, A.TXTB,
              A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT,A.PAY_CONTACT, A.ORD_AMT, SYSDATE
              FROM
              SLS_HDR_TEMP A
              WHERE
              A.FIN_COMP = B.FIN_COMP AND
              A.LOG_COMP = B.LOG_COMP AND
              A.ORD_NO = B.ORD_NO AND
              A.TRANS_DT = B.TRANS_DT AND
              A.BP_TYPE = B.BP_TYPE AND
              A.STATUS= B.STATUS
         )
    WHERE EXISTS
    (
         select null from SLS_HDR_TEMP A
         WHERE
         A.FIN_COMP = B.FIN_COMP AND
         A.LOG_COMP = B.LOG_COMP AND
         A.ORD_NO = B.ORD_NO AND
         A.TRANS_DT = B.TRANS_DT AND
         A.BP_TYPE = B.BP_TYPE AND
         A.STATUS= B.STATUS
    )
    

    OR using Merge

    Merge into SLS_HDR B
    using SLS_HDR_TEMP A
    on (A.FIN_COMP = B.FIN_COMP AND
    A.LOG_COMP = B.LOG_COMP AND
    A.ORD_NO = B.ORD_NO AND
    A.TRANS_DT = B.TRANS_DT AND
    A.BP_TYPE = B.BP_TYPE AND
    A.STATUS= B.STATUS)
    when matched then update set (B.ORD_DT, B.SHIP_ADD_CD, B.INV_ADD_CD, B.LOB, B.STATUS,
    B.ORD_TYPE, B.HDR_ROUTE, B.PRICE_LIST, B.CUST_ORDER, B.REF_A, B.REF_B,
    B.ORD_REF, B.ORD_DISC, B.SREP, B.SREP2, B.PLAN_DEL_DT, B.TXTA, B.TXTB,
    B.INV_CONTACT, B.SHIP_CONTACT, B.SOLD_CONTACT, B.PAY_CONTACT, B.ORD_AMT,B.UPDATED_DT ) = (A.ORD_DT, A.SHIP_ADD_CD, A.INV_ADD_CD, A.LOB, A.STATUS,
    A.ORD_TYPE, A.HDR_ROUTE, A.PRICE_LIST, A.CUST_ORDER, A.REF_A, A.REF_B,
    A.ORD_REF, A.ORD_DISC, A.SREP, A.SREP2,A.PLAN_DEL_DT, A.TXTA, A.TXTB,
    A.INV_CONTACT, A.SHIP_CONTACT, A.SOLD_CONTACT,A.PAY_CONTACT, A.ORD_AMT, SYSDATE)
    

    HTH...

    Thank you

  • In the form of table-update a column based on the other

    Greetings,

    I want to update a column based on the value of another column in a tabular presentation. What should I use? Calculation or validation process?

    -Vatsa

    Yes, get rid of the update of "pims_component" - this is the cause of the error table mutation - and simply set

    : new.state_ind: = Ls_state;

    CITY

  • How to load a multiple column table in the coherence of caches?

    How to load a multiple column table in the coherence of caches?
    I want to load a multi-column (about 20 columns) table in cache coherence. How to change the following code (spatially how to change the SQL SELECT statement)?
    Is the following select statement enough: Select the key, the value of EMPLOYEES ?
    public static void bulkLoad(NamedCache cache, Connection conn)
        {
        Statement s;
        ResultSet rs;
        
        try
            {
            s = conn.createStatement();
            rs = s.executeQuery("select key, value from table");
            while (rs.next())
                {
                Integer key   = new Integer(rs.getInt(1));
                String  value = rs.getString(2);
                cache.put(key, value);
                }
            ...
            }
        catch (SQLException e)
            {...}
        }

    First of all, you need a class to hold your 20 fields:

    public class Data {
    
        private String field1;
        private String field2;
        private String field3;
        private String field4;
        private String field5;
        private String field6;
        private String field7;
        private String field8;
        private String field9;
        private String field10;
        private String field11;
        private String field12;
        private String field13;
        private String field14;
        private String field15;
        private String field16;
        private String field17;
        private String field18;
        private String field19;
        private String field20;
    
        public Data() {
        }
    
        public String getField1() {
            return field1;
        }
    
        public void setField1(String field1) {
            this.field1 = field1;
        }
    
        public String getField2() {
            return field2;
        }
    
        public void setField2(String field2) {
            this.field2 = field2;
        }
    
        public String getField3() {
            return field3;
        }
    
        public void setField3(String field3) {
            this.field3 = field3;
        }
    
        public String getField4() {
            return field4;
        }
    
        public void setField4(String field4) {
            this.field4 = field4;
        }
    
        public String getField5() {
            return field5;
        }
    
        public void setField5(String field5) {
            this.field5 = field5;
        }
    
        public String getField6() {
            return field6;
        }
    
        public void setField6(String field6) {
            this.field6 = field6;
        }
    
        public String getField7() {
            return field7;
        }
    
        public void setField7(String field7) {
            this.field7 = field7;
        }
    
        public String getField8() {
            return field8;
        }
    
        public void setField8(String field8) {
            this.field8 = field8;
        }
    
        public String getField9() {
            return field9;
        }
    
        public void setField9(String field9) {
            this.field9 = field9;
        }
    
        public String getField10() {
            return field10;
        }
    
        public void setField10(String field10) {
            this.field10 = field10;
        }
    
        public String getField11() {
            return field11;
        }
    
        public void setField11(String field11) {
            this.field11 = field11;
        }
    
        public String getField12() {
            return field12;
        }
    
        public void setField12(String field12) {
            this.field12 = field12;
        }
    
        public String getField13() {
            return field13;
        }
    
        public void setField13(String field13) {
            this.field13 = field13;
        }
    
        public String getField14() {
            return field14;
        }
    
        public void setField14(String field14) {
            this.field14 = field14;
        }
    
        public String getField15() {
            return field15;
        }
    
        public void setField15(String field15) {
            this.field15 = field15;
        }
    
        public String getField16() {
            return field16;
        }
    
        public void setField16(String field16) {
            this.field16 = field16;
        }
    
        public String getField17() {
            return field17;
        }
    
        public void setField17(String field17) {
            this.field17 = field17;
        }
    
        public String getField18() {
            return field18;
        }
    
        public void setField18(String field18) {
            this.field18 = field18;
        }
    
        public String getField19() {
            return field19;
        }
    
        public void setField19(String field19) {
            this.field19 = field19;
        }
    
        public String getField20() {
            return field20;
        }
    
        public void setField20(String field20) {
            this.field20 = field20;
        }
    }
    

    Then you can use it to store data in you original code

    public static void bulkLoad(NamedCache cache, Connection conn)
        {
        Statement s;
        ResultSet rs;
    
        try
            {
            s = conn.createStatement();
            String sql = "select key, value, value2, " +
                    "value3, value4, value5, value6, " +
                    "value7, value8, value9, value10 " +
                    "value11, value12, value13, value14, " +
                    "value15, value16, value17, value18, " +
                    "value19, value120 from table";
    
            rs = s.executeQuery(sql);
            while (rs.next())
                {
                Integer key   = new Integer(rs.getInt(1));
                Data data = new Data();
                data.setField1(rs.getString(2));
                data.setField2(rs.getString(3));
                data.setField3(rs.getString(4));
                data.setField4(rs.getString(5));
                data.setField5(rs.getString(6));
                data.setField6(rs.getString(7));
                data.setField7(rs.getString(8));
                data.setField8(rs.getString(9));
                data.setField9(rs.getString(10));
                data.setField10(rs.getString(11));
                data.setField11(rs.getString(12));
                data.setField12(rs.getString(13));
                data.setField13(rs.getString(14));
                data.setField14(rs.getString(15));
                data.setField15(rs.getString(16));
                data.setField16(rs.getString(17));
                data.setField17(rs.getString(18));
                data.setField18(rs.getString(19));
                data.setField19(rs.getString(20));
                data.setField20(rs.getString(21));
                cache.put(key, data);
                }
            ...
            }
        catch (SQLException e)
            {...}
        }    
    

    Of course your data object would need the appropriate field names and you will have no channels for all types. It must also implement equals and hashCode and ideally PortableObject.

    JK

  • Trying to update a field of contact based on the comparison of another field of contact

    Hi all: I hope you can show me the light.  I'm trying to update my contact record with a value based on the comparison of 2 contact fields.

    So, is there an easy way to update a contact record with the FieldA value where FieldA is superior to FieldB?

    I did some research and go home empty-handed.  Any ideas?

    Thanks for your help!

    Penny

    Hey Penny,.

    If you compare two numeric fields, you can use the connector of cloud of mathematical functions to find the highest value in a table (A, B, C) for example, or to return if A is greater than B and then update your specified contact field.

    I described how to find the highest value in this post a bit backward, but the images seem to have disappeared - (perhaps a person of Eloqua can restore them somehow?).

    http://topliners.Eloqua.com/message/3539#3539

    Also take a look at this data sheet of mathematical functions of the appcloud for more information!

    http://img.EN25.com/Web/Eloqua/DataSheet_CC_MathFunctions.PDF

    I hope this helps!

    Chris

  • I added the newurl it was google job opening now it shows multiple windows and I have to click on the window of google to optimize

    I added the NewtabUrl 2.2.3 extension while I entered in google when you open a new window and it worked. I updated firefox and now when I open a new tab I get multiple windows and I have to click on the window of google again to see just google so 2 clicks instead of one--I use it very often.

    I don't see any obvious setting in the addon/extension or general settings.

    Hello, firefox has added its own page of the new tab with the release of firefox 13 (for more information, see customize the page new tab), he has probably replaced the newtaburl parameters. You can try reinstalling the NewtabUrl 2.2.3 extension and put your new custom tab page.
    or you can remove the extension and manually set your new tab page: enter Subject: config in the address bar (you will need to confirm the notification), search for the preference named browser.newtab.url, double-click it and change its value to www.google.com or page of your taste.

  • How can I change the default Google search engine in Firefox 8 Google.com to google.co.uk? Yes, I live in France with a French ISP, but English is my mother tongue and I want responses based in the United Kingdom.

    How can I change the default Google search engine in Firefox 8 Google.com to google.co.uk? Yes, I live in France with a French ISP, but English is my mother tongue and I want responses based in the United Kingdom.

    I use XP Pro.

    You can find on the site of Mycroft Project search engines.

  • Hi - my Mu was "buggy" and update not - so I threw the APP in the trash - but now CC won't allow me to re - install because he thinks that I already have the APP - advice?

    Hi - my Mu was "buggy" and update not - so I threw the APP in the trash - but now CC won't allow me to re - install because he thinks that I already have the APP - advice?

    restore your application from the Recycle Bin, and then uninstall correctly.

    If this fails, CC Office lists the applications as "up to date" when it is not installed

  • Compare multiple columns and return a different value

    I have more access to excel and I'm running my previous workflow in numbers of duplication of issues.

    I have a worksheet when a sheet with all my power tools.  On the "Power Tools" sheet I have columns for the brand, Type, model, purchase date, etc...  An example of this would be: pass a "DEWALT", "Jackhammer" Col B, Col C "DCD995M2" and so on.

    I have a second sheet in the same document which is my front end if you want.  I wanted to have selections for this dynamic drop-down list but it seems it is not possible without scripts, but is not the immediate question yet I'm the mention the case where someone knows a good fix.  The second sheet "Sorting Test", I created manually drop-down boxes, one in column A of the brand and the other in column B for Type.  I'll choose the brand and type and I want numbers autofill the rest of this line based on these two selections.

    Example:

    In the 'Sort Test' sheet I select DEWALT in column A and I select the drill in column B and I want DCD995M2 is displayed in column C and the purchase date in column D and so on.

    Excel in it would be a game table or something similar.  So far every site and search google only gave a lot of people who try to do VLOOKUP or correspond to errors, but I've really met anyone corresponding to two distinct cells from two separate columns and return data from this same line a match was found on.

    I must also mention I'm really trying to avoid adding a hidden line that combines some of these but I know it's the most noticeable work around.

    Basically, I want to match two selections separated against two separate columns, and when it finds the match, I want it returns a different value of this corresponding line how I got everything just copy this formula on adjacent cells and simply adjust to the column in the same row matched.

    I know that I shouldn't do this on separate sheets, but it's just a choice that I made a point of design.

    Any help would be appreciated, because I'm trying to really get the most out of the numbers, especially with how it syncs between desktop and mobile and I have more access to Excel.

    You can it as what you do and why?  This will help us understand what drives the design.  Leave out how to solve the problem,

    also post screenshots can be very useful

  • Hide column based on the State in BI Publisher Excel Template

    Hello

    I have a requirement to hide a column based on certain conditions in the Excel of BI Publisher model. I am newbie for BI Publisher excel template. Anyone can provide some advice on this?

    I need this emergency. Any kind of help would be very appreciated.

    Thank you

    Renu

    Hi Renu,

    Recently, I came across a similar requirement, and I went to without BEEP features to hide and show columns during execution, unlike the RTF.

    But I did it in Excel model with the help of the Macro. It works fine for me.

    Please see below

    1. based on a cell value 'A', I have to hide the column

    2 written a simple if statement in macro to get the value of 'A' and do the hide/show

    3. you need to do this only in "ThisWorkbook" macro is executed when the excel output is open.

    Thank you

    Mani

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • Report view columns based on the selection of the month

    Hello

    I have an interactive report.
    In my report, I show the columns below. Let's say the show for months salary of the EMP for this month

    EmpID, ename, jan, Feb, mar, Apr, may, June, July, August, Sept, oct, nov, dec

    I have two selection lists (to filter the report) in my interface. P1_MONTH and P1_YEAR. These have static LOVs.
    Jan (Display) - 01 (Return)
    (Display) - 02 Feb (Return) and so on.

    I am facing problem while hiding under certain conditions the columns.
    For example, if the user selects the month "Mar." Then the report should display

    EmpID, ename, jan, Feb, mar

    Another example, if the month is "Jun" then

    EmpID, ename, jan, Feb, mar, Apr, may, June

    So he must hide under certain conditions the columns based on selection.
    I put the conditional 'view' in the column of the report for "expression of the ar-ticle/column value 1 = expression 2'.

    P1_MONTH (in the expression 1)
    + 06,07,08,09,10,11,12 (in the expression for the month of June selection 2) +.

    But doesn't the show/hide.
    Am I missing something? Please correct me if I'm wrong.

    I use APEX 4.1 & g 10 DB

    Thank you in advance,
    Daniel

    This

    value of item/column expression 1 = expression 2
    

    is equivalent to a PL/SQL expression, such as

    :P1_MONTH = '06,07,08,09,10,11,12'
    

    So maybe, select a PL/SQL expression condition and write something like that for the month of March - if I interpret correctly the your needs.

    TO_NUMBER(:P1_MONTH) <= 3
    

    Scott

  • How ItemRenderer change for DataGrid column based on the value of this column?

    Hello! I am trying to create a DataGrid that has a component Button to register when the value of this column is 'Open', then a label saying full when the value of this column is "Full". But Im having a hell of a time he find.

    Here's my MXML with 2 different inline installation of components for different rendering engines point 2:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    < mx:Component id = "RegFull" >
    < mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
    < mx:Label id = 'Full text' text = "Full" / >
    < / mx:VBox >
    < / mx:Component >

    < mx:Component id = "RegButton" >
    < mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
    < mx:Button label = "Save" / >
    < / mx:VBox >
    < / mx:Component >

    < mx:DataGrid id = "scGrid" width = "100%" height = "100%" number of lines = "4" >

    < mx:dataProvider >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < / mx:dataProvider >

    < mx:columns >
    < mx:DataGridColumn id = "RegCol" headerText = "Reg" dataField = "data" / >
    < / mx:columns >

    < / mx:DataGrid >
    < / mx:Application >

    How can I dynamically use the right of itemrenderer based on the value of the field? THANKS FOR ANY HELP PROVIDED!

    The best
    Stephen

    You can have more than 1 column renderer engine. There are two ways to do this. One way would be to use States. A State for each possible value in the data. Since you either want a button (data == 'open') or a label (data == 'Full') by using the States wouldn't be a bad choice.

    Alternatively, you can use a canvas instead of a VBox. Make a label and a button with horizontalCenter = "0" "0" = red to make them each other. Make it visible according to the data value:






    where dataField is the value of the property dataField on this converter DataGridColumn.

  • the data of a column based on the value of color.

    Hi guys,.

    I use APEX 4.0.2

    I'm changing the color of the column 'calling_date' so it would be blue when it is equal to sysdate. I typed this code in the Source of the interactive report region.
     case
       when calling_date = sysdate then '<span style="color: #3399FF;">' || to_char(calling_date) || '</span>'
       else to_char(calling_date)
    end CALLING_DATE 
    And then I changed the "display AS text" column 'Standard report Column '.

    But wouldn't change the color!

    Kind regards

    Published by: Fateh June 2, 2011 12:38

    >
    I applied it, but he gave me like a tank I can't order according to date of color.

    case
       when trunc (calling_date,'DD') =  trunc(sysdate,'DD') then
     '' || to_char(calling_date) || ''
       else to_char(calling_date)
    

    If I remove "TO_Char", I get this error:

    incompatible data types: expected DATE got TANK

    Tony Miller, thank you. I followed the instructions on your link, but I got the same error:

    incompatible data types: expected DATE got TANK
    >

    Tyler method uses * columns * 2 in a standard State:

    select
             calling_date
           , case
               when trunc (calling_date,'DD') =  trunc(sysdate,'DD') then '#3399FF'
               else 'inherit'
             end color
    ...
    

    then combined using an HTML Expression:

    #CALLING_DATE#
    

    It is not available in an interactive report (not sure if this information was clearly in the op?)

    In the IR, generate a HTML comment at the cutting edge of the column that supplies the required using the semantics of character sort order:

    select
    ...
           , case
               when trunc(calling_date,'DD') =  trunc(sysdate,'DD')
               then
                 '' || to_char(calling_date) || ''
               else
                 '' || to_char(calling_date) || ''
             end calling_date
    ...
    

Maybe you are looking for

  • HP p6709c: the gpu upgrade

    Hi so I bought recently an Asus GeForce gtx 950, I also change the power supply to a cx600 corsair, however the issue I'm having is after plugging everything in my computer seems to freeze at the hp logo. I read somewhere that I have to disable secur

  • I have to hold down the fn key to type

    I just bought this computer 5 days ago its an Acer laptop Aspire One and I pressed the fn key to type for example if I want to hit j then number 1 appears. Also if I want uppercase I have to hold down the FN key and shift at the same time key to get

  • Can go back us to the old system

    Since the new system update on the Razr maxx... this phone sucks! There are more problems and things that I don't like about it. In any case to go back to the way it was? I loved my phone so far! Thank you!

  • Updates does not not (KB.982524) (KB2418241) (KB2414673} can anyone help

    Pack 3 for Windows Server 2003 and Windows XPx86Service cannot install these updates

  • Windows 7 Startet is not Windows XP Home Edition recognize when sharing files.

    We recently purchased a netbook with Windows 7 Starter version in this respect.  We also have a desktop with Windows XP Home Edition.  I put both for file sharing, but it seems to work periodically.  I made sure that the two systems are on "homegroup