How to show a value in column when condition is true?

Assume I have the following simplified SELECT statement:
SELECT a, b, ???
FROM tab;
In the third column a value of "yes" should appear when the following condition is true:
tab.c = tab.d
Otherwise the value should be "no" (or even blank).
How can I achieve this?
The solution should be more general for situation if many tabs are involved,....
Peter

How can I achieve this?
The solution should be more general for situation if many tabs are involved,....So do you expect a generalized SQL statement that handles are arbitrary number of tables with arbitrary column names?
It would be helpful if you provided DDL (CREATE TABLE ...) for tables involved.
It would be helpful if you provided DML (INSERT INTO ...) for test data.
It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized.

Similar Messages

  • How to show old value in webui when user press NO button on popup button.

    Hi Experts,
    As per requirement I have created custom field with dropbox and with popup box to cofirm user decision if value from field changes.
    Now on Popup when user press Yes then its Ok as no need to change the current value in the field.
    but when user press the NO button I want to display the old value on Web UI so now I am able to catch the old value and pass it into the field at backend but I am not able to make the change on the web page.
    Please reply if anyone have solution for it.
    BR
    Gaurav    

    Hi Gaurav,
    First of all when all this is happening in UI why you need to pass the selected value to backend. I didnt get this.
    I believe, this is only ui related and the old value which you got can be set in the IMPL class global variable and  trigger method set_on_close_event, say here 'CONFIRM_POPUP_CLOSED' as shown below:
      gr_popup->set_on_close_event( iv_event_name = 'CONFIRM_POPUP_CLOSED'
                                        iv_view = me ).
    Retrive the answer as per selection from popup in method 'CONFIRM_POPUP_CLOSED'
    by using:
      lv_answer = gr_popup->get_fired_outbound_plug( ).
    if lv_answer is NO, then put back the globally stored old value back to dropdown attribute, using:
    set_property_by_value method(   iv_attr_name = 'dropdown attr' iv_value = 'old value' )
    Thats it. No need to do anything.
    Regards,
    Bhushan

  • How to Show total value in the header 2nd page but based on 1st page footer

    How to show total value in header in report builder but i have the total have related with the total in footer.
    Example
    ===============================================
    Page 1
    Empno Ename Sal
    1 Scott 1000
    2 ALlen 2000
    3 Susi 1000
    Total Sal Page 1: 4000
    ===============================================
    Page 2
    Total Sal Page 1: 4000 --> How to get it?????
    Empno Ename Sal
    4 Budi 1000
    5 Roger 200
    6 George 2000
    Total Sal Page 2: 3200
    Please Help..
    Thanks

    hmm .. what i would do is
    - create a placeholder column
    - create a field in the header and one in the footer
    - have the footer field reference the summary column
    - have the header field reference the placeholder column
    - create a fromat trigger on the footer field to
    store the value of the footer into the placeholder column
    so when the report is executed and the footer field is formatted, the format trigger stores the current value of the summary in the placeholder. then the pagebreak occures and the header field is formatted .. printing the value.
    there might actually be an easier way, just reference the two fields to the same summary column and in theory, since there is nothing happening between the time when the footer is formatted and the header is formatted, the values should be the same .. however this is a theory and i have not actually tested this. since reports does all kinds of fancy optimization this might have unexpected results, but it's worth a try.
    thanks,
    ph.

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to show 1 value in chart

    Hi there! just want to ask how to show the value 1 in chart?
    Thank you in advance!
    Best Regards,
    Jef

    Hi jefnavarro,
    According to your description, you hope the value 1 to be displayed in series. If so, please refer to the following steps to set minimum value of Horizontal Axis to zero:
    Right click anywhere of Horizontal Axis on the chart and open Horizontal Axis Properties dialog box.
    In Axis Options pane, in Axis range and interval section, click the expression (fx) button next to Minimum.
    In the expression text box, type =0, then click OK.
    The following screenshots are for your reference:
    If you have any questions, please feel free to let me know.
    Best Regards,
    Wendy Fu
    Hi there and good day to you! 
    First of all thank you for the clear steps that you share but I don't know why still won't come..
    maybe because my horizontal axis is starting from 1 as you can see on the lower part of my screenshot.. how can i set this to 0?
    thank you again.
    edited:
    just want to add that my data is only counting on data in Values [Count(Name)] in chart data maybe that's why i don't have 0 value?

  • How to pass the value to "Assignment" when submit the program RFITEMGL?

    Hello friends,
    I want to submit program RFITEMGL  (t-code FBL3N) with some screen fields, some fields are OK to fill such as u201COpen at key dateu201D, u201CG/L accountu201D and u201CCompany codeu201D。 But for the field "Assignment" (It will appear after cilck Dynamic Selection), I don't know how to pass value to it.
    Could you help me about how to pass the value to "Assignment" when submit the program RFITEMGL  (t-code FBL3N) ?
    Thanks a lot!

    Hi,
    Well you can create a small BDC.
    Regards,
    Harsh Bansal

  • Photoshop Elements 8, How to show  hue, value and saturation of a specific area of a pickture?

    Hello,
    Photoshop Elements 8, How to show  hue, value and saturation of a specific area of a picture?
    How should I select the area? Which tool?
    Thank you in advance, Karl

    First make sure your Info Palette is visible : menu Window / Info (shortcut F8)
    In this palette, click the small     icon 'more'
    Choose 'Palette Options'
    and choose HSB for the second palette readout.

  • How to use multiple values in an IF condition in RTF

    Hi,
    I have a scenario as mentioned below.
    IF column value in ('A','B')
    display C;
    end if
    IF column value not in ('A','B')
    display D;
    end if
    My query is how to provide multiple values in an IF condition.?
    Thanks,
    Anand

    But suppose "x.jar" needs a library from "y.jar". How do you put another JAR on the classpath of an applet in a Web page?
    <applet code="z.class" archive="a.jar,b.jar,c.jar">

  • How to  show Blank values in Bex Report

    Hi friends ,
                       In my bex report one of the KF Column having zero's  and Blank values .
    Ex .   Mat     Price
              A         0
              B        
              C        15
                                    when i create a condition  Price > 0 
    Then the given Out put is    
                                            Mat     Price  
                                             C        15    
                                                                       but the required Out put is 
                                                                                                               Mat     Price
                                                                                                                B 
                                                                                                                C        15
    I.e  I have to Remove only zeros and i should show blank values. Could you pls give some Ideas on this .

    Hi friends thanks for response,
    but my requirement is
    Mat                 
    Price1
    Price2
    A
         0
    B
    12
    C
       15
    D
    0
    E
        8
    F
         0
    The Required  Out put should be
    Mat
    Price1
    Price2
    Price3 (1+2 )
    B
    12
    12
    C
    15
    15
    D
    0
    0
    E
    8
    8
    The user don't want see materials Price1 which  is Zero . So  I should remove materials A and F  in Price1 column .
    IF i apply condition on Price1 > 0  in the out put B and D also not displaying bcoz  blank values consider as Zero.
    Can you pls give some ideas how to full fill this Requirement

  • How to show excessive values in next page in SAP SCRIPT

    Hello,
    Please any one can help to show excessive values in next page .
    For example i want to show
    567
    5678
    789
    23456
    I want to show values 23456 in next page only.
    Can anyone please suggest me how to do so?
    Thanks and regards
    Mave

    Hi Swetlin,
    I have this format in the main window.
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    now when i am doing as you suggested
    the last texts are coming in the next page.
    What i want is to show overflow of numeric data in next page and the remaining last text should remain as it is in the first page only.
    i mean
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    and in the next page
    4567
    4568
    8790
    Thanks and regards
    Mave

  • How to show filter values of restricted key figures in BEx Analyzer?

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

  • How to show exponent value in adf output Text

    Hi,
    How to show values in the table column output text with exponent values like 3 ^rd^ , 2 ^2^ , Hello ^R^,etc.. ?
    Do we have any RichFormatText for the ADF output Text?
    Thanks..

    yes...got it myself...thanks..

  • How to show static values in h:selectOneListbox

    Hi
    i would like to show static values in <h:selectOneListbox>
    how do i that ??
    <managed-bean>
    <managed-bean-name>Options</managed-bean-name>
    <managed-bean-class>java.util.ArrayList</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <list-entries>
    <value>val1</value>
    <value>val2</value>
    <value>val3</value>
    </list-entries>
    </managed-bean>
    or some how i define a <managed-property> ??
    <managed-property>
    <property-name>options</property-name>
    <property-class>java.util.ArrayList</property-class>
    <list-entries>
    <value>val1</value>
    <value>val2</value>
    <value>val3</value>
    </list-entries>
    </managed-property>

    Hi Swetlin,
    I have this format in the main window.
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    now when i am doing as you suggested
    the last texts are coming in the next page.
    What i want is to show overflow of numeric data in next page and the remaining last text should remain as it is in the first page only.
    i mean
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    and in the next page
    4567
    4568
    8790
    Thanks and regards
    Mave

  • How to show header value in each page same as Page field value.

    Hi there
    It would be very helpful if anyone could tell us how to set header value based on the page field.
    To make it more clear.. i have a field in my Rtf (which is basically a group by) so in each page it'll differ.. My Header should reflect the same as field value.
    what my understanding is header wont change for each page. but ,my requirement is something like i have to show the header which is same as one of my filed value..
    for eg:
    HEADER: ABC page-1
    Field - ABC
    HEADER:XYZ page-2
    Field - XYZ
    Regards - Vijay
    Edited by: Vijay Santhanam on 23-Oct-2008 3:51 PM

    Hi Haiye ,
    The Pointer you gave would keep Header ABC through out all the pages in report right, actually i had tried this and got same header for all pages,
    but what i need is my first page Header should be based on one of the field of Page 1, second pge Header again based on the same field, but the value may differ... (coz the page field is group by ).
    Would appreciate your help on this issue!!
    Regards - Vijay

  • How to show legend values ON PIE in pie chart View

    Hello experts ,
    I have a requirement to show the values of the legend ON the pie in a PIE chart view .
    Usually when I give show data labels "always" option , that displays the % on top of the pie or side to the pie but Iam trying to get the % value ON the pie and
    I am wondering to know is there any way we can show the actual value instead of percentage in PIE view .
    Can somebody please help me through this .
    Thank you
    Karthik

    Hi,
    I have a requirement to show the values of the legend ON the pie in a PIE chart view .
    Usually when I give show data labels "always" option , that displays the % on top of the pie or side to the pie but >Iam trying to get the % value ON the pie By dedault you don't have this, by changing the pie.pcxml we can achieve this.
    It is in the folder <OracleBI_home>\web\app\res\s_oracle10\popbin
    But the changes you do will affect all the pie charts as whole. Before do the changes take the backup of pie.pcxml.
    In the pie.pcxml, Goto -> DataLabels tag, by default the value would be Position='OutWithLeader'
    Change that attribute to, Position='Inside'
    After the changes save and restart javahost and presentation server.
    This will do.
    If you don't want the pcxml change, create your new pcxml file and point it.
    I am wondering to know is there >any way we can show the actual value instead of percentage in PIE view . Change the setting as bifacts said.
    Thanks,
    Vino
    Edited by: Vinodh NK on Oct 12, 2010 1:34 AM

Maybe you are looking for

  • Ordering phones during house move

    Hi all, I thought I'd rant here rather than be stuck in a queue for 30 minutes. Hopefully a mod can help me out. So, I contacted BT via the website for a house move and ordered two telephones at the same time to be delivered when we moved in. Simple

  • Problem with Stored Procedure exection in Oracle DB

    Hi, I am facing some problem while creating and executing a store procedure. Please help me solving my problem. Here are the details : My Store Procedure : PROCEDURE EMP2 (PROCESSED IN VARCHAR2 ) AS BEGIN SELECT * FROM EMPLOYEE WHERE PROCESSED ='NO'

  • Elements 11 and Raw file from Nikon D7100

    I have newly installed Elements 11 and downloaded the updated raw plugin 7.4 but it still won't open raw files from NikonD7100.  Any other tricks?

  • Pricing exchange rate

    Hi Gurus,                     In copy controls from delivery to invoice there is one field  " Pricing exhange rate type" having the enteries as A     Copy from sales order B     Price exchange rate = Accouting rate C     Exchange rate determination a

  • Default Value using SQL

    Hi, How can I default a value in a descriptive flexfield by source of transaction? I am trying to update an invoice flexfield by source but it won't let me perform an update query as follows: update ra_customer_trx_all cac set attribute15 = 'Ready' w