Plsql script to sort and segregate data

i have a voter table with the colums as specified in the data below.
i want to create a new pollingstation for every voter.
first i need to order the voters by their pollingstation, then surname followed by
first name.
then i need add the letter 'A' to the pollingstion of the first 6 voters in order of their surname
from A-Z for every distinct pollingstation and then add the letter 'B' to the pollingstation of the
remaining voters in that pollingstation as seen in the data below.
Can anyone please help me with a plsql script to do it.
thanks.
VOTERID POLLINGSTATION      SURNAME FIRSTNAMES          NEW_POLLINGSTATION
6909000934     A050101               ABAKAH          EBENEZER           A050101A
6909000769     A050101               AMAKYE          EVELYN           A050101A
6909000025     A050101               ANSAH          HAGAR               A050101A
6909000892     A050101               APPIAH          ROBERT               A050101A
6909000140     A050101               ASFORD          MARY               A050101A
6909000538     A050101               BUADII          ISMAIL               A050101A
6909000736     A050101               CONDUAH          JOSHUA               A050101B
6909000686     A050101               DONKOR          JOSEPH               A050101B
6909000355     A050101               MFRASI          ADJOA               A050101B
6909000041     A050101               WIREDU          MOHAMMED          A050101B
5573001657     B142501               ABEKA          EFUA               B142501A
5573001707     B142501               ADU               ERIC               B142501A
5573001749     B142501               AHEMFUL          EDWARD               B142501A
5573001533     B142501               AMOAH          MARGARAT          B142501A
5573001566     B142501               ARTHUR          FAUSTINA          B142501A
5573001665     B142501               DZIGBOR          SALOMAY               B142501A
5573001632     B142501               KETSIABA     ABA                    B142501B
5573001582     B142501               LAMPTEY          PRINCE               B142501B
5573001574     B142501               NYAME          EMILIA               B142501B
5573001624     B142501               TEI               ANTHONY               B142501B
2577004712     C070105               ABEDU          JOSEPH               C070105A
2577004985     C070105               ABOAGYE          EVANS               C070105A
2577004407     C070105               AMPONSAH     ELIZABETH           C070105A
2577004894     C070105               FRIMPONG     CECILIA               C070105A
2577004753     C070105               OFOSUA          FLORENCE          C070105A
3380006464     C070105               OSUMANU          AYISHATU          C070105A
2577004944     C070105               OTOO          EMILIA               C070105B
2577004332     C070105               QURCOO          HARUNA               C070105B
2577005008     C070105               SAGOE          GEORGINA          C070105B
2577004589     C070105               TETTEH          JOSEPH               C070105B

Hi,
Below is the expect sample results if a succefull update is done on the voter2(*new_pollingstation* column).The version is 11g R2 and te primary key is voterid
Expected Sample Result
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000934', 'A050101', 'ABAKAH', 'EBENEZER .K.', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000769', 'A050101', 'AMAKYE', 'EVELYN ', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000025', 'A050101', 'ANSAH', 'HAGAR', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000892', 'A050101', 'APPIAH', 'ROBERT', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000140', 'A050101', 'ASFORD', 'MARY', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000538', 'A050101', 'BUADII', 'ISMAIL', 'A050101A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000736', 'A050101', 'CONDUAH', 'JOSHUA', 'A050101B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000686', 'A050101', 'DONKOR', 'JOSEPH', 'A050101B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000355', 'A050101', 'MFRASI', 'ADJOA', 'A050101B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6909000041', 'A050101', 'WIREDU', 'MOHAMMED', 'A050101B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001657', 'B142501', 'ABEKA', 'EFUA', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001707', 'B142501', 'ADU', 'ERIC', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001749', 'B142501', 'AHEMFUL', 'EDWARD', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001533', 'B142501', 'AMOAH', 'MARGARAT', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001566', 'B142501', 'ARTHUR', 'FAUSTINA', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001665', 'B142501', 'DZIGBOR', 'SALOMAY', 'B142501A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001632', 'B142501', 'KETSIABA', 'ABA', 'B142501B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001582', 'B142501', 'LAMPTEY', 'PRINCE', 'B142501B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001574', 'B142501', 'NYAME', 'EMILIA', 'B142501B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5573001624', 'B142501', 'TEI', 'ANTHONY', 'B142501B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004712', 'C070105', 'ABEDU', 'JOSEPH', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004985', 'C070105', 'ABOAGYE', 'EVANS', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004407', 'C070105', 'AMPONSAH', 'ELIZABETH ', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004894', 'C070105', 'FRIMPONG', 'CECILIA', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004753', 'C070105', 'OFOSUA', 'FLORENCE', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3380006464', 'C070105', 'OSUMANU', 'AYISHATU', 'C070105A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004944', 'C070105', 'OTOO', 'EMILIA', 'C070105B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004332', 'C070105', 'QURCOO', 'HARUNA', 'C070105B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577005008', 'C070105', 'SAGOE', 'GEORGINA', 'C070105B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('2577004589', 'C070105', 'TETTEH', 'JOSEPH', 'C070105B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004851', 'D200703', 'ABUBAKARI', 'LAWURATU', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004885', 'D200703', 'ALIDU', 'MOHAMMED', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004893', 'D200703', 'ASANTE', 'ROSE', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004968', 'D200703', 'ASUMANU', 'ASMIW', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004778', 'D200703', 'AVORNYO', 'ROSE', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004802', 'D200703', 'BOSOKA', 'AGBELEGOR', 'D200703A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004844', 'D200703', 'GBEVE', 'JANET', 'D200703B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004984', 'D200703', 'HALIDU', 'MUNIRU', 'D200703B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004950', 'D200703', 'KASIM', 'ABDUL-HAKIM', 'D200703B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5399004935', 'D200703', 'NYAME', 'DANIEL', 'D200703B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007230', 'E041802', 'AFARKO', 'ISAAC NARTEY', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007370', 'E041802', 'AMOH', 'DEBORAH', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7511014404', 'E041802', 'APERTEY', 'VIDA NARKIE', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007354', 'E041802', 'DEDE ', 'HANNAH', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7511014347', 'E041802', 'DJAKWAH', 'STELLA DEDE', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007339', 'E041802', 'NARTEH', 'MARGARET MAMLE', 'E041802A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7511014263', 'E041802', 'NARTEY', 'VIDA TERKIE', 'E041802B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007305', 'E041802', 'TETTEH', 'ROSE', 'E041802B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007313', 'E041802', 'TETTEY', 'CHRISTOPHER', 'E041802B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7325007362', 'E041802', 'YOHI', 'MERCY', 'E041802B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000600', 'F240803', 'ACHEAMPOMAA', 'PAULINA', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('8426011600', 'F240803', 'ADJETEY', 'ROSE', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000584', 'F240803', 'AFRIYIE', 'AKU', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000618', 'F240803', 'AKUOKO', 'KOFI', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000576', 'F240803', 'FREMAH', 'JANET', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000592', 'F240803', 'OHENE', 'SETH KWAME', 'F240803A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('9930000568', 'F240803', 'PREKOH', 'JAMES KWABENG', 'F240803B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('8426011519', 'F240803', 'TETTEH', 'EBENEZER BAAH', 'F240803B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('8426011576', 'F240803', 'TETTEH', 'EMMANUEL', 'F240803B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('8426011659', 'F240803', 'TETTEY', 'SALOMEY', 'F240803B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7680017212', 'G242403', 'ADARKWAA', 'PATRICK', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896039596', 'G242403', 'DARKOWAAH', 'DORCAS', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896038911', 'G242403', 'DONKOR', 'EVELYN', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896039471', 'G242403', 'GOKU', 'LORLORYO', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3626003408', 'G242403', 'GYABAAH', 'ERNESTINA', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3626003739', 'G242403', 'GYABEA ', 'ANASTHECIA', 'G242403A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896039265', 'G242403', 'JIBRILA', 'FATIMATA', 'G242403B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896039463', 'G242403', 'KUBUNO ZATEI', 'JONATHAN', 'G242403B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7680017220', 'G242403', 'LORSAA', 'MARTHA', 'G242403B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('7896039646', 'G242403', 'SENEDU', 'MOSES', 'G242403B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6249018166', 'H221401', 'BERBER', 'NMAALWMINE', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('1052204441', 'H221401', 'IBRAHIM', 'YAKUBU', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('1743020552', 'H221401', 'KONJA', 'MAKABE', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('1743020545', 'H221401', 'NANKAMBA', 'KWASIA', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6249018158', 'H221401', 'SABO', 'E-MA-E AUGUSTINA', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6249018141', 'H221401', 'TUONUUR', 'ATTA', 'H221401A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6551028258', 'H221401', 'WAHABU', 'BARIKATU', 'H221401B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('1052204482', 'H221401', 'YAHAYA', 'FATI', 'H221401B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('1052204532', 'H221401', 'YAKUBU', 'SADIK', 'H221401B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('6551028381', 'H221401', 'ZAKARIA', 'AYISHA', 'H221401B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095006122', 'J061201', 'ADUKO', 'NKO', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095006031', 'J061201', 'AJENE', 'CEASAR', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095006015', 'J061201', 'AKARABO', 'YAKUBU', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095006007', 'J061201', 'ALEMBANGE', 'IBRAHIM', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095006098', 'J061201', 'AYARIGA', 'AGNES ABURIYA', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095005892', 'J061201', 'AYIVORE', 'AUGUSTINA', 'J061201A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095005868', 'J061201', 'KOFI', 'AWINE-DONGO', 'J061201B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095005934', 'J061201', 'NSOH', 'ADOMPOKA RACHAEL', 'J061201B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095005835', 'J061201', 'NYAABA', 'AZURE', 'J061201B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('3095005975', 'J061201', 'NYAABA ', 'JOYCELINE', 'J061201B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004989', 'K080601', 'AA-NAAKUM', 'YELKU-AH FRANCIS', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004914', 'K080601', 'AGYEMANG', 'SUZANA', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004864', 'K080601', 'BEGU', 'CHRISTOPHER', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543005051', 'K080601', 'BEPUGR', 'ELIZABETH', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004898', 'K080601', 'KANKPOG', 'WIETAA', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004997', 'K080601', 'KOWIER', 'Y. MOSES', 'K080601A');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543005010', 'K080601', 'KOWIER', 'ZIMUORA DAVID', 'K080601B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004823', 'K080601', 'MAALEBORO ', 'RUFINA', 'K080601B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543005044', 'K080601', 'MENSAH', 'HAGAH', 'K080601B');
insert into VOTER2 (VOTERID, POLLINGSTATION, SURNAME, FIRSTNAMES, NEW_POLLINGSTATION)
values ('5543004757', 'K080601', 'TOLOB', 'IB-BEVIEL', 'K080601B');

Similar Messages

  • JTable woes (JDK 1.5): Sorting and updating data

    So I've been working on this project for a while here that is essentially the front-end to a database system. The data itself is displayed in a JTable derivative. Column 1 is a JComboBox containing a list of companies, Column 2 is a JComboBox containing a list of employees, and the rest of the columns contain information specific to that employee.
    The data for each row is actually contained within a custom TableRowData object, which is used to assign listeners and such:
        private void initComponents() {
            this.organizations.setSelectedEnum(this.data.getOrganizationNumber());
            organizations.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if("comboBoxChanged".equals(e.getActionCommand())) {
                        clearData();
                        try {                 
                            updateEmployees();
                            fireRowDataChanged();
                        } catch (SQLException ex) {
                            Logger.getLogger(VenosTeammateRow.class.getName()).log(Level.SEVERE, null, ex);
            pocs.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {               
                    if("comboBoxChanged".equals(e.getActionCommand())) {
                        try {
                            data = getEmployeeInformation();
                            fireRowDataChanged();
                        } catch (SQLException ex) {
                            Logger.getLogger(VenosTeammateRow.class.getName()).log(Level.SEVERE, null, ex);
        }Ideally, I would like a change in Column 1 to load the employees for the selected company into Column 2. This is working as expected.
    I would also like a change in Column 2 to load the information specific to the selected employee into the rest of the columns. This is also working as expected.
    The problem I am having arises when the data is sorted and THEN a change is made to either column.
    To sort, I am using a custom comparator that keeps track of the sort direction and current sort column.
    In the JTable derivative class, I have a method, sortByColumn(int col):
    public void sortByColumn(int col) {
            this.getColumnModel().getColumn(col).getCellEditor().cancelCellEditing();
            if(this.getSelectedRow() > 0 && this.getSelectedRow() < this.getRowCount())
                this.removeRowSelectionInterval(this.getSelectedRow(), this.getSelectedRow());
            DefaultTableModel mdl = (DefaultTableModel)this.getModel();
            comp.setSortColumn(col);
            Collections.sort(mdl.getDataVector(), comp);
            // Declare and initialize the header
            JTableHeader header = this.getTableHeader();
            // Reset all headers to their identifier values
            for(int i = 0; i < mdl.getColumnCount(); i++) {
                String identifier = header.getColumnModel().getColumn(i).getIdentifier().toString();
                header.getColumnModel().getColumn(i).setHeaderValue(identifier);
            // Find the sort order (for the sorting indicator)
            int sortOrder = comp.getSortOrder(col);
            // Store the identifier text temporarily
            String headerText = header.getColumnModel().getColumn(col).getIdentifier().toString();
            // Declare and initialize the sort indicator based on the sort order
            String sortIndicator;
            switch(sortOrder) {
                case TableRowComparator.ASCENDING:
                    sortIndicator = "  \u2191";
                    break;
                case TableRowComparator.DECENDING:
                    sortIndicator = "  \u2193";
                    break;
                case TableRowComparator.UNSORTED:
                    sortIndicator = "";
                    break;
                default:
                    sortIndicator = "  \u2193";
                    break;
            /* Set the Header to display the text with the indicator. Since
             * this will automatically set the Identifier to the same value,
             * reset it to the value we stored previously.
            header.getColumnModel().getColumn(col).setHeaderValue(headerText+sortIndicator);
            header.getColumnModel().getColumn(col).setIdentifier(headerText);
            // Make sure all the changes are painted
            header.repaint();
            this.repaint();
        }After the sort, the rows are updated and displayed correctly. However, for example with three rows, if by sorting row 1 and row 3 swap, changing the JComboBox in row 3 also updates the data in row 1.
    I'll be converting my code into a short self-contained program momentarily to post on here for a better understanding of what's going on. However, I decided I would post this just in case there were something painfully obvious I missed.
    Thanks.

    Thanks, you've been really helpful :) However, I realized while trying to copy my code to a smaller, self-contained form to illustrate my problems... I never changed the row number in my TableDataRow! So of course the update information, which was relying on the row number stored in the TableDataRow object (and not the actual row number in the model's data vector) updated according to the old row numbers.
    Basically, I coded myself into a corner :P
    Fixed it by making a new comparator to compare TableDataRow objects, and I stored an array of those objects in my custom table model. So the hard work is done on the TableDataRow objects, the data vector is cleared, and then each TableDataRow is added back as a vector.
    Not sure if this is the most elegant solution, but... it works.
    Edited by: GranoblasticMan on Oct 21, 2008 1:11 PM

  • Sorting and summing data

    Here's a good one! I've got transaction details of a bank account stored in Numbers. Obviously, there are many transactions in the table. What I want to do is to grab the "GROSS INTEREST" values from within the transactions table in order for me to plot a line graph to present monthly interest deposits.
    Now I'm fine with basic functions, but this one has me stumped. I guessing I need to use SUMIF to fetch only the requested values from the transaction table which is continually updating. This means I can't select a normal data range (e.g. A1:A25).
    I've tried things such as...
    =SUMIF(Current Account :: Transactions, "GROSS INTEREST")
    Where 'Current Account' is the name of the Sheet and 'Transactions' is the bank transaction data table. And as you can see, 'GROSS INTEREST' is what I want sucked out of the main transaction data and presented in a separate table to enable graphing. But you can probably see from just looking at this example that it doesn't work!
    Maybe I'm asking too much of Numbers, but I just can't get my head around how to set this up (and set it up in a dynamic fashion so when new transactions are added, the function continues to work.)
    I've already searched this forum, but don't really know exactly what I'm looking for.
    Help in Numbers only covers the basics of SUMIF.
    Thanks.

    I'm not entirely sure where you are going with this, but let me just point out that SUMIF() can take an optional third argument. This argument is a range indicating the numbers to sum. So, if the column "Transactions" is a description that sometimes contains the value "GROSS INTEREST", and there is another column "Amounts" that contains the amount of the transaction, then you might say:
    =SUMIF(Current Account :: Transactions, "GROSS INTEREST", Current Account :: Amounts)
    This will sum the amount corresponding to the transactions that are "GROSS INTEREST"). Check the Numbers on line help for more info on SUMIF().

  • Web browser and script activeX controls and HTML data

    Hello,
    I'm trying to use the Microsoft Web Browser (IWebBrowser2) and Script (IScriptControl) activeX controls in Labview to evaluate and execute HTML script.  If I wire the web browser control's document object to the object input of the Script control's AddObject method, I can then evaluate/execute script such as "document.f.btnI.focus();" and such (in this case corresponding to Google's home page).  However, there are other expressions that include the "window" object that are proving much more difficult to work with.  Although I can browse the document object's parentWindow object via the property browser, if I try to access that object programatically, I get the error "Error -2147467262 occurred at No such interface supported".  I'm wondering how to include the window object for scripting.
    I'm writing a content-oriented web crawler.  I've been writing it with pretty low level TCP functions, handling 301/302 "object moved" and "<META HTTP-EQUIV="refresh" CONTENT="0; url=http://millercountyliberal.com/">" redirections manually.  But there are other automatic script-based redirections like:
    <script language="JavaScript" type="text/javascript">
    <!-- window.location="http://www.jrnl.com" -->
    </script>
    that I'm still trying to figure out how to work with.  As you can see, to work with that one manually involves the window object.  The reason that I don't just let the Web Browser object handle the redirections is because that object often throws script errors, downloads embedded graphics and other unnecessary components, can't handle some non-standard redirections, and sometimes annoyingly crashes.  Any help would be appreciated.  A code sample is attached.  The Web Browser control should already exist on your machine if you have Internet Explorer installed.  The script control may need to be registered before it can be used as follows:
    regsvr32 "c:\MyDir\XHTTP.dll"
    Thanks.
    Attachments:
    HTML Script Testing.zip ‏773 KB

    Hi Ted,
    This seems to be a problem with the way you are referencing the ActiveX properties.  I would research a little more on the API for these objects.  See http://msdn.microsoft.com/workshop/browser/webbrow​ser/reference/ifaces/iwebbrowser2/document.asp for an explanation of the IWebBrowser2 Document property.  I am suspicious of where you are typecasting the Document variant into the IHTMLDocument2 object and this is where the error is being thrown.
    A search of this error code on Google shows that this is a generic error from the ActiveX object, and not a LabVIEW error, although it is confusing since LabVIEW uses error codes in this same range.
    Hope this helps!
    Doug M
    Applications Engineer
    National Instruments
    For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

  • Cannot Lock and Send data to an Essbase cube

    Hi all,
    One of our customer is executing a Macro script to lock and send data to the essbase cube from an excel sheet.
    They reported that in several cases where users will submit their data, and later discover that their changes are not in Essbase.
    The calls to EssVRetrieve (to lock the blocks) and EssVSendData are both returning successfully and there is no error message received while executing the above macros.
    I reviewed the application log file and found the following message:
    [Mon Nov 24 18:59:43 2008]Local/Applicn///Warning(1080014)
    Transaction [ 0xd801e0( 0x492b4bb0.0x45560 ) ] aborted due to status [1014031].
    I analysed the above message and found the user is trying to lock the database when already a lock has been applied to it and some operation is being performed on it. Because of that the transaction has been aborted. But customer says no concurrent operation is being performed at that time.
    Can anyone help me in this regard.
    Thanks,
    Raja

    The error message for error 1014031 is 'Essbase could not get a lock in the specified time.' The first thought I have is that perhaps some user/s have the 'Update Mode' option set in their Essbase Options and thus, when they are retrieving data, they are inadvertantly locking the data blocks. If that is the case, you will probably see this issue sporadically as the locks are automatically released when the user disconnects from Essbase.
    To make it stop, you will have to go to every user's desktop and make sure they have that Essbase Option turned off. Further, you will have to look at any worksheets they may use that may have an Essbase Option name stored on it. The range name is stored as a string and includes a setting for update mode. Here is a sample that I created for this post where I first turned 'on' update mode and then turned 'off' update mode:
    A1100000001121000000001100120_01-0000
    A1100000000121000000001100120_01-0000
    Note the 11th character in the first string is '1' which indicates that Update Mode is 'on'; in the second string, it is 'off'.
    This behavior, particularly with update mode, is the only one of the behaviors that I disliked in Excel and pushed me to design our Dodeca product. In Dodeca, the administrator controls all Essbase options and can either set individual options to the value they want or they can allow the user to choose their own options. Most of our customers do not allow the user to set update mode.
    Tim Tow
    Applied OLAP, Inc

  • HT2905 Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • How Can I put an Artists Live Albums in a separate folder, so they sort by "Concert Date" in iTunes and do not "intermingle" so to speak with Studio Albums?  Is this possible?

    How Can I put an Artists Live Albums in a separate folder, so they sort by "Concert Date" in iTunes and do not "intermingle" so to speak with Studio Albums?  Is this possible?
    That is about the best way I can phrase my question.
    I put year/month/date at the beginning of a show, hoping for them to sort by date and I get mixed results.
    Would creating a Folder within the Artists' existing folder  that said "Pearl Jam Live", inside the "Pearl Jam" folder in iTunes Media help this "Date Sorting Issue"?
    Thank you.

    Or is there a way to go through aperture to make a new reference library that I can move the masters into later?
    you do not move the masters into a references library - you turn your current library into a referenced library.  As Terence Devlin said:
    File -> Relocate Masters
    What you should set up:
    Select a folder, where you want to store your referenced files - probably on an external drive.
    Decide on a hierarchical folder structure inside this folder - that is completely up to you.
    Select a project from your library and use the command "File -> Relocate Masters/Originals" to move the original image files to the folder where you want to go them to. Only take care not to send two projects to the same folder.
    Alternatively, if you do not care about the folder structure Aperture will use, select all images at once from the "Photos" view and let Aperture decide how to assing the folders - in the "Relocate Originals" dialoge you can specify a subfolder format.
    Regards
    Léonie

  • How do I delete duplicate songs in my iTunes? I have hundreds and I don't want to delete them one by one. They were all added on the same date, so sorting by the date won't help.

    How do I delete duplicate songs in my iTunes? I have hundreds and I don't want to delete them one by one. They were all added on the same date, so sorting by the date won't help.

    Hi, if this is in regards to your library simply open up itunes and do the following steps:
    Click File
    Scroll down to "show duplicates"
    A list will then appear of your duplicate song titles.
    Be sure to CAREFULLY review each song to make sure it is a duplicate ( as I have some music that is the same song but live, acoustic etc...)
    Proceed to manually delete each song from the list and leave alone any song that you wish to keep.
    Best of luck,
    Cait

  • In V_V2 the role of Sort Item by date of creation and Sort by delivery date of earliest schedule line for the Sales Orders when Material is out of Stock.

    Hi All,
    Good Morning,
    I am working on once Incident for Re-Scheduling Program V_V2 where the user has requested us to change the criteria for determining the priority of Sales Document based on Sort Item by date of creation. Currently they are using the Sort by delivery date of earliest schedule line in the Variant.
    I would like to know the role these both options play in the Re-Scheduling program V_V2. I would like to know the impact of both of them and the kind of testing I need to perform to study the behaviour of Sales Orders especially when the material is out of stock?
    Please explain with help of examples.
    Thanks
    Farhan.

    This is not that simple that an example would explain how this transaction works but I'll give you some examples.
    Material A has SO1 and SO2 of 10KG each, stock is 20KG so both quantities are confirmed at today. A stock recount determines a reduction to 5KG. This program would change confirmed quantity of SO1 to 5KG and SO2 to 0KG if:
    Creation date of SO1 is older then SO2 in strategy 1
    1st delivery date of SO1 is smaller then SO2 in strategy 2
    Material B has SO1 and SO2 with 10KG each but no quantity confirmed, stock is 0KG. A prodution adds 15KG to stock. The program would change confirmed quantities of SO1 to 10KG and SO2 to 5KG if:
    Creation date of SO1 is older then SO2 in strategy 1
    1st delivery date of SO1 is smaller then SO2 in strategy 2
    I'm assuming a specific configuration, there are many other scenarios possible.
    regards,
    Edgar

  • Line graph date sorting and formatting

    Hi Gurus
    We've recently upgraded to 11.1.1.7 and noticed that our Publisher line charts with date on the x-axis are no longer sorting correctly i.e. May comes before March. The reason for this is because in <11.1.1.7 we have a formatted date mask (to_char) in our data model but sorted by the underlying canonical date which worked. Now in 11.1.1.7 it is no longer sorting by the data model sort but by the formatted date string therefore numeric values of 30 April sorted after 1 May.
    We have tried a number of options to resolve:
    1. using the canonical date and sorting on that corrects the sort problem but the default formatting used in long YYYY-MM-DDT00:00:00-00:00 and not readable as our chart is showing daily totals. Changing to time-series chart can allow you to format the date but see problem 2 next...
    2. Time series = yes doesn't display the chart if we have a number of entities in our series i.e. multiple lines and the interactive viewer shows a red error icon. I think this may be due to the fact that our date range is not continuous ie we have a sparse data set.
    3. Workaround we used was a bar chart (our users preference is line charts) with time series = false but the date format is still long.
    Any advice / suggestions would be helpful.
    Thanks
    Nick.

    for #1: numbers does what is called a "stable" sort. Meaning that the previous sort order is preserved. i.e. do your sort in reverse order. Amount, then name, then date. Just did it with sample data and it was perfect. It keeps them in the original order, so if there is a match in name after you sort, you should see the amount still in the proper order.
    #2: What in your formula isnt working? I just made a formula that did math on the columns to the left, sorted and it worked. Sorted by static data columns and the formula column. I know it was broken originally, years ago, but it seems to be working correctly now, at least in my quick test. You might have an issue if you are using formulas that refer to data on other rows or tables.
    #3: yeah formatting can be a pain. But it is easier to do in the desktop program. No, you cannot get it for windows, sorry. If the formatting the only thing you need to do on the desktop side, then i dont see much tying you to it. I do 90% or more on the ipad and iphone now.
    Jason

  • Sort by Creation Date and TIME!

    I need to sort hundreds of images taken by three photographers and on six different cameras. I sort by Image Date, but it keeps each photographers images together, seems to sort by DATE only, then by file name.
    I have used iView Media Pro to sort this way and it is a GREAT way to organize this type of work. Is there a way to refine how Aperture 1.5.1 does this type of sort?
    At this point, my option appears to be to export my final picks, then resort and rename them in iView Media Pro.

    In the browser section, I clicked on the list view (control-L is the shortcut) and then clicked on the "Image Date" header, and saw all my images sorted by date AND time. Is this what you're looking for? If all the photographers shot on the same date and time, then they'd be intermingled I suppose, but if the times were separated, this should work. Give it a shot anyway.
    Mark

  • How can I sort pictures by date and than by time stamp ?

    The approx. 2.000 pictures was taken by two cameras.
    Both cameras intern date and time where adjusted before the for session.
    It seems that Aperture 3.3.1 can´t manage it, can it?
    In the browser there is only one common field for date and time.
    I shoot the picture with two Canon 5D Mark II and Mark-III in JPG and RAW mode.
    The file name only is totally confusing for sorting.
    Like IMG_0008, _MG_0022 for Mark-II
    and
    _L2A8410 for Mark-III.

    Hi,
    I am not sure, which sort order you want to achieve? If you sort by the date field, the images will be sorted chronologically, ascending or descending, according to date and time - isn't what what you want?
    Can it be that you have a time zone problem? Compare the dates on the images that should be sorted side by side.
    Unless you specify "Camera Time" and "Actual Time" on import, Aperture will assume that the camera time has been your current system time.
    Canon 5D Mark II and Mark-III
    And unfortunately, both your cameras are exactly the two cameras that I know, where the time zone correction in Aperture is buggy and does not have much effect. I cannot find the discussion again right now, but look for a thread by Frank Caggiano on time zone correction.
    Regards
    Léonie

  • Is it possible to sort folders by date that is written in the folders name? eg. folders are named 26 May 2011 and so on

    Hi,
    Question as in the topic: Is it possible to sort folders by date that is written in the folders name? eg. folders are named 26 May 2011 and so on
    Thanks
    Karol

    I sort mine 5.1.11, 5.2.11, etc. - that works (adding letters to the numerals does not work as well). Starting with the month will also work better because there are only 12 of them (rather than a repetition of days).

Maybe you are looking for

  • DW 5.5 uploading to wrong location

    I have recently restored a site using the New process.  The local and remote files were already in place.  When I make a change, it uploads OK apparently, except that the file goes to the wrong place and is not seen when browsing.  The site in questi

  • Problem with I Blutooth connect

    Can any one tell me how to I connect to I Bluetooth is it on but still not working

  • SIL behaving strangely and battery oddness

    Hey all, I'm a proud owner of a 5.5 MacBook Pro but I'm stumbling into some oddness about the status indicator light :/ I noticed right now that it's not lighting up when I'm actually using my Mac, if I close the lid it'll go into the flashing mode b

  • Can SCOM 2012 be placed into Windows Azure to monitor on premise services ?

    We are wanting to relocate our SCOM management group into the cloud.  The SCOM management group is used to monitor multiple forests in multiple locations using SCOM gateways.  Firstly is this supported ?  has anyone in the community experience of run

  • On hold for 38 minutes on apple care with no help!!

    I bought my iphone 5 S from India on Nov 17 2012. For last 4 weeks it is shutting down unexpectedly . Now the battery is swelling up and breaking the case. I now live in Johannesburg and took this to apple store in Centurion Mall, Sandton City and Th