How to Get ZERO and Non-ZERO Values in rowcount using Group by?

Dear All,
How can I get Non-ZERO and ZERO row count values in SQL using Group by? I can get non-zero values but when I want NULL should be returned to non-zero values it is ignoring ZERO values in output?
Any hint?
Thanks
GQ

Hi,
Something like
select count(case col
                when 0
                then 1
              end) zero_count,
       count(case nvl(col,1)
                when 0
                then null
                else 1
              end) nonzero_countRegards
Peter

Similar Messages

  • How to get higher and second higher value in one row?

    Hello world,
    I want to get higher and second higher sal from emp in one row ,,
    Thanks

      1  select e.empno, e.ename,  e.sal,  lag(sal) over (order by sal) next_sal    from emp e
      2* order by sal
    SQL> /
         EMPNO ENAME             SAL   NEXT_SAL
          7369 SMITH             800
          7900 JAMES             950        800
          7876 ADAMS            1100        950
          7521 WARD             1250       1100
          7654 MARTIN           1250       1250
          7934 MILLER           1300       1250
          7844 TURNER           1500       1300
          7499 ALLEN            1600       1500
          7782 CLARK            2450       1600
          7698 BLAKE            2850       2450
          7566 JONES            2975       2850
         EMPNO ENAME             SAL   NEXT_SAL
          7788 SCOTT            3000       2975
          7902 FORD             3000       3000
          7839 KING             5000       3000

  • How to get Search and offline Availability properties in SharePoint using powershell with CSOM

    Hi,
    I want to get the information about the SharePoint sites being crawled or not. I tried to get "Search and offline Availability in SharePoint" settings properties but I couldn't get those properties.
    I followed below thread with no luck : http://www.c-sharpcorner.com/uploadfile/anavijai/search-and-offline-availability-in-sharepoint-2010/
    I couldn't find $web.AllowAutomaticASPXPageIndexing property at site level but i can see $list.NoCrawl
    at list level.
    Can any body help me out to get those values?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    Since AllowAutomaticASPXPageIndexing is a member in SPWeb members while not in Web members, we can not use Client Side Object Model with it. If you need to use it in client side, you need to create a web service for it.
    https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.client.web_members.aspx
    https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb_members.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get datatype and label of columns in a record group

    Hi all,
    I need to create a generic block which displays data of any query. For this, I was thinking at runtime I'll create a recordgroup. For this I was hoping to get the datatypes and label of various columns in the records.
    Please help me in this regard
    Thanks

    Hi everyone,
    Can you please tell me that Is it possible to get the datatype and name of columns of a recordgroup during run-time or not. So that I don't waste my time in searching for this solution. If you are not getting my question then please let me know but I need this help very badly.
    Thanks
    Subodh

  • I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get back the non used part of the old plan?

    I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get back the non used part of the old plan?

    Hi edilsoncf,
    I've seen your question on several forums, and responded there. Did you get your subscription sorted out?
    See: How do I get a refund if I have multiple Acrobat service subscriptions?
    Best,
    Sara

  • How to get the latest credit limit values per each customer in the report.

    Hi All,
    Can anybody give me an idea on how to get the latest credit limit values per each customer in the report.
    I have below requiremnt.
    I have cube which is having transactional data on document and customer level .and it also having master data info object in the cube which is credit management view having all the customer numbers .
    This credit management view is master data info object having credit limit key figure as attribute.These credit limit are per each customer.
    So we need these credit limits in the report as dynamic values .(I mean whatever be the current credit limit in the master data table for that paricular customer that should show up in the reporting).
    one more thing these credit limits should roll up correctly at the HTR level.
    One HTR having number of customers .
    for example HTR 100 can have customer number 200,300,400.
    Those 200,300,400 customer credit limits should roolup correctly at the HTR 100 level.
    Example below :
    Cube DATA :
    HTR Customer Doct number Credit managment view
    100 200 10001 200
    100 200 10002 200
    100 300 10004 300
    100 300 10005 300
    100 400 10006 400
    100 400 10007 400
    100 400 10008 400
    Master data tabel (P Table)(Credit managment view)
    Credit managment view Credit limits
    200 1000.00
    300 50000.00
    400 90000.00
    Please remeber :
    We can not make these credit limits as navigational becasue these are keyfigure attributes not characteristics.
    one more thing we can not make them as charatistics because we need use these credit limits to derive other calkculation. so it is not possibel to derive calculations on charactristics .

    Create a formula variable of type replacement path with reference as attibutes of Credit management view and choose your key figure credit limit,say zcredit.
    Now create a formula or CKF and use zcredit.
    This should display the credit limit in your report as normal key figure.
    I didnot get this part "one more thing these credit limits should roll up correctly at the HTR level.", may be the above will solve this too.Try it.
    Hope this helps.

  • Which table i can get BED and ECS+SHEC values

    Hi all
    which table i can get BED and ECS+SHEC values and how i link to PO number..
    plz help me
    thanks
    ramesh

    Hi
    please search before you post the question ,
    this query is discusssed many times in the forum
    [Searching|http://lmgtfy.co/?q=sapexcise%20table]
    for excise check table J_1IEXCHDR for header
    J_1IEXCDTL for item excise

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How to get the logged in userId value in adf task flow OIM11g R2

    Hi,
    I have created an adf task flow. Now I want to run some query in that based on the logged in userId.
    Could you please help me in knowing how to get the logged in userID value in adf TaskFlow so that I can run a parameterized query.
    Thanks

    3 different ways to retrieve the username (not sure what you mean by user ID) :
    http://mahmoudoracle.blogspot.be/2012/06/adf-get-current-logged-user-name.html#.USI_c-h8zIo
    Also provide your JDev version.
    Basicly, you should use the groovy expression in a view criteria (it's the fastest and easiest way) and call that view criteria whenever you need it.
    That's if you are using ADF BC of course.

  • How to get userId and ResponsibilityId of EBS Application

    Hi all,
    We are using oracle.apps.fnd package to get the userId and ResponsibilityId of EBS Application. By using this api we are getting -1 for both userId and resposibilityId, but want the corrrect values for these two Ids.
    Can anyone please tell us how to get userId and ResponsibilityId of EBS Application using oracle.apps.fnd package?
    Thanks,
    Eswari

    Hi Kumar,
    Thanks for your answer. I tried using pageContext, but it didn't work.
    I forgot to mention the version of EBS Application. We are using 12i.
    To use FND_GLOBAL package first we should initialise by passing userId and respId which we want. Can we get these details from this api oracle.apps.fnd of 12i Instance.
    Thanks,
    Eswari
    Edited by: user593578 on Jul 31, 2009 4:35 PM
    Edited by: user593578 on Jul 31, 2009 5:18 PM

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • How to get gui_download and gui_upload with popup filename?

    how to get gui_download and gui_upload with popup filename?

    Here is a short example.
    report zrich_0003 .
    data: ifiletab type filetable.
    data: xfiletab like line of ifiletab.
    data: xstring type string.
    data: rc type i.
    data: itab type table of string.
    data: xtab type string.
    start-of-selection.
      call method cl_gui_frontend_services=>file_open_dialog
        changing
          file_table              = ifiletab
          rc                      = rc.
      read table ifiletab into xfiletab index 1.
      xstring = xfiletab-filename.
      check not xstring is initial.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = xstring
      changing
        data_tab                = itab.
      loop at itab into xtab.
        write:/ xtab.
      endloop.
    Regards,
    Rich Heilman

  • How to get nodes and its attributes of an XML file usiong DOM parsing?

    how to get nodes and its attributes of an XML file usiong DOM parsing?
    i am new to XML parsing.......
    Thanking you........

    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;      ...
    //Setup the document
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         Document doc = docBuilder.parse (new File("MY_XML_FILE.xml"));
    //get elemets by name
         String elementValue = doc.getElementsByTagName("MY_ELEMENT").item(0).getTextContent();
    //This method can return multiple nodes, in this instance I get item(0) , first nodeRead the api for other methods of getting data.

  • How to get vendor and company code based on logistic invoice document

    how to get vendor and company code based on logistic invoice document in abap/4?

    Hello Kumar
    When you call BAPI_INCOMINGINVOICE_GETDETAIL using
    INVOICENUMBER = <number of invoice>
    FISCALYEAR = <fiscal year>
    the returned HEADERDATA contains what you are looking for:
    HEADERDATA-COMP_CODE
    HEADERDATA-DIFF_INF
    Regards
      Uwe

Maybe you are looking for

  • I need PDF thumbnails in Vista 64

    I'm running Acrobat Pro 9.1 in Vista 64.  I have approximately 50,000 PDF files in various folders.  And I rely completely on the thumbnail to help me quickly sort through droves of files.  I simply cannot function without the ability to view thumbna

  • ABAP Objects - real example

    Hello everybody, can someone please navigate me to some "real example" of using abap objects? I went through demos in sap (I am using SAP R/3 4.6C) in <i>transaction ABAPDOCU, I have a book Horst Keller: Abap Objects (where partially the object orien

  • HP Laserjet 1100A - Mac Mini

    Any suggestions of how to get an HP 1100A working with a Mac Mini? I've replaced my Dos machine (running XP) with a Mini and everything now works apart from the printer. Is there a driver for the 1100A? I think it's a parallel connection. Is there a

  • /usr/lib/extendedFILE.so.1 for Solaris 9

    Hi All, How do I get /usr/lib/extendedFILE.so.1 in Solaris 9.What would be the quickest way to download that. I tried changing the system file but set # set rlim_fd_max=8192 ; hard limit (per process) # set rlim_fd_cur=1024 ; soft limit (per process)

  • Create pdf from any type of file file format

    Hi there; I have to create a pdf file from a special file format (which is not in the supported file list of livecycle pdf generator).Is there any chance to accompish that transform?I know Java.Thanks in advance..