Group - data of aggregation of matter-sample included

The data below shows that this particular course A16 at a higher level (value = 01) is equal to 60% of the coursework exams and 40%. At this level the whole = 01 must always be equal to 100%.
The complication is where a piece of courses and/or examination consists of other parts. As we can see in the data below, the 40% coursework consists of an evaluation document (58%) and a practical part (42%). You can see the association between level 01, 02, 03 level through the subset relationship together.
If record with subset 2 has two elements associated with him.
with t as (               
 select 'A16' course, '01' sett, '03' Subset, 'E' Code, 'Exam'         Descr, 40 "weight%"  from dual UNION
  select 'A16' course, '01' sett, '02' Subset, 'C' Code, 'Courswork Total' Descr, 60 "weight%"  from dual UNION
   select 'A16' course, '02' sett, ''   Subset, 'C' Code, '1. Assignement'      Descr, 58 "weight%"  from dual UNION
    select 'A16' course, '02' sett, ''   Subset, 'P' Code, '2. Practical'         Descr, 42 "weight%"  from dual UNION
     select 'A16' course, '03' sett, ''   Subset, 'E' Code, '1. Exam'             Descr, 50 "weight%"  from dual UNION
      select 'A16' course, '03' sett, ''   Subset, 'W' Code, '2. Written Piece'     Descr, 50 "weight%"  from dual)   
select * from t;
That's what I got so far, but this don't look only at the top level which as you can see it is not good because it's not knoe on the practical elements.
SELECT course
           ,sett
           ,NVL(SUM(CASE WHEN CODE IN ('C','F','J','L','R','Y')          THEN "weight%" end),0) AS Coursework
           ,NVL(SUM(CASE WHEN CODE IN ('E','Q')                          THEN "weight%" end),0) AS Written
           ,NVL(SUM(CASE WHEN CODE IN ('A','D','O','P','S','T','V','W')  THEN "weight%" end),0) AS Practical             
     FROM t 
     where sett = 01 
   GROUP BY course, sett
   ORDER BY sett;
What I'm trying to calculated is total% Exam, written %, practical % which, once equal to 100% summary
EXPECTED OUTCOME for all of the provided data are below:
 select 'A16' course, 20 Exam,  45.2 Practical, 34.8 Coursework, 20+45.2+34.8 Total from dual;
The t.Code relates to whether the piece is coursework, review or practice. As seen below. So how do you know what the topics relate to what part.
I need to basically sift through each level and calculate its percent of the 01 level and group them in review, practice and Courswork.
           CODE IN ('C','F','J','L','R','Y')          Coursework
           CODE IN ('E','Q')                          Written
           CODE IN ('A','D','O','P','S','T','V','W')  Practical  
Any ideas would be very appreciated.

Hello

Aerts: the only issue I have with courses such as below. This course has only 01 so it can't roll up, unless we use the > 00 record. But if I change the code to start with 00, it will work for this one. But not data from OP, I sent (it is raining down this > post)

I have no why this will not work if we start with 01. I agree that the latest data from the example given by you have master level 00, but as I see it, it is not associated with a CODE (like E, c, P, etc.) and if this level cannot be put into any of the three categories - Coursework, written or practical. So, I found the output of the query to be as expected, even in the case when the main level is 00, and we start with 01.

Also, I think in your data, there will be other scenarios such as different courses, a point on which I was not examined during the creation of the query. If this is the case, then a condition on COURSE also through the connect by clause of the query. example of the course = course PREREQUISITE.

Please see if it works for your data.

Tags: Database

Similar Questions

  • My wife and I have laptops and we want to combine the data both on a Mac. Including two Itunes accounts. This is possible by using the migration on each PC asst?

    In what concerns the transfer of data from a PC to a MAC, my wife and I have laptops and we want to combine the data both on a Mac. Including two Itunes accounts. This is possible by using the migration on each PC asst?

    You can bind the whole apple ID using family sharing. If you have trouble doing this, you can go to the apple store, and they would be happy to help you.

  • Ntuser.dat.LOG files are important to include in a backup to transfer files to a new computer?

    Ntuser.dat.LOG files are important to include in a backup that is used to transfer files to a new computer? When you try to backup or copy files I get the message that these files (there are 4 of them) cannot be saved or copied because they have already opened and used on the computer. A single file is 256 KB and another has 0 KB. Can not see the other two

    Hi MAnnetteFox,

    Thanks for posting the query on Microsoft Community.

    You do not need to take backup of these files and they are normal files that will be generated.

    In the future, if you have problems with Windows, get back to us. We will be happy to help you.

  • Group data model does not

    Hello

    I am developing a revision update for my app BB10 stunts and I use a data model to pull in the elements of the application do not forget; the only problem I encounter is that I can't get the data model of the group work so that I can arrange the items by the first character instead the data are currently presented as Z - A, even if I could get it to display in A - Z would be enough, but what I am looking to achieve is to get the model to display in A - Z and then sort by the first character, while a header for each letter is displayed.

    Here is the list (QML) and my data model (C++)

    ListView {
                                dataModel: _noteBook.model
    
                                listItemComponents: ListItemComponent {
                                    type: "item"
    
                                    StandardListItem {
                                        title: ListItemData.title
                                        description: ListItemData.status
                                    }
                                }
    
                                onTriggered: {
                                    clearSelection()
                                    select(indexPath)
    
                                    _noteBook.setCurrentNote(indexPath)
    
                                    _noteBook.viewNote();
                                    navigationPane.push(noteViewer.createObject())
                                }
                            }
    

    NoteBook.cpp

    #include "NoteBook.hpp"
    
    #include "NoteEditor.hpp"
    #include "NoteViewer.hpp"
    
    #include 
    
    using namespace bb::cascades;
    using namespace bb::pim::notebook;
    
    //! [0]
    NoteBook::NoteBook(QObject *parent)
        : QObject(parent)
        , m_notebookService(new NotebookService(this))
        , m_model(new GroupDataModel(this))
        , m_noteViewer(new NoteViewer(m_notebookService, this))
        , m_noteEditor(new NoteEditor(m_notebookService, this))
    {
        // First Character grouping in data model
        m_model->setGrouping(ItemGrouping::FirstChar);
    
        // Ensure to invoke the filterNotes() method whenever a note has been added, changed or removed
        bool ok = connect(m_notebookService, SIGNAL(notebookEntriesAdded(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
        ok = connect(m_notebookService, SIGNAL(notebookEntriesUpdated(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
        ok = connect(m_notebookService, SIGNAL(notebookEntriesDeleted(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
    
        // Fill the data model with notes initially
        filterNotes();
    }
    //! [0]
    
    //! [1]
    void NoteBook::setCurrentNote(const QVariantList &indexPath)
    {
        // Extract the ID of the selected note from the model
        if (indexPath.isEmpty()) {
            m_currentNoteId = NotebookEntryId();
        } else {
            const QVariantMap entry = m_model->data(indexPath).toMap();
            m_currentNoteId = entry.value("noteId").value();
        }
    }
    //! [1]
    
    //! [2]
    void NoteBook::createNote()
    {
        // Prepare the note editor for creating a new note
        m_noteEditor->reset();
        m_noteEditor->setMode(NoteEditor::CreateMode);
    }
    //! [2]
    
    //! [3]
    void NoteBook::editNote()
    {
        // Prepare the note editor for editing the current note
        m_noteEditor->loadNote(m_currentNoteId);
        m_noteEditor->setMode(NoteEditor::EditMode);
    }
    //! [3]
    
    //! [4]
    void NoteBook::viewNote()
    {
        // Prepare the note viewer for displaying the current note
        m_noteViewer->setNoteId(m_currentNoteId);
    }
    //! [4]
    
    //! [5]
    void NoteBook::deleteNote()
    {
        m_notebookService->deleteNotebookEntry(m_currentNoteId);
    }
    //! [5]
    
    bb::cascades::GroupDataModel* NoteBook::model() const
    {
        return m_model;
    }
    
    QString NoteBook::filter() const
    {
        return m_filter;
    }
    
    //! [6]
    void NoteBook::setFilter(const QString &filter)
    {
        if (m_filter == filter)
            return;
    
        m_filter = filter;
        emit filterChanged();
    
        // Update the model now that the filter criterion has changed
        filterNotes();
    }
    //! [6]
    
    NoteViewer* NoteBook::noteViewer() const
    {
        return m_noteViewer;
    }
    
    NoteEditor* NoteBook::noteEditor() const
    {
        return m_noteEditor;
    }
    
    //! [7]
    void NoteBook::filterNotes()
    {
        NotebookEntryFilter filter;
    
        // Use the entered filter string as search string
        filter.setSearchString(m_filter);
    
        const QList notes = m_notebookService->notebookEntries(filter);
    
        // Clear the old note information from the model
        m_model->clear();
    
        // Iterate over the list of notes
        foreach (const NotebookEntry ¬e, notes) {
            // Copy the data into a model entry
            QVariantMap entry;
            entry["noteId"] = QVariant::fromValue(note.id());
            entry["title"] = note.title();
            entry["status"] = NoteViewer::statusToString(note.status());
    
            // Add the entry to the model
            m_model->insert(entry);
        }
    }
    //! [7]
    

    NoteBook.hpp

    /* Copyright (c) 2012, 2013  BlackBerry Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #ifndef NOTEBOOK_HPP
    #define NOTEBOOK_HPP
    
    #include 
    #include 
    #include 
    
    #include 
    
    class NoteEditor;
    class NoteViewer;
    
    /**
     * @short The controller class that makes access to notes available to the UI.
     */
    //! [0]
    class NoteBook : public QObject
    {
        Q_OBJECT
    
        // The model that provides the filtered list of notes
        Q_PROPERTY(bb::cascades::GroupDataModel *model READ model CONSTANT);
    
        // The pattern to filter the list of notes
        Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged);
    
        // The viewer object for the current note
        Q_PROPERTY(NoteViewer* noteViewer READ noteViewer CONSTANT);
    
        // The editor object for the current note
        Q_PROPERTY(NoteEditor* noteEditor READ noteEditor CONSTANT);
    
    public:
        NoteBook(QObject *parent = 0);
    
    public Q_SLOTS:
        /**
         * Marks the note with the given @p indexPath as current.
         */
        void setCurrentNote(const QVariantList &indexPath);
    
        /**
         * Prepares the note editor to create a new note.
         */
        void createNote();
    
        /**
         * Prepares the note editor to edit the current note.
         */
        void editNote();
    
        /**
         * Prepares the note viewer to display the current note.
         */
        void viewNote();
    
        /**
         * Deletes the current note.
         */
        void deleteNote();
    
    Q_SIGNALS:
        // The change notification signal for the property
        void filterChanged();
    
    private Q_SLOTS:
        // Filters the notes in the model according to the filter property
        void filterNotes();
    
    private:
        // The accessor methods of the properties
        bb::cascades::GroupDataModel* model() const;
        QString filter() const;
        void setFilter(const QString &filter);
        NoteViewer* noteViewer() const;
        NoteEditor* noteEditor() const;
    
        // The central object to access the notebook service
        bb::pim::notebook::NotebookService* m_notebookService;
    
        // The property values
        bb::cascades::GroupDataModel* m_model;
        QString m_filter;
    
        // The controller object for viewing a note
        NoteViewer* m_noteViewer;
    
        // The controller object for editing a note
        NoteEditor* m_noteEditor;
    
        // The ID of the current note
        bb::pim::notebook::NotebookEntryId m_currentNoteId;
    };
    //! [0]
    
    #endif
    

    If something you can help me with then this would be very useful - if you need to see more of code then let me know too!

    Thanks in advance

    Try to add in constructor (after a call to setGrouping):

    QStringList keys;
    key<>
    m_model-> setSortingKeys (keys);

    May require alterations, I have not tried this compilation.

  • How to change the data quotes.db of the sample applications

    Hai guys,

    I have a question, I want to learn more about the use of the database. I read the documentation and I still don't understand. I try to learn with the sample apps (quotes) and I don't know how to change data on the quotes.db database. I wish that I understand:

    1. change the data of databases quotes.db

    2. work with databases (sqlite)

    Please help me, I have a lot of apps idea when I understand working with database. Thanks before

    I'm sorry for my bad English

    Databases can be difficult to understand, it is a three month course in my college days.

    This is not something you can rush and the hurt means that your users data are at risk in order to take the time to go through one of the tutorials online and know well.

    It's my favorite online resources (was used for many years) and it includes a section on SQL close enough of SQLite...

    http://www.w3schools.com/

    Or you can start with this...

    http://www.tutorialspoint.com/SQLite/index.htm

    If English is not your native language, I'm sure that a google search will find one that is in your own.

  • Query to group dates by days of week

    Hello

    I have a table that contains the following format:

    Create table testtable(dates date, day_identifier number);
    
    

    The data in the day_identifier column contains day dates of the corresponding columns of equivalent week, i.e.

    to_char(dates, 'd')
    
    

    The table contains a suite of sample data:

    Dates Day_identifier
    October 1, 20133
    October 2, 20134
    4 October 20136
    October 6, 20131
    8 October 20133
    October 9, 20134
    October 11, 20136
    October 18, 20136
    October 21, 20132
    October 23, 20134

    I am looking for a query that will consolidate the data above, based on the data in the column day_identifier in the following format:

    October 1, 2013 1346 11 October 2013

    18 October 2013 October 23, 2013 246

    The above so well developed data for example

    all dates between October 1, 2013 and October 11, 2013 and the day of the week value in 1,3,4,6

    and

    all dates between October 18, 2013 and October 23, 2013 and having the day of the week in 2,4,6 value

    will give me the result set from the table above.

    Please help me to solve the issue.

    Thank you.

    Like this? (The results of the previous example has not changed)

    with

    flights only

    (select 1 flight_no, to_date('01-10-2013','dd-mm-yyyy') flight_date, 3 day_identifier union double all the)

    Select 1, to_date (March 10, 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (August 10, 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (October 10, 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (October 15, 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (17 October 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (22 October 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (24 October 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (29 October 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (31 October 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (11 may 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (11 July 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    -select 1, to_date (December 11, 2013 ',' dd-mm-yyyy '), 3 all the double union

    Select 1, to_date (14 November 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    -select 1, to_date (November 19, 2013 ',' dd-mm-yyyy '), 3 all the double union

    Select 1, to_date (November 21, 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    -select 1, to_date (November 26, 2013 ',' dd-mm-yyyy '), 3 all the double union

    Select 1, to_date (28 November 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (March 12, 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (May 12, 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (12 October 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (12 December 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (17 December 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (19 December 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (24 December 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (December 26, 2013 ', 'dd-mm-yyyy'), 5 Union double all the

    Select 1, to_date (31 December 2013 ', 'dd-mm-yyyy'), 3 union double all the

    Select 1, to_date (February 1, 2014 "," dd-mm-yyyy '), 5 Union double all the

    Select 1, to_date (July 1, 2014 "," dd-mm-yyyy '), 3 Union double all the

    Select 1, to_date (September 1, 2014 "," dd-mm-yyyy '), 5 Union double all the

    Select 1, to_date (January 14, 2014 "," dd-mm-yyyy '), 3 Union double all the

    Select 1, to_date (January 16, 2014 "," dd-mm-yyyy '), 5 Union double all the

    Select 1, to_date (January 21, 2014 "," dd-mm-yyyy '), 3 Union double all the

    Select 1, to_date (January 23, 2014 "," dd-mm-yyyy '), 5 Union double all the

    Select 1, to_date (28 January 2014 "," dd-mm-yyyy '), 3 Union double all the

    Select 1, to_date (January 30, 2014 "," dd-mm-yyyy'), 5 double

    ),

    all_identifiers as / * collection presents all the day_identifier * /.

    (select flight_no,

    min (from_date) from_date,

    Max (till_date) till_date,

    listagg(day_identifier,'') within the Group (order by day_identifier) day_identifiers

    from (select flight_no,

    min (flight_date) from_date,

    Max (flight_date) till_date,

    day_identifier

    flights

    Flight_no group, day_identifier

    )

    Flight_no group

    ),

    generated_rows as / * generate all the resulting flight_date of day_identifier collected * /.

    (select flight_no,

    flight_date,

    day_identifier

    from (select flight_no,

    level - 1 flight_date, + from_date

    case when instr (day_identifiers, to_char (tier - 1, + from_date '))! = 0

    then to_number (to_char (tier - 1, + from_date '))

    end day_identifier

    of all_identifiers

    connect by level<= till_date="" -="" from_date="" +="">

    and prior flight_no = flight_no

    and prior sys_guid() is not null

    )

    where day_identifier is not null

    ),

    matched_rows as / * flights against generated lines correspondence reveals partially cancelled flights * /.

    (select g.flight_no,

    g.flight_date generated_date,

    g.day_identifier,

    f.day_identifier flights_day_identifier / * null if flight cancelled * /.

    of generated_rows g

    left outer join

    F flights

    on g.flight_no = f.flight_no

    and g.flight_date = f.flight_date

    and g.day_identifier = f.day_identifier

    ),

    grouped_rows as / * grouping of lines before the final response * /.

    (select flight_no,

    generated_date,

    day_identifier,

    flights_day_identifier,

    -case when count (day_identifier) on (partition flight_no, day_identifier

    order of generated_date

    lines between unbounded preceding and following unlimited

    ) =

    Count (flights_day_identifier) more (partition flight_no, day_identifier

    order of generated_date

    lines between unbounded preceding and following unlimited

    )

    Press 'Finish' / * count_of_all = count_of_not_null * /.

    otherwise "incomplete".

    end day_identifier_type

    ROW_NUMBER() (flight_no, day_identifier, generated_date order)-

    ROW_NUMBER() over grp (partition flight_no, day_identifier, flights_day_identifier order of generated_date) / * tabibitosan * /.

    of matched_rows

    )

    Select flight_no,

    TO_CHAR (min (from_date), 'dd-mon-yyyy') from_date,.

    TO_CHAR (Max (till_date), 'dd-mon-yyyy') till_date,.

    listagg(day_identifier,'') within the Group (order by day_identifier) day_identifiers

    from (select flight_no,

    min (generated_date) from_date,

    Max (generated_date) till_date,

    day_identifier

    of grouped_rows

    where day_identifier_type = 'Finish '.

    Flight_no group, day_identifier

    )

    Flight_no group

    Union of all the

    Select distinct

    flight_no,

    TO_CHAR (FIRST_VALUE (generated_date) more (partition flight_no, grp)

    order of generated_date

    ),

    "Mon-dd-yyyy".

    ) from_date,.

    TO_CHAR (FIRST_VALUE (generated_date) more (partition flight_no, grp)

    generated_date desc order

    ),

    "Mon-dd-yyyy".

    ) till_date,.

    TO_CHAR (day_identifier) day_identifiers

    of grouped_rows

    where day_identifier_type = "incomplete".

    and flights_day_identifier is not null

    order of flight_no, day_identifiers, from_date

    FLIGHT_NO FROM_DATE TILL_DATE DAY_IDENTIFIERS
    1 October 1, 2013 November 5, 2013 3
    1 December 3, 2013 January 28, 2014 3
    1 October 3, 2013 January 30, 2014 5

    Concerning

    Etbin

  • Reset the page number for the new RTF (not group data) section

    I am working on a set of maritime documents - Pick and Pack Slip briefs. RTF model has 2 sections for the same group of data (delivery). The waybill is a customer oriented document and sheet of choice is used in the warehouse to fulfill the order. The intention is to print the slip to pick and pack slip together, while the selector may include the packing slip in the package that is shipped. I want that each air waybill to start its page number to 1, but it always starts at the current page number - i.e. If the pick slip is 2 pages long, the leaf pack starts at 3. I tried to use the page number of the RTF/MS Word formatting, but it doesn't seem to work? Is there a way to reset the page number for a new RTF section?

    Can I store the current page number in a variable and use a formula to reset the page number for the waybill?

    Please note: this is not a <? for-each@section:tag? > question.

    Thank you
    Sunder

    That's the one. Let me know if you encounter a question on this

  • acquisition of data high-speed and simultaneous sampling

    I'm quite familiar with the coding for NOR-DAQ boards in Labview. What worries me with labview, is that each tick is about milliseconds. I intend to retrieve the data simultaneously from 32 channels at 2 MS/s/chan using SMU 6368 s. Wouldn't not possible to enter data, on average 20 to 50 samples to get a unique value, perform simple algebraic manipulations on it and send it to the PC / software to approximately tens of kHz? We already have labview code to perform similar tasks, but it is quite slow and limiting the rate of experience. I said that Simulink is slightly better than Labview in this regard, but suffers a poor user interface and that if something C/C++ offers the ability to perform at high speeds with the same cards OR data acquisition. Could someone advise me please on this issue?

    You can use your PC! You can use a PCI/PCI-e card as the interface to your computer and it should work perfectly. Take a look at these pages (http://sine.ni.com/nips/cds/view/p/lang/en/nid/10389) for more information.

  • How to save data quickly to the high sampling frequency

    Hi all

    I use a structure of producers and customers to measure and record the data. The sampling rate must be as high as 10 kHz. Given that so much data, it takes a long time before the data is saved. At first, I saved the data in an excel sheet. Then I tried to save it in binary, but it still takes a while to complete save. How can I make the time savings a short circuit?

    Thank you

    The best

    First we will make some corrections to your DAQmx code.  Since you are using continuous sampling, do NOT connect the samples per channel.  Which is actually limiting your buffer.  And there is really no need to define your buffer size either.  It is default to very big, so this isn't a problem as long as you read your data quite often.

    Now your data connection... You simply create a very wide range while acquiring data.  Then, you save the data.  It's actually not through the advantage of using the producer and the consumer.  You should save your data in the loop of the consumer.  It will be elinate need a lot of memory and you save the data to the file while you are buying.

    But, in this case, I say that the producer and the consumer is not even necessary.  Use the DAQmx Configure registration VI.  With this VI, you can tell DAQmx to disseminate all data directly in a PDM file.  You don't have to do anything.  It is by far the best way to save on your DAQ data.

  • A group of link aggregated traffic mirroring

    Hello. I would like to mirror traffic entry and exit of a group of aggregation of link on my Dell PowerConnect 7024. By looking at the http under switching configuration page > Ports > traffic Mirroring > Port Mirroring > add, it doesn't seem to be an option for traffic a single port and not a link aggregated mirror group.

    Can someone help me to check if this is doable? If so, how?

    Your results are correct. Associate connection ports are not able to participate in the port mirroring.

  • Display the ListView data not grouped data

    How to read data from an SQLite table and display it on a ListView without the GroupDataModel. I don't want my list to be grouped.

    Have you looked at these articles in the knowledge base?

    http://supportforums.BlackBerry.com/T5/Cascades-development-knowledge/ListItemComponent-types-when-U...

    http://supportforums.BlackBerry.com/T5/Cascades-development-knowledge/using-your-own-DataModel/Ta-p/...

    Martin

  • Grouping data via GroupDataModel and DataSource

    Hello

    I'm loading below via a data source, the data correctly loads the XML data structure and the data are displayed in the ListView.

    
      
      
        
          
            3
              4.28
              
                375802
                Civic
                
                  589
                  Honda
                
              
              
                375803
                Accord
                
                  590
                  Honda
                
              
              
                375804
                Camry
                
                  591
                  Toyota
                
              
            
        
      
    
    

    The GroupDataModel & DataSource is set as shown below...

        attachedObjects: [
    
            GroupDataModel
            {
                id: dataModel
    
                // This works and the header is displayed properly by rating
                //sortingKeys: ["rating"] 
    
                // Sorting does not work, and listview header is displayed @ top with empty data
                sortingKeys: ["manufacturer.name"]
                sortedAscending: true
                grouping: ItemGrouping.ByFullValue
            },
    
            DataSource
            {
                id: dataSource
    
                // Load the XML data from a remote data source
                source: "http://www.mydataservice.com/getdata.php"
                query: "/dataresponse/search/results/cars"
                type: DataSourceType.Xml
    
                onDataLoaded:
                {
                    // After the data is loaded, clear any existing items in the data
                    // model and populate it with the new data
                    dataModel.clear();
                    dataModel.insertList(data)
                }
            }
        ]
    

    The listview is defined per below...

    ListView
    {
       id: myListView
       // Associate the list view with the data model that's defined in the
       // attachedObjects list
       dataModel: dataModel
    
       // Sticky header
       layout: StackListLayout { headerMode: ListHeaderMode.Sticky }
    
       listItemComponents: [
    
         ListItemComponent
         {
            type: "item"
    
            // Use a standard list item to display the data in the data
            // model
            StandardListItem
            {
                imageSpaceReserved: false;
                title: ListItemData.car.model
                description: ListItemData.manufacturer.name  + " ID: " + ListItemData.manufacturer.id
            }
         }
       ]
    }
    

    So, in order to be able to group the data by the automaker, I thought that I could just specify the following sort key sortingKeys: ["manufacturer.name"] but it does not work.

    Any suggestions?

    Hi joelajean,

    According to the documentation on this link "In a GroupDataModel, there are only two levels of items". Looking at how your xml file is formatted, I can see that the manufacturer.name is a level deeper than the second level and this is probably why you can not retrieve the item. I suggest that you try to use a XmlDataModel instead of a GroupDataModel or analyze your file xml in two levels of items.

  • remove the Group date of

    Hello

    I created this application and I need the attribute date (StartDate) but I can't have this group by this attribute.

    Is there a way to not group by startdate?

    THK

    SELECT GSP_COMPLEX.NAME AS complex,
    GSP_COMPLEX.RECID AS RecId,
    GSP_BOOKING.STARTDATE AS BeginDate,
     COUNT(GSP_BOOKING.RECID) AS total
    FROM GSP_BOOKING, GSP_FACILITY, GSP_ROOM, GSP_COMPLEX, GSP_STAFF
    WHERE GSP_BOOKING.FACILITYID = GSP_FACILITY.RECID
    AND GSP_BOOKING.ROOMID = GSP_ROOM.RECID
     AND GSP_BOOKING.CUSTOMERID IN (SELECT recid FROM customer c WHERE (recid =:vCurrentRecID AND :search_type IN (0,1) ) OR (c.recid = (SELECT parentid FROM customer c WHERE recid=:vCurrentRecID ) 
     AND GSP_BOOKING.STAFFID = GSP_STAFF.RECID
     AND GSP_BOOKING.CPLXID  = GSP_COMPLEX.RECID
    GROUP BY GSP_COMPLEX.NAME,
    GSP_COMPLEX.RECID,
     GSP_BOOKING.STARTDATE
    ORDER BY complex ASC
    

    Thanks for your reply,

    The request was to return values to create a chart in jdeveloper and I thought using the date as a criterion.

    Instead, I used the date with the values by default, interval with-100 and + 100 years from today.

    Thank you

  • Why the focus is on data read only Alta UI app samples / videos but not on data entry / change app / video samples?

    Mr President.

    When I go on YouTube or Alta models of sample I only found applications out there or videos but very little on how to enter data or change data or video applications.

    I want to build beautiful form of data entry, but I found very little advice and examples.

    Me not very imaginative, so I need some samples to build this seizure data forms or data entry tables.

    All samples build in the shoes of Alta UI please.

    Concerning

    Alta UI has nothing to do with the CRUD.

    As a simple goolge Let me google that you will give you plenty of samples.

    Timo

  • Grouping data with the name of the derived field.

    Hello..

    I like condition, I want to group by table with 'Date' but provided XML there is no separate column of the 'Date'. I've derived a timestamp, StartTime column. So I used xdoxslt:left(StartTime,10) which gives me the date. But now I want to do grouping using this value. I did <? for each object: group;. /xdoxslt:Left(StartTime,10)? > <? sorting: current-group () / StartTime; ' ascending '; type_donnees = "text"? > but his error giving ' error in the expression: "." / xdoxslt:left(StartTime,10)'.

    Please can someone help me on this. ? If anyone has an Info abt it please share.

    Thanks in advance

    Try this way

    <>./ StartTime, 10)? "><>xdoxslt:left (current-group () / StartTime, 10);' ascending '; data type = "date"? >

Maybe you are looking for

  • Screen says unable to access the internet. When trying to navigate.

    I have down loaded the firefox program. It opens correctly to the search page. When I try to browse the internet after typing in my search, the next screen that appears shows unable to connect to the internet. I can browse through Explorer windows wi

  • How to stop messages are sent directly to the spam box

    A certain family E-mail is always sent directly to the Inbox of spam on my ipad and iphone. How do I report that this is not spam please? I'm able to do this on my main computer, but I don't see how to do that on the ipad. Thank you very much

  • HBO GO does not work on my: Lenovo tab 2 LTE a10-70

    Hello everyone. I bought this tablet: lenovo tab 2 LTE a10-70 yesterday. I've completely updated to the latest version. I installed a few games... and today I wanted to try the HBO GO on it. When I installed the app, everything goes well. I logged, c

  • I have aspire computer desktop M3920 and all my USB ports at the front do not work any more :(HELP

    OK, so all the USB ports worked very well, but a yellow exclamation appeared recently on ( ) Intel (r) 6 Series/C200 Series Chipset Family controller USB - 1 26 improved host) in the Device Manager, and my PC has no pop up any USB device I plug, so I

  • Treatment of ACL interface...

    For this question, let me first series, the scenario... Applied to the external interface - ACL_out SMTP allows all IP addresses. ACL_dmz applied to the dmz interface - SMTP allows only some certain machines in the DMZ (implicit deny statement at the