Show something different insted of "no rows selected"

My aim is quite simple. Show values from var1, var2 and var3 if count(*) is bigger that 0 and show empty strings ' ' where there is no values with meet a condition. I try do this on several ways. Actually my query looks like this below:
WITH cntct AS
  (select CONTACT_NAME as var1, LAST_NAME as var2, FIRST_NAME as var3, CONTACT_PHONE as P from dmo.contact_view)
  select distinct decode(cnt.cntall,0,'',ct.var1) as var1, decode(cnt.cntall,0,'',ct.var2) as var2, decode(cnt.cntall,0,'',ct.var3) as var3, ct.P as P from
  (select count(*) as cntall from cntct) cnt, cntct ct where P = 'not existing value';Can you provide me some idea, what to change to show ' ' if P will be not existing value?

Hi,
lesak wrote:
Of course, you're right. So let's start from begining. My Oracle version is 11.2.0.1.
And what I'm trying to say is that a query from below works great after your remarks:
WITH cntct AS
(select CONTACT_NAME as var1, LAST_NAME as var2, FIRST_NAME as var3, CONTACT_PHONE as P from dmo.contact_view)
select distinct decode(cnt.cntall,0,'',ct.var1) as var1, decode(cnt.cntall,0,'',ct.var2) as var2, decode(cnt.cntall,0,'',ct.var3) as var3, ct.P as P from
(select count(*) as cntall from cntct) cnt left outer join cntct ct on ct.P = 'not existing value';But, when I'm trying to create a view base on that query, Oracle qives me such error:
SQL> CREATE OR REPLACE FORCE VIEW some_view AS
2    WITH cntct AS
3    (select CONTACT_NAME as var1, LAST_NAME as var2, FIRST_NAME as var3, CONTACT_PHONE as P from dmo.contact_view)
4    select distinct decode(cnt.cntall,0,'',ct.var1) as var1, decode(cnt.cntall,0,'',ct.var2) as var2, decode(cnt.cntall,0,'',ct.var3) as var3, ct.P as P from
5    (select count(*) as cntall from cntct) cnt left outer join cntct ct;
(select count(*) as cntall from cntct) cnt left outer join cntct ct
ERROR at line 5:
ORA-00905: missing keyword
If you don't post CREATE TABLE and INSERT statements for contact_view, or use a commonly available table, (such as scciott.emp) in place of contact_view, then I can't reproduce the problem. If contact_view really is a view, you can pretend it's a table, and post CREATE TABLE and INSERT statements that mimic the contents of your real contact_view. Post some sample data for contact_view, and what you want some_view to contain given that data.
I suspect you're getting an error becuase there is jo join condition after the column alias ct at the end of line 5.
I need to create that view, because my final query should look like:
select * from some_view where P = 'existing or not existing value';
If that's your query, then it will return 0 rows (and NOT 1 row containing all NULLs) if P is never equal to the given value. If you want to query table y, and get a row of all NULLs when condition c is never true, then use:
SELECT  y.*
FROM             x
LEFT OUTER JOIN  y  ON c
;where x is an table, view or sub-query that contains exactly 1 row.
Are you trying to create a view based on a parameter (e.g., :target_p := 'existing or not existing value')? Please give a concrete example of what you're trying to do.

Similar Messages

  • When the iPad 2 is plugged into the tv, can it show something different on the tv then on the iPad

    Like a second display on a computer

    I restored the iPod in iTunes and it worked.  Thanks for your help.

  • Row selection messed up after sorting

    JDev version: 11.1.1.4 (but also reproducable in 11.1.2.1)
    See http://kpdwiki.be/Bart_L/tableIteratorSortSync.zip (open BO726.jws and run runThis.jspx)
    Situation:
    - iterator 'EmployeesIterator' which points to a view with Employees -> ChangeEventPolicy='none'
    - Bindings which all point to this iterator:
    - Tree binding 'Employees' used for an af:table with employees (firstname, lastname)
    - Attribute bindings 'FirstName' and 'LastName' which is used in a formLayout to show the currently selected employee
    - Operation Bindings to iterate through the employees (First, Previous, Next, Last)
    - runThis.jspx
    - formlayout with FirstName and LastName
    -> partialtriggers: Next-button and table (for the rest, no partialtriggers)
    - Next-button
    - table with employees
    Problem:
    1) if you select one of the employees in the table, and sort one of the columns, the first row will be selected. This is normal behaviour
    2)
    a) select the first row
    b) press the 'Next' button a few times. Now the selected employee in the iterator is 'X'
    c) in the table, select employee 'X' by clicking on its row
    d) sort one of the columns.
    Result: In the iterator, the first row of the table is selected, while the table selection shows something different!
    --> this is different behavior than the situation described in 1)
    --> after doing something with the table (sorting, filtering, selecting rows, ...), I would expect that the selected row in the table is always the same as the selected row in the iterator.
    Questions:
    1) Is this a bug?
    2) If yes, is this a known bug?
    3) If no: am I doing something which is not allowed? Or should I do something different here?

    I can reproduce the problem in 11.1.1.4.
    First employee is Steven King, which is selected. I then press next a few times till the output text reads Bruce Ernst (the table selection is still on Steven King, while the iterator points to Bruce Ernst). I then click on Bruce Ernst in the table, so it is selected (iterator stays on the same record). If I then sort the table, the table selection stays on Bruce Ernst, while the output text shows the first record in the table after the sort.
    We have the same issue using a non-modal popup to edit table rows (non-isolated task flow, sharing data controls & transaction). Our edit popup has navigation controls. When we scroll through records in the popup, the table selection doesnt refresh (changeEventPolicy = none). If we then select the record in the table that we scrolled to in the popup , without closing the popup, and then sort the table (with the popup still open), the selection stays on the previously selected record, whille the popup shows the first record in the table after the sort.

  • WorkOrderList TileView Row & Selected Row Background Color Change

    Hi,
         can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
    but these applied style on Rows & Selected Rows are not working in Agentry client.
    if any other alternate solution exist in Agentry, please guide me.
    i am using following...
      sap mobile platform-2.3.3
    Thanks & Regard
    Manish Kumar
    Tags edited by: Michael Appleby

    Hi Jason
          Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
         Please guide me how to remove white outline and default Blue Selected Background color.
    Thanks & Regard
    Manish Kumar

  • Currently running Adobe XI Standard, i have a PDF that i Save As excel however on my computer it converts it differently than my coworkers computer who has the same Adobe version and same version of Excel 2010. Is something different selected on mine than

    Currently running Adobe XI Standard, i have a PDF that i Save As excel however on my computer it converts it differently than my coworkers computer who has the same Adobe version and same version of Excel 2010. Is something different selected on mine than his? How can i troubleshoot?
    Can provide more information if needed...

    Hello nmohamm,
    To examine the conversion settings in Acrobat, do the following:
    1. Select Edit > Preferences
    2. In the preferences dialog, select the "Convert From PDF" category.
    3. In the "Converting From PDF" list, select "Excel workbook".
    4. Click the "Edit Settings" button to view your conversion settings.
    Regards,
    Charlene

  • HOW to emphasize the row selected in a different colour

    Hi all,
    there is any way to set the selected row in a table in a different background-colour?
    i want to emphasize the row selected by user, i try this:
    <af:column headerText="#{res['abogados.nombre']}"
    sortProperty="Nombre" sortable="true"
    binding="#{backing_app_Abogados.column14}"
    id="column14">
    <af:outputText value="#{row.Nombre}"
    binding="#{backing_app_Abogados.outputText14}"
    id="outputText14"
    inlineStyle="background-color:#{bindings.AbogadosView1.currentRow.codigo == row.Codigo ? 'red' : 'transparent'};"/>
    </af:column>
    but this sets the outputText's background to red, i want to set in red all the row..
    any idea?

    Does Rado's following blog entry help: http://adf-rk.blogspot.com/2007/01/adf-oracle-form-like-overflow-in-adf.html

  • How do I change the default '/' shortcut (select none in colour swatch) to something different? Where can i find it in Keyboard Shortcuts?

    How do I change the default '/' shortcut (select 'none' in colour swatch) to something different? Where can i find it in Keyboard Shortcuts?
    Any ideas?

    Thanks so much )))))))

  • Show different dropdownlists according to the selected value

    Hi All,
    I need pop up a different dropdownlist according to the selected item in one dropdownlist.
    .e.g. if I select state in one dropdownlist, another dropdownlist contains all the states will show up beside it.
    Any one can help me?
    Thanks a lot

    There are two ways of doing it. Both involve javascript
    1 - capture the onchange event of the first dropdown. Submit the page, and reload it with the correct values for the second dropdown list
    2 - If there aren't that many different options, you can download all the different option lists into your page. Capture the onchange event of the first dropdown, and then use javascript to set the values in the second dropdown box.
    Both have pros and cons. The first option requires a page refresh. The second one requires that you download all possible options to the page.
    Good luck,
    evnafets

  • When entering a new event I select e-mail as the alert and my e-mail address. When I'm done the event shows a different e-mail that I can't delete How do I get rid of this?

    When I enter an event I select e-mail for the alert and select my e-mail address from the drop down box. However, the event shows a different e-mail address than mine. I can't delete this wrong e-mail address from the event or from the drop down box. I do seem to get the alert in my e-mail, but don't know if the other e-mail is also getting my alerts. How can I resolve this? My wife has an iPad and syncs iCal through iCloud. Could this be causing the problem?
    Thanks,
    Wayne

    Wayne,
    Quit iCal, open Address Book, and click on your card. Then select Address Book>Card>Make this My Card.
    If that does not fix the problem, then delete and recreate your card, and once again make sure to designate it with "Make this My Card.

  • A Listener For JTable Row Selection Changed?

    Never mind... Thought of a couple other things after I posted and found ListSelectionListener. This looks like it fulfills my requirement nicely. - cimmerian76
    >>>
    TableModelListener isn't what I am looking for here. Basically, I'm looking for something that behaves in a way that is analogous to
    TreeSelectionListener's valueChanged(...). Perhaps I'm looking in the wrong places, but the only things I've found were RowSet listener (not even close)
    and TableModelListener (not exactly what I'm looking for - I'm not concerned about data in the table changing).
    The tool I'm writing displays additional information about the object in the row selected in an adjacent panel.
    This display should change every time a user selects a different row.
    I can mimic the behavior I want using a mouse listener on the table, so this isn't an emergency.
    It's more about curiosity. If I can find something that produces this functionality directly, I would prefer to use that.
    <<<
    Message was edited by:
    cimmerian76

    Hi,
    you can use this to handle selection events for the table:
    yourTable.getSelectionModel().addListSelectionListener(... );
    Now e.g. the class containing your main can implement interface ListSelectionListener.

  • ALV - problem to disable row selection (SET_ROW_SELECTABLE)

    Hi,
    I'm using an (non editable) ALV with a supply function to display details to each line.
    I have to buttons "New" and "Modify" to insert a new line or to modify an existing row (in the details).
    This works fine.
    Now what I want to do is, if the user press one of the buttons "New" or "Modify", I want to disable the row selection of the ALV, so the user can't select another row during inserting or editing.
    For this, I've implemented in the WDDOMODIFYVIEW of the view the coding to enable or disable the row selection
    lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_TRUE ).
    * or
    lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_FALSE ).
    In case of "New" this works fine. The row selection is disabled.
    But not in case of "Modify".
    There is a strange behaviour:
    The row selection is not completely disabled. It looks like you can select rows, but if you select another row, it is automatically jumping to the first row and also the details is updated to the first row.
    The different between "New" and "Modify" is, that in "New", I create a new element in the ALV.
    Than it works correct. If I do the same in "Modify", I have the same correct behavior.
    But of course, I don't want to insert a new row in my "modify" mode.
    So maybe it has something todo with set lead selection?
    Maybe I do something wrong or that is a problem in the abap release. But I can't find anything in OSS.
    Thanks in advance!
    Andreas

    Hi,
    I would like to propose another approach here,
    I assume that ALV is in read only mode.
    1. User select the row and press the "Modify" button. As soon as user press the modify button "disable" the Modify and New button.
    2. Once the user is finish with the changes and press save. Enable the new and modify button.
    3. Without saving if user select anyother row then raise the "Save" confirmation popup with Yes, NO and Cancel button.
    4. If User press the New button then add new row and disable the "New" and "Modify button". Follow the Step 2 and 3 for this case also.
    I hope this will give you some idea.
    Thanks,
    Rahul

  • Custom JTable column (JCheckBox) not included in row selection.

    I am trying to use JCheckBox (for display only data) as one of my JTable columns. I have written custom cell renderer for the same. Every thing is working fine except that when I select a row, the new custom JCheckBox column is not included in selection. Here is the code that I am using.
        protected class CheckBoxColumnRenderer extends DefaultTableCellRenderer {
            JCheckBox ckb = new JCheckBox();
            public Component getTableCellRendererComponent(JTable table, Object value,
                        boolean isSelected, boolean hasFocus, int row, int column) {
                if (value instanceof Boolean) { // Boolean
                  ckb.setSelected(((Boolean) value));
                  ckb.setHorizontalAlignment(JLabel.CENTER);
                  ckb.setBackground(super.getBackground());
                  if (isSelected || hasFocus) {
                      ckb.setBackground(table.getSelectionBackground());
                return ckb;
        }How can I include the custom cell in the row selection.
    regards,
    nirvan.

    they have lots of dependencies and it is not always easy to strip out an SSCCE without a considerable effort.Exactly. And is the cause of the problem the dependencies or something else. The only way to know for sure is to strip out the code and simplify the problem, that way you truly understand what the problem is.
    The majority of time this can be done with minimal effort as in this case.
    Some times we are sure that the problem is with certain part of the code Is the problem the code or the way the code is invoked? How do we know the TableModel is created properly or that the column class is overwritten correctly when we can't see it?
    someone having a third look at it may actually find the enhancement required with ease.Exactly, but we need to see the big picture.
    So are you sure that I should post an SSCCE with every possible question where coding is involved ?In the majority of cases a SSCCE is easily created in 5-10 minutes, so if you want the fastest help then yes.
    Just twice this past week I was ready to ask a question on the forum and was preparing a SSCCE to post and sure enough both times the creation of the SSCCE caused me to look at the problem differently and I solved it. I would much rather solve a problem on my own then post a question and wait for hours (days) hoping someone else knows the answer.

  • Is it possible to show the count of number or rows in table on the Home page Tab button.

    Is it possible to show the count of number or rows in table on the Home page Tab button.
    On home page there is a Tab called Count and I want to show the count on the right corner of this tab button.
    Please help

    Create an application item. APP_HOME_COUNT.
    Create an application process:
      make the application process type "on new instance" if you only want this to run once
      make it "on load before header" if you want to have the value set every page load
    application process source:
    select count(*) into APP_HOME_COUNT from <your table>
    modify the tab name to reference the app item, maybe something like "Count(&APP_HOME_COUNT.)"
    result should look like this "Count(5)"
    Good Luck,
    Tyson

  • Row Selection

    Hi all,
    I have a data table and if a row is selected I want it to load a different JSF page. I want to use the row selection feature as the highlighting aspect is useful. However, row selection seem to me to only link to a listener, so I can load parts of the current page based on a row selection but not issue a command to take me to another page. Currently I have had to disable the row selection and just stick an icon at the start of the which is an commandImageLink.
    Is there a way to perform a action when a row is selected? I hope I'm missing something obvious as this would seem to me to be quite a common thing. Maybe its not there? is there a way to achieve this functionality? Maybe some sort of request dispatched in the selection listener method?
    Cheers,
    Dale

    Hi John, thanks for reply, don't understand how though? I have a rough idea of how to use the selectionlistener as I have used it in a few places but not to jump to another page, so I have tried just changing return type from void to String but that does link away...
        public String LoadTask(SelectionEvent selectionEvent) {
            RichTable table = (RichTable)selectionEvent.getComponent();
            Task selectedTask = (Task)table.getSelectedRowData();
            // to some stuff
            return "showTask"
        }So what I want to do is navigator to "showTask" when I select a row but I just can't see a mechanism to do that?
    Table looks like this...
                    <af:table value="#{Tasklist.taskList}" var="row"
                              rowBandingInterval="1" id="t1" rowSelection="single"
                              disableColumnReordering="true" emptyText="No tasks matching criteria"
                              fetchSize="#{Tasklist.pagingData.rowsPerPage}"
                              partialTriggers="::cb1 ::cb2 ::cb3 ::cb4"
                              immediate="true"
                              sortListener="#{Tasklist.SortTasklist}"
                              selectionListener="#{Tasklist.LoadTask}">
                        <af:column frozen="true" id="sel" headerText=" " width="30">
                            <af:commandLink id="loadLink" action="#{Tasklist.loadTask}" text="Load">
                              <f:param id="tskId" name="taskId" value="#{row.systemAttributes.taskId}"/>
                            </af:commandLink>
                        </af:column>
                        <af:forEach items="#{Tasklist.columnsMetaData}" var="colDef">
                            <af:column sortable="true" sortProperty="title" headerText="#{colDef.headerText}" align="start" id="dataCol">
                              <af:outputText value="#{ExprBean[colDef.valueBinding]}" id="ot4"/>
                            </af:column>
                        </af:forEach>
                    </af:table>I want to do away with that Load column but just can't seem to do it with row selection :o(
    Cheers,
    Dale

  • Execution of a planning function for a row selection of a hierarchy node

    Hi all!
    Has anyone accomplished to make a configuration, where a planning function would have been executed for a hierarchy node selection and this selection would have been made by a row selection in an analysis item? I can filter the characteristic in a lowest level by selecting rows in analysis item, but if I would select a hierarchy node, the value for the characteristic is empty. I have set the selection state by binding the item_characteristic of analysis item to filter of the other characteristics.
    I tried first to reach this functionality by filtering the characteristic with variables in planning modeller filter and determining the values of the variables during runtime by the selection of the analysis item row selection. But I can not implement it as the display hierachy and the hierarchy node selection in the analysis item  are variables and modeller does not allow selection of a hierarchy node and hierarchy by variables - even thoug it let's you do it (I receive error message saying "field hienmflag with value 5 is not correct").
    Greatful for any working solutions tips you have made up!
    Sari

    Thanks for the explanation. I come from BPS background and there are few changes when it comes to planning functions in IP.  In BPS, the planning function is a bit loosely tied to Planning Package in a sense that a planning function can use any planning package under the planning level to which it belongs.  Same is the case in IP (technically), but in BPS the planning package contains all the characteristics and key figures of the planning level and hence the function can execute correctly.  What I see in IP is that planning function is very loosely tied to Filter.  It can use any filter under the aggregation level even though they differ in the characteristics and key figures.  I have tried a PF with different filters and it executes with everyone of them!  This doesnu2019t sound right!  Am I missing something here?
    Also, you can only execute a IP planning function if it is included in a planning sequence.  An extra step!  The modeling is so intuitive in BPS that IP is a bit repulsive.

Maybe you are looking for

  • Can I sample a layer's "true" color despite its opacity and blend mode?

    I'm doing some painting with a lot of layers set to different blend modes.  I find that every time I want to paint on one of these layers, I have to go to that layer, set the opacity back to 100, change the blend mode back to "normal" sample the colo

  • Volume too low on album purchased on iTunes

    I purchased an album on iTunes and when I burn to CD the volume is too low. I have done all suggest things to "enhance" the sound. All other items I have purchased are fine. It just seems to be this one album. Any suggestions. Is there a way to "repu

  • IMessage settings not saving

    I recently upgraded to Mavericks.  In iMessage, when I go to View, Messages, then click "show names" that setting does not save when I exit out of the program.  When I open iMessage again, it has reset to "show pictures."  I haven't had this problem

  • IOS7 for iPad Mini will be better in the next versions?

    I just upgraded my new iPad Mini (3 days of life) to iOS7 from iOS 6.1.3 It was a big error for me. With iOS 6.1.3 my Tablet was incredible fast, the battery was excellent, all the apps were opened instantly and all the tablet performance were fast.

  • Dreamweaver Interface Icons are too small

    I have Dreamweaver CS3 for the Mac. I am using Mac OS X on a G4. The problem is that the selection and control icons in the various toolbars are so small, they are causing eyestrain. The same goes for the text on the tab headers and the Panel group.