BlackBerryLocation.getSatelliteInfo () returns a null value

The method always returns null. Valid GPS locations are acquired, with the no. satellites given as well. I want to determine the quality of the satellite signal, I'd really like the detailed satellite information.

As explained in a thread on this issue by another poster, I used the following method to allow information by Satellite:

BlackBerryCriteria.setSatelliteInfoRequired (true, false);

I tried the method of getSatelliteInfo() on the following devices.

-Bold 9000 (5.00.1036)

-Torch 9800 (6.0.0.246)

The code is below.

Any help would be greatly appreciated.

Simon

            BlackBerryCriteria myCriteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);
            myCriteria.setSatelliteInfoRequired(true, false);

            try
            {
                BlackBerryLocationProvider myProvider =
                  (BlackBerryLocationProvider)
                    LocationProvider.getInstance(myCriteria);

                try
                {
                    BlackBerryLocation myLocation =
                      (BlackBerryLocation)myProvider.getLocation(300);

                    satCount= myLocation.getSatelliteCount();
                    signalQuality =
                      myLocation.getAverageSatelliteSignalQuality();
                    dataSource = myLocation.getDataSource();
                    gpsMode = myLocation.getGPSMode();

                    SatelliteInfo si;
                    StringBuffer sb = new StringBuffer("[Id:SQ:E:A]\n");
                    String separator = ":";

                    for (Enumeration e = myLocation.getSatelliteInfo();
                      e!=null && e.hasMoreElements(); )
                    {
                        si = (SatelliteInfo)e.nextElement();
                        sb.append(si.getId() + separator);
                        sb.append(si.getSignalQuality() + separator);
                        sb.append(si.getElevation() + separator);
                        sb.append(si.getAzimuth());
                        sb.append('\n');
                    }
                }
                catch ( InterruptedException iex )
                {
                    return null;
                }
                catch ( LocationException lex )
                {
                    return null;
                }
            }
            catch ( LocationException lex )
            {
                return null;
            }

To obtain the information by satellite, a LocationListener must be put in place to wait for notifications in a separate thread by implementing the locationUpdated(). Please take a look at the LocationProvider class to see how setLocationListener.

Tags: BlackBerry Developers

Similar Questions

  • IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Hello

    I'm trying to read and modify a document XMP data, but I always get a null value when playing it.

    In addition,

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    does not either;

    App: application var = InDesign.app;

    var doc: Document = app.activeDocument;

    var idh:IDHostAdapter = IDHostAdapter.getInstance ();

    var xmpString:String = idh.getXMPString (doc);

    var warpxmpContext:WARPXMPXMPContext = new WARPXMPXMPContext (xmpString);

    warpxmpContext.wARPXMP.publicacion = "periodico";

    var updatedXMPString:String = warpxmpContext.serializeToXML ();

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    var xmpString2:String is IDHostAdapter.getInstance () .getXMPString (doc);.

    Any ideas?

    Thank you

    Hello

    We have an updated version of the adapter host available for download InDesign library:

    http://cssdk.host.Adobe.com/SDK/1.5/patch/id_hostadapter_mac.zip

    Regarding the examples, please see the AssetFragger CS extension example which shows the adding/changing metadata XMP using XMP Namespace Designer and library InDesign Host Adapter.  This extension is available in Builder Extension CS under file > import > CS Extension Builder > samples.  For more information, please visit http://www.adobe.com/devnet/creativesuite/samples.html

    Kind regards

    LEA

    From: Adobe Forums [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Saturday November 5, 2011 19:45:40 + 0000

    To: laboratory user [email protected]<>[email protected]>

    Topic: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Re: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    created by substances. http://forums.adobe.com/people/Harbs. > in Creative Suite Extension Builder - see the discussion complete onhttp://forums.adobe.com/message/4009511#4009511

  • resolveNode returns a null value when a variable is used.

    LiveCycle Designer ES2, latest version

    Hello

    The following Javascript code, in the click event of a button, returns a null value for the variable opaque. When I manually enter the expected value the script works perfectly.

    I tried various modifications of the resolveNode line such as var opaque = xfa.resolveNode (qPage); , but without success.

    Also studied all the documents reference Adobe that I could find on the scripts and resolveNode. Any suggestions?

    var qPage = (Cell12.rawValue + "AnchorField");
    App.Alert (qPage);
    Opaque var = xfa.resolveNode ("' $... qPage '");
    App.Alert (opaque);
    var nPage = xfa.layout.absPage (opaque);
    App.Alert (nPage);
    xfa.host.currentPage = nPage;

    Thank you

    Ron

    I tried your sample and it seems to work very well... but I'm not sure 100% that you are trying to do... .going to your initial question on the passage of a variable in the resolveNode resolveNode expects a string, so you must use the following syntax to create the string:

    xfa.resolveNode ("$.." + qPage)

    Note that the variable is outside the quotes as such the string $... is added to the content of qPage. This wil work if qPage is a string as well.

    In your example you have defined qPage as an XFA object so that the syntax above will not work. If you intend to use the same way, you would use qPage.name so that the name of the field will be returned (this is a string) and it will be added to your expression of $ to make the $... ProductAnchorField

    Thus, the expression would be:

    xfa.resolveNode ("$.." + qPage.name)

    Make sense?

    Paul

  • VO.getCurrentRow () returns a null value

    Hi, OTN

    In short, the scenario is:
    View object is based on an entity. There is a form to the JSF page.
    I select a record by clicking next and previous. Then I click on create to display empty fields for the new record.
    When I click on the button, I need to register a field value and a default value for the new fields to records.

    How to:
    I have created a support bean and added customCreateMethod. To start, I want to get the value of current row field, but I can't get the current line.

    public String customCreateMethod() {}

    String amDef = "pattern. AppModule. "
    Config = "AppModuleLocal";

    Am = ApplicationModule
    Configuration.createRootApplicationModule (amDef, config); non-null

    ViewObject vo = am.findViewObject("ContentVersionView1"); non-null


    = problem here:
    vo.getCurrentRow (); Returns a null value

    System.out.println ("index:" + vo.getCurrentRowIndex ()); always returns 0
    }

    I tested variable vo by this code:

    While (vo.hasNext ()) {}
    Line = vo.next ();
    System.out.println (Row.GetAttribute ("IdContent"));
    }

    It works fine.


    How should I me current line?

    Thank you

    Hello

    createRootApplicationModule creates the new instance of the application module, thanks to which you did not receive the current line. Use the code posted by Timo in [this post | http://forums.oracle.com/forums/thread.jspa?threadID=933022] (which has been marked as correct) to get the instance of module of the application.

    Jean Lou

  • PersistentStore.getPersistentObject returns the null value?

    I use a random key to retrieve a shape of the object PersistentStore

    persist is PersistentStore.getPersistentObject (KEY);.

    Works fine on the Simulator (OS 5), when I take the code signed to the device (BB OS 5.0 Bold 8900)

    For some reason, it returns null, without exception. Thereafter any API I inoke on PersistentStore / persist returns null without exception persist even when the null value.

    I don't know if it's one thing to eclipse debugger, but even if the debugger shows that objects are null. Controls null applied in the code seems to fail, what does code see these objects as non-null. Pheww! How is it possible.

    In this code still shows up as null, then safetyTable and orderedkeys. However, the value null check in the failure code.

    At a later stage in the code, when I try to access orderedkeys are null again! Are struggling with this problem for two days, all the pointers would be very comfortable.

                        persist = PersistentStore.getPersistentObject( KEY );
                        persistOrderedKeys = PersistentStore.getPersistentObject(KEY_ORDERED_KEYS);
                        safetyTable = (Hashtable)persist.getContents();
                        orderedKeys = (Vector)persistOrderedKeys.getContents();
                        if (safetyTable == null)
                        {
                            safetyTable = new Hashtable();
    
                            persist.setContents(safetyTable);
                            persist.commit();
                        }
    
                        if (orderedKeys==null)
                        {
                            orderedKeys=new Vector();
    
                            if (safetyTable.size()>0)
                            {
                                Enumeration addressKeys = safetyTable.keys();
                                while(addressKeys.hasMoreElements())
                                {
                                    orderedKeys.addElement((String)addressKeys.nextElement());
                                }
                            }
                            persistOrderedKeys.setContents(orderedKeys);
                            persistOrderedKeys.commit();
    
                        }
    

    "I don't know if it's one thing to eclipse debugger.

    I had problems of this kind when I don't have a level of operating system for the device I am debugging on.

  • Returns the null value in HasMap.get ().

    Hi all.
    Just read the docs of java on hashmap and was interested in this topic the get() method:

    A NULL return value does not necessarily mean that the map contains no mapping for the key; It is also possible that the map explicitly maps the key null. The containsKey operation may be used to distinguish these two cases.

    I took in a case, which has been talked about: If the map allow nulls, returned by get() null will be just one key of the pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    sphinks wrote:
    I took in a case, which has been talked about: If the map permits null values, returned by get() null will be just a key pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    There is no second case. There is a single case, if you put a null value in a map, get() will return null. And because of that, if you need to know if a certain key is in the containsKey() worksheet should be used instead of the get() method.

  • return type is not specified... return type so how you return a null value

    My problem seems to be when no results are returned, I would return the same type of object, but as a null value, or almost, I think that's what I would do. If someone could please throw some light on how I should return a null object I would be very grateful.

    I should note I've already tried to return entityNew ("someObj") and which resulted also in failure.

    <!--get some object-->

    < cffunction name = "getSomeObject" returntype = "someObj" = "remote access" >

    < name cfargument = "client_key" required = "true" type = "string" >

    < name cfargument = "customer_id" type = "string" required = "true" / >

    < cfscript >

    value = [];

    value = entityload ("une_table", {client_key = "#client_key #", customer_id = "#customer_id #"});

    If (ArrayLen (value) == 1)

    {

    Returns the value [1];

    }

    return;

    < / cfscript >

    < / cffunction >

    < / cfproperty >

    Thank you in advance!

    You do something like ?

    If so, then again CF has no concept of null so you cannot assign to a variable CF.  If you return null, first change your attribute of the returntype to "any" and return it directly,

  • How to return a NULL value in LOV and insert into a field of allowingNULL number 4?

    Hello

    I have the following LOV and the return_value is PeopleId which is number 4, allowing NULL. And the LOV options are as follows:

    LOV named--> select named LOV-
    Show Extra values-> no
    Dynamic translation-> - untranslated-
    The number of columns - > 1
    Display Null-> Yes
    Null-> - Select value-
    Return NULL,-> NULL value
    ^^^^^^^^^^^^^^^

    ----------------

    List of values definition:
    Select Lname | ', ' || Fname | ' ' || Mname as display_value, PeopleId as return_value
    of PEOPLETB
    where PEOPLETYPE ('i', 'HERE', 'IF')
    order by 1
    --------------

    Given that PoepleId is a number 4, allowing NULL. I want a NULL value will be inserted, if the user does not select anything in the drop-down list. It seems that I would get "ORA-01722: invalid number" error when the PeopleId msg is null (ie: user doesn't have a selection). What is the good 'return Null value' I need to put it in? I tried "NULL" (see above) or nothing, it still does not work.

    Any suggestions?

    Thank you very much
    Helen

    Hello Helen,.

    You have found one of the many sources of my frustration with APEX. Here's what I do:

    In the definition of the element in your page, go to the LOV part and implemented like this:

    Display Extra values: Yes a dynamic conversion (I ignore this)
    Number of columns: 1 display Null: No.
    Display null value: (leave blank) return Null value: (leave blank)

    An empty row is displayed when the user comes first to the screen. If they do NOT select the drop-down list, the value is left empty (null).

    If anyone has a better way, I will definitely experiment with it.

    Don.

  • XMLDOM. Item returns a null value

    Hi, I have a little problem with xmldom.item treatment.

    For some reason, this statement returns me null and I don't know the reason why, here is a sample of what I'm doing:

    Select MENSAGEMXML in the R_BD_SS_XML_SP lobExistente where idSP = P_idSP;
    parserXML: = xmlparser.newparser;
    XMLParser.parseclob (parserXML, lobExistente);
    documentoExistente: = xmlparser.getdocument (parserXML);
    XMLParser.freeparser (parserXML);

    parserXML: = xmlparser.newparser;
    XMLParser.parseclob (parserXML, P_documento);
    documentoNovo: = xmlparser.getdocument (parserXML);
    XMLParser.freeparser (parserXML);

    listaNosAAdicionar: = xmldom.getElementsByTagName(documentoNovo,'R_Acti_API_SP');

    listaRootNode: = xmldom.getElementsByTagName(documentoExistente,'ListagemAvarias');


    rootNode: = xmldom.item (listaRootNode, 0);
    Size: = xmldom. GETLENGTH (listaNosAAdicionar);
    dbms_output.put_line (' we have ['| size |'] our add para.');


    Contador in 0.tamanho - 1 loop
    dbms_output.put_line (' #' |) Contador);
    n: = xmldom.item (listaNosAAdicionar, size);
    Xmldom.isnull (n) = FALSE then if - <-this allways failure condition why is - what happens if contador reiterated 7 times?
    dbms_output.put_line (' node: ' | xmldom.getNodeName (n) |'. ');
    outroN: = XMLDOM.importnode (n, documentoNovo, true);
    on the other
    dbms_output.put_line ('node does not exist');
    end if;
    end loop;

    OK, if the stetement

    Size: = xmldom. GETLENGTH (listaNosAAdicionar);

    the value 7 which meens that listaNosAAdicionar made of nodes inside why

    n: = xmldom.item (listaNosAAdicionar, size);

    allways return null?

    I use Oracle 9i.

    Thank you
    Best regards
    João

    Published by: João Lopes on July 6, 2009 09:29

    Shouldn't this line

    n: = xmldom.item (listaNosAAdicionar, size);

    be

    n: = xmldom.item (listaNosAAdicionar, contador);

    While you're picking up each element in the list as you go through the loop?

  • GetCurrentRow returns the null value while trying to values defined in table advanced VO

    Hi all

    I'm trying to set default values to a bean advanced table according to the selection of LOV in another region. Here is the code and getCurrentRow returns the value null and null pointer exception is throwed. Please let me know where Iam going bad.

       if (pageContext. ) isLovEvent ())

    LovInputSourceId = string pageContext. getLovInputSourceId ();

       if ("poNumber". ) is equal to ()lovInputSourceId))

    pageContext . putDialogMessage (new OAException()"inside Onclick"));

    OAViewObject VO = (OAViewObject) am . findViewObject ()"L3APNonprojbasedpoVO1");

    VO1 OAViewObject = (OAViewObject) am . findViewObject ()"L3APCodingInfoEOVO1");

      VO . setWhereClause (null);

      VO . setWhereClauseParams (null);

      VO . executeQuery ();

      VO1 . setWhereClause (null);

      VO1 . setWhereClauseParams (null);

      VO1 . setWhereClause ("1=2");

      VO1 . executeQuery ();

       if (null! = VO )

       Row ReqRow = (Row) VO.first();  

       if (null ! = ReqRow )

       int idx = VO . getRowCount ();

       for (int xx = 0; xx < idx ; xx ++)

    String Description = (String)VO. getCurrentRow (). getAttribute ()"ItemDescription");

       Number Amount = (Number)VO. getCurrentRow (). getAttribute ("Amount");

       String Company = (String)VO. getCurrentRow (). getAttribute ("Company");

    String ProfitCenter = (String)VO. getCurrentRow (). getAttribute ()'ProfitCenter');

       String Dept = (String)VO. getCurrentRow (). getAttribute ("Dept");

       String Lob = (String)VO. getCurrentRow (). getAttribute ("Lob");

       String Account = (String)VO. getCurrentRow (). getAttribute ("Account");

    pageContext . putDialogMessage (new OAException()"inside loops'));

       if (null! = VO1 )

      { am. invokeMethod ("createRow");

    VO1 . getCurrentRow (). setAttribute ()'Description',Description);

      VO1 . getCurrentRow (). setAttribute ("Amount",Amount);

      VO1 . getCurrentRow (). setAttribute ("Company",Company);

      } ReqRow = (Row)VO.next(); }

       else {}

    }

    }

    Here is the method in AM.

    Public Sub createRow()
    {

    OAViewObject vo = (OAViewObject) getL3APCodingProjectEOVO1 ();

    vo.clearCache ();

    If (!) VO.isPreparedForExecution ())
    {
    System.out.println ("project VO executed");
    vo.setWhereClause (null);
    vo.setWhereClauseParams (null);
    vo.setWhereClause ("1 = 2");
    vo.executeQuery ();
    }
    Line = vo.createRow ();
    vo.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    I modified your code a bit. This code does not require a method of AM.

    If the problem still not solved.

    If you want you can try this and let us know what happens.

    if (pageContext.isLovEvent())
    {
       String lovInputSourceId = pageContext.getLovInputSourceId();
       if("poNumber".equals(lovInputSourceId))
      {
      pageContext.putDialogMessage(new OAException("Inside Onclick"));
      OAViewObject VO=(OAViewObject)am.findViewObject("L3APNonprojbasedpoVO1");
      OAViewObject VO1=(OAViewObject)am.findViewObject("L3APCodingInfoEOVO1");
      VO.setWhereClause(null);
      VO.setWhereClauseParams(null);
      VO.executeQuery();
    
      VO1.setWhereClause(null);
      VO1.setWhereClauseParams(null);
      VO1.setWhereClause("1=2");
      VO1.executeQuery();
    
      if (VO != null)
      {
      for( Row ReqRow = (Row) VO.first();  ReqRow != null; ReqRow = (Row) VO.next())
      {
      String Description = (String)ReqRow.getAttribute("ItemDescription");
      Number Amount = (Number)ReqRow.getAttribute("Amount");
      String Company = (String)ReqRow.getAttribute("Company");
      String ProfitCenter = (String)ReqRow.getAttribute("ProfitCenter");
      String Dept = (String)ReqRow.getAttribute("Dept");
      String Lob = (String)ReqRow.getAttribute("Lob");
      String Account = (String)ReqRow.getAttribute("Account");
      pageContext.putDialogMessage(new OAException("Inside for Loop"));
    
      if (VO1 != null)
      {
      Row newRow  = VO1.createRow();
      newRow.setAttribute("Description",Description);
      newRow.setAttribute("Amount",Amount);
      newRow.setAttribute("Company",Company);
      VO1.insertRow(newRow);
      }
      }
      }
      }
    }
    

    See you soon

    AJ

  • ApplicationDescriptor returns a null value

    Hello

    When I'm debugging on a real device, it seems that ApplicationDescriptor () .getApplicationDescriptor () returns null.

    When I debug it in the Simulator, he returns the expected result. I suspect it has to do with the way the application is loaded to the device by eclipse.

    Everyone knows simular behavior?

    Weird, after restarting my device this problem occurs no long...

  • LocationProvider.getInstance returns a null value for the positioning of the cell PHONE location

    Hi guys.

    I'm having a problem trying to get a network of cells (MS basis) path to be able to work on my BlackBerry Bold 9000.

    Both assisted and Standalone GPS work (outside of course), but I'll try to find a way to position themselves inside the building.

    Here's what I'm going to put criteria:

    Criteria criteria = new Criteria();
    
    criteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
    criteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
    criteria.setCostAllowed(true);
    criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
    
    LocationProvider.getInstance(criteria); //<-- Returns null on real device
    

    When I run on a real device it gives me always null, when I do the same thing on a simulator, so this works:

    What I am doing wrong? I really need to find a way to make it work inside.

    Thanks for any input.

    Hey, Dominator,.

    I'll be real simple with you and try to make you save a LOT of time.

    Basically, cell tower positioning doesn't work out of the box on the Blackberry platform (except in a few configurations of rare device / carrier). So you can essentially throw the code you have above. If you need a place inside detection, you will need access to a database of celltowerId. These databases contain information from the Tower (Rad_error_nocontent, mnc, mcc, Lake) and its approximate location (lat/lng coordinates). This will give your application a rough estimate (less than a mile or two) from the current location of the device.

    Open source and professional databases are available. This is an open source database that runs on GSM networks (of course, he didn't 100% coverage of all the pylons). The biggest downfall is that it does not support CDMA (Sprint/Verizon) networks.

    http://openCellId.org

    You will find that most of the people on this forum are not very useful when it comes to cellTower information, positioning so you will need to research, research, research.

    Good luck

  • Load the process returns a null value but on refresh the values of loads? !!

    Hi all

    With the help of apex 4.1.1 oc4j 11g Linux

    I'm building a feature that allows you to register by e-mail.

    Page 1

    The user enters a name email address ,& the last statement name Insert is executed

    Select count (*) in c_email - if 0 then the person does not exist and is permitted

    of sor_notification_person

    where sor_notification_person. EMAIL_ADDRESS = P_S_EMAIL_ADDRESS;

    If c_email = 0 then

    -Package.procedure send email and fact the insert

    SOR_NOTIFICATIONS_PKG. signup_person (P_S_EMAIL_ADDRESS = > P_S_EMAIL_ADDRESS,)

    P_S_FIRST_NAME = > P_S_FIRST_NAME,

    P_S_LAST_NAME = > P_S_LAST_NAME,

    P_S_CONFIRMED_EMAIL = > P_S_CONFIRMED_EMAIL,

    P_S_SESSION = > P_S_SESSION,

    P_S_APP_ID = > P_S_APP_ID,

    P_B_SUCCESS = > P_B_SUCCESS);

    Page 2

    Clicking or copying pasting the URL received in e-mail. I have on the loading process that verifies the checksum value in DB and fills in the data.

    declare

    number of CT ;

    P31_checksum(Varchar2) 30).

    E-mail varchar2 (90);

    What varchar2 (40);

    L_Name varchar2 (40);

    P31_TEST(Varchar2) 40).

    Start

    : P31_TEST := null;

    SELECT count ()*) in ct

    OF SOR_NOTIFICATION_PERSON

    SOR_NOTIFICATION_PERSON. checksum =:C;

    DBMS_OUTPUT. put_line ()ct);

    if CT > 0

    then

    SELECT SOR_NOTIFICATION_PERSON. email_address SOR_NOTIFICATION_PERSON. name, SOR_NOTIFICATION_PERSON. last_name in l_name what Email

    OF SOR_NOTIFICATION_PERSON

    SOR_NOTIFICATION_PERSON. checksum =:C;

    : P31_TEST := 'Y ';

    : P31_EMAIL_ADDRESS:= Email;

    : P31_FIRST_NAME := what;

    : P31_LAST_NAME:= l_name;

    else : P31_TEST := 'n';

    (- dbms_output. put_line () P31_TEST);

    end if;

    end ;

    Problem when I view the item hidden, I can see the value of checksum, but the P31_test is always null in load. When I hit refresh page P31_test valid and displays the value.

    The two elements are the value only when the value in session state is null.

    What could be the reason because it does not load even the process is defined as load before region / once per page visit...

    Thanks for your help.

    Okay - not sure then. On a new blank page I can have processes assign a value to the session state from the element and the element will have this value when the page is rendered (at least with this type of source). Work of dynamic actions. As I expect. I don't know what happens next 'unfair '.

    I'll only come back tomorrow, but here are a few tips:

    • create a workspace on apex.oracle.com and upload your page there. Share of the developer credentials and the name of workspace with us. In this way may inspect and do not need to do the back and forth until we reached something special we both lost from view.
    • When the page is loaded and you hit the session in the developer toolbar, what is the State of P31_TEST? Is it worth?
    • try to run the page in debug and see if you can spot something happens with the session state from P31_TEST - maybe you'll come across something
  • Return of NULL values in the table of results

    OK the guru! Your genius has helped me before (see this post... ( Help to return the query results table ) but now I would return null results 0 to the number. Below is the structure of the table (again) and my desired result (new question):

    The structure of the table is:
    Year of sport
    Baseball 10-11
    Football 10-11
    Football 11-12
    Football 11-12
    Football 11-12
    Baseball 11-12

    The result should be sports in each year and should be grouped by year but shown as columns so:
    (GROUP OF the year)
    1 hockey, ice 0, 1, Soccer baseball
    2, 1, Football Soccer 1, Baseball

    The new portion of this question is the "0, Soccer.

    Thanks for any help!

    Hello

    For counties of 0, you must join of a table that has one row per sport.
    If you do in fact have such a table, you can build a game on the fly that will work just as well of results:

    WITH     all_sports     AS
    (
         SELECT DISTINCT  sport
         FROM              t
    )
    ,     sport_year_totals     AS
    (
         SELECT       s.sport
         ,       t.year
         ,       COUNT (t.sport)     AS cnt
         FROM             all_sports  s
         LEFT OUTER JOIN                t  PARTITION BY (year)
                                          ON  s.sport  = t.sport
         GROUP BY  s.sport
         ,            t.year
    )
    SELECT   year
    ,       LISTAGG ( cnt || ', ' || sport
                , ' '
               ) WITHIN GROUP (ORDER BY  sport)     AS sports
    FROM      sport_year_totals
    GROUP BY  year
    ORDER BY  year
    ;
    

    However, you may find it useful to have a table with one line per sport really. In this case, you wouldn't need the first auxiliary request. Simply use your name of the table where I used all_sports.

    I copied the example of data that MichaelS posted in your previous thread {message identifier: = 10388879} below.
    You should always post sample data yourself when you ask a question, especially if everything you have to do is copy and paste from another thread.

    CREATE TABLE t as (
     select 'Baseball' sport, '10-11' year from dual union all
     select 'Football', '10-11' from dual union all
     select 'Football', '11-12' from dual union all
     select 'Football', '11-12' from dual union all
     select 'Soccer',   '11-12' from dual union all
     select 'Baseball', '11-12' from dual
    );
    
  • Count (1) returns the null value in the Group of

    Hi the gems... Good afternoon...

    I read that the COUNT() function always returns 0 (zero) if there is no corresponding row in the table.

    The following code returns 0 as expected:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    But when I used the GROUP BY clause in the query, then he returned to nothing:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    group by client_id,book_id,book_sub_id,amount
    Why this is happening... Please suggest...

    When you use just rely on its own (and you must use count (*) not count (1) as the optimizer based on CSSTidy will re - write internally to count (*) anyway)... then you say you want a count of all rows.

    When you introduce the group by clause you say thay want returned a number of records within specific groups... but if there are no groups, he cannot give you a line for any group with its county equivalent, because there are no lines for the groups. With the grouping, you have must have at least 1 row per group to get an account for her.

Maybe you are looking for

  • Process name: Untortuous; User: Rotifera

    Hello Im getting a really weird process in activity monitor. Process name: Untortuous User: Rotifera Any ideas? Cannot find anything through research. Thanks for your help! -André

  • programs to take a long time to open

    My programs are open to slow down, I just cleaned the disc?

  • Cannot detect wireless networks or start the autoconfiguration Wlan service

    I locked my phone on thanksgiving day and came back later that night and connected... and my Wifi wasn't working. It shows all the available networks. -I am still able to connect to the internet via the Ethernet cable-My wifi switch is in the on posi

  • Area problem Lenovo A7000 Secure

    I'm having a problem with secure on my a7000.well area, I disabled my boss lock, but whenever I try to open the secure area his asking me a model (but my boss is currently disabled) that's why I can't open my safe zone, I love this feature! Previousl

  • CD drive keeps opening and closing by itself

    My CD tray keeps opening and closing by itself. In addition, I can't open it in the button, I need to go from my and eject it. I checked the bios and everythings fine; even updated. I removed the front panel I scanned with MalwareBytes malware; A lar