Problems with Collections

I downloaded the Demo of Lightroom yesterday and have been experimenting with it. I've created various collections, and had no problem dragging pictures into them. I was dragging some pictures into a collection this afternoon, and somehow, the entire library got selected. So I deselected everything, and now I can no longer drag pictures into the collections. I think I'm suppose to be able to drag pictures to rearrange them in the thumbnail window, but I can't do that either. I also can't rearrange pictures in the collections. If I select multiple pictures, the 1st one is highlighted brighter than all the other ones. I've restarted Lightroom multiple times, I've restarted the computer, I threw away the only preference file I could find for Lightroom (com.adobe.Lightroom.plist), and I've tried re-installing Lightroom. I'm totally stumped. Anybody have any ideas?
thanks
Mac 10.4.8, 2 gigs of ram, PowerPC iMac

> Of course, now I have read what the answer is - selecting the picture and not the border - it is soooo obvious.
Thats funny, because I had the same problem, but in the opposite way.
Normally in windows, when you Shift-Click or Ctrl-Click to select
multiple items, and then if you do a regular click on one of the items,
the rest of the items will be deselected. Well, I've been suffering from
the problem of it NOT behaving like that. It's kind of annoyed me, but I
just do a Ctrl-D (deselect all) and then click. Now that I read your
post, I realize that if I click on the border instead of the picture, it
WILL behave the way I expect it.
I don't know how Mac user interfaces should behave, but in windows, if
you have multiple selections, then a normal click without a drag will
deselect everything except the item you clicked, but if you press the
mouse button and start dragging before you release the button, it's NOT
treated as a deselect. It is treated as a drag and drop. If you drop it
onto something that doesn't make sense (like dropping it onto the
filmstrip) then it leaves everything just the way it was and pretends
like you never clicked anything. That would be the proper way to do it
to be consistant with Windows interface standards.
Of course, being able to click within a selection without deselecting
everything else has advantages too. For instance, if you select a bunch
of images, you can then go through them and choose the one you intend to
be your primary selection for purposes of syncing settings or metadata.

Similar Messages

  • Apex 4 , problem with collection executions

    Hi ,
    I am having the following problem with the execution of one collection :
    Reference thread : Re: APEX 4 , executing a remote procedure and populating data using collection
    DBNAME ---> list item which I build from the DB links which I built ( as dynamic query in the shared components from a local table which holds entries of dblink names )
    USERLIST --> list item of users which should display dynamicaly the users of that db link I choose in DBNAME ( based on a collection )
    buttons CANCEL and SUBMIT
    4- Initial COLLECTION page process which is calculated before Header :
    DECLARE
    q varchar2(4000);
    BEGIN
    IF APEX_COLLECTION.COLLECTION_EXISTS(P_COLLECTION_NAME => 'QRY1') THEN
    APEX_COLLECTION.DELETE_COLLECTION(P_COLLECTION_NAME => 'QRY1');
    END IF;
    q := 'SELECT username , username FROM sys.dba_users@'||:P23_DBNAME ;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    P_COLLECTION_NAME => 'QRY1',
    P_QUERY => Q);
    END;
    For USERLIST list item I am using the following in LIST OF VALUES DEFINITION :
    SELECT C001, C002 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME='QRY1'
    5 - to submit the values from the screen to the remote database procedure I am using the following submit process ON SUBMIT AFTER CALCULATIONS:
    DECLARE
    v_statement varchar2(255);
    BEGIN
    v_statement := 'begin
    Lock_User@&P24_DBNAME.(''&P24_USERLIST.'');
    insert into log values (1,''user locked'') ;
    commit ;
    end;';
    EXECUTE IMMEDIATE v_statement;
    END;
    The problem :
    The form runs sucessfully , where I the USERLIST changes dynamicaly when I change the DBNAME values , but as soon as I logout and login with another user1 , the collection does not execute and i get "ORA-01729: database link name expected".
    I login with user1 in edit mode and recreate the collection , run again , the collection executes successfuly .
    If I create a new user2 ( using the sample application pages ) and login with the new user2 , i have the same problem , thus I ho login with user2 in edit mode and try to run the collection .
    How can I control the collection to execute regardless of the application user logged in ??
    thanks in advance
    yousef

    Hi ,
    I am having the following problem with the execution of one collection :
    Reference thread : Re: APEX 4 , executing a remote procedure and populating data using collection
    DBNAME ---> list item which I build from the DB links which I built ( as dynamic query in the shared components from a local table which holds entries of dblink names )
    USERLIST --> list item of users which should display dynamicaly the users of that db link I choose in DBNAME ( based on a collection )
    buttons CANCEL and SUBMIT
    4- Initial COLLECTION page process which is calculated before Header :
    DECLARE
    q varchar2(4000);
    BEGIN
    IF APEX_COLLECTION.COLLECTION_EXISTS(P_COLLECTION_NAME => 'QRY1') THEN
    APEX_COLLECTION.DELETE_COLLECTION(P_COLLECTION_NAME => 'QRY1');
    END IF;
    q := 'SELECT username , username FROM sys.dba_users@'||:P23_DBNAME ;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    P_COLLECTION_NAME => 'QRY1',
    P_QUERY => Q);
    END;
    For USERLIST list item I am using the following in LIST OF VALUES DEFINITION :
    SELECT C001, C002 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME='QRY1'
    5 - to submit the values from the screen to the remote database procedure I am using the following submit process ON SUBMIT AFTER CALCULATIONS:
    DECLARE
    v_statement varchar2(255);
    BEGIN
    v_statement := 'begin
    Lock_User@&P24_DBNAME.(''&P24_USERLIST.'');
    insert into log values (1,''user locked'') ;
    commit ;
    end;';
    EXECUTE IMMEDIATE v_statement;
    END;
    The problem :
    The form runs sucessfully , where I the USERLIST changes dynamicaly when I change the DBNAME values , but as soon as I logout and login with another user1 , the collection does not execute and i get "ORA-01729: database link name expected".
    I login with user1 in edit mode and recreate the collection , run again , the collection executes successfuly .
    If I create a new user2 ( using the sample application pages ) and login with the new user2 , i have the same problem , thus I ho login with user2 in edit mode and try to run the collection .
    How can I control the collection to execute regardless of the application user logged in ??
    thanks in advance
    yousef

  • Help me please : Serious problems with collection-mapping, list-mapping and map-mappi

    Hi everybody;
    I have serious problems with list-mapping, collection-mapping and map-mapping.
    Acording to specifications and requirements in a system I am working on it is needed to
    get a "list" of values or an indivudual value.I am working with ORACLE 9i Database,
    ORACLE 9i AS and ORACLE 9i JDEVELOPER.
    I tried to map a master-detail relationship in an entity-bean, using list-mapping.
    And this was very useful in order to get a "list" of details, ...but, when I wanted
    to get a single value I have some problems with persistence, something about "saving a state"
    despite I just want to get the value of a single detail.
    I decided to change it to map-mapping and the problem related with a single detail
    worked successfully, but I can get access to the whole bunch of details.
    May anyone of you help me with that?
    I am very confused I do not know what to do.
    Have any of you a solution for that problem?
    Thank you very much.

    Have you tried a restore in iTunes?

  • Refresh problem with collection

    Hello, apologize my English, I have got problem with refresh collections. Follow:
    1) I have got two classes which have got dependency together.
    2) First class has got collection of objects from second class.
    3) I call query "findXXX" which fill collection first class.
    4) I create new object second class and again call query "findXXX" to get actual collection. But collection contain old values a I have to close and open web browser to get actual data.
    I think It is problem with TopLink cache, but I do not know how solve this.
    Can you help me, please?

    The cached data is probably stale.
    There are many ways to solve this. (see the caching section of the docs)
    - there is a refresh option on the query
    - you can set a descriptor to be isolated (Cache.shared=false)
    - you can set a descriptor to always refresh
    - there is a cache invalidation option on descriptor
    - there is a cache synchronization option on session
    If the cache is stale, but the database was not accessed outside the application, it may be that your application is not maintaining relationships correctly. You must ensure you set both sides of a bi-directional relationship.
    -- James : http://www.eclipselink.org

  • Problem with Collective billing

    Hi,
    I have problem doing collective billing for one of my sales order that consist of 2 item, one is a TAN and the other is a TAS. Because of the different business process, i have to combine the billing of a delivery note (for the TAN item) and the sales order (for the TAS item) into one invoice. However when i do so, i end up with 2 invoices. Pls advise.
    Just wondering if the BlCat is different, can the invoice be combine?

    Hi,
    Invoice split will happen if you have any of the following values are different.
    1.Payer
    2. Inco Terms
    3. Payment Terms
    4. Shipping Condition
    5.Country
    6.Transportation Group
    7. Exchange Rate
    Click on the Split analysis.You will come to know why the splitting is happening.
    The procedure for this split analysis is:
    Goto the T.Code "VF02".
    Enter the number of the first billing document that you want to compare. Click on  Environment --> Split analysis.
    Enter the number of the second billing document which you want to compare to the first in the dialog box given.
    Click on "Continue".
    The system displays the Billing document split analysis log.
    Regards,
    Krishna.

  • Hi i have some problem with collect statement.

    hi when i am using collect statement and whn ever any field is modified it is getting doubled and showing doubled value. may i knoe what would be problem.

    Hai Kumar
    Go through the following Collect Syntax
    COLLECT
    Basic form
    COLLECT [wa INTO] itab.
    Addition
    ... SORTED BY f
    Effect
    COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .
    If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
    If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields.
    If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.
    If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab .
    After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed.
    Notes
    COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use.
    If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that
    the internal table will actually be unique or compressed, as described above and
    COLLECT will run very efficiently.
    If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table.
    Example
    Compressed sales figures for each company
    DATA: BEGIN OF COMPANIES OCCURS 10,
            NAME(20),
            SALES TYPE I,
          END   OF COMPANIES.
    COMPANIES-NAME = 'Duck'.  COMPANIES-SALES = 10.
    COLLECT COMPANIES.
    COMPANIES-NAME = 'Tiger'. COMPANIES-SALES = 20.
    COLLECT COMPANIES.
    COMPANIES-NAME = 'Duck'.  COMPANIES-SALES = 30.
    COLLECT COMPANIES.
    The table COMPANIES now has the following appearance:
    NAME SALES
    Duck 40
    Tiger 20
    Addition
    ... SORTED BY f
    Effect
    COLLECT ... SORTED BY f is obsolete and should no longer be used. Use APPEND ... SORTED BY f which has the same meaning.
    Note
    Performance
    The cost of a COLLECT in terms of performance increases with the width of the default key needed in the search for table entries and the number of numeric fields with values which have to be added up, if an entry is found in the internal table to match the default key fields.
    If no such entry is found, the cost is reduced to that required to append a new entry to the end of the table.
    A COLLECT statement used on a table which is 100 bytes wide and has a key which is 60 bytes wide and seven numeric fields is about approx. 50 msn (standardized microseconds).
    Note
    Runtime errors
    COLLECT_OVERFLOW : Overflow in integer field when calculating totals.
    COLLECT_OVERFLOW_TYPE_P : Overflow in type P field when calculating totals.
    Thanks & regards
    Sreenivasulu P

  • Problems with collective search help

    Hello SDNers,
    I was working with collective search help.
    Ex : zc_srch1 (Collective)
    In the 'Include search help' i have included 2 search elementary search
    help
    Ex : zsrc1 and zsrc2 (both elementary)
    I have also assigned the parameter assignment for each included search help.
    I have also mentioned the search help parameter under definition tab
    Ex field form zsrch1 and field1 from zsrch2
    and also checked the import and export checkboxes.
    Now i have used the search help in the abap program
    ex: tmp type field1 matchcode object zc_srch1.
    Now when i execute the program the collective search help is getting populated.  when i try to choose a value it is not getting selected to the parameter box.
    Regards,
    Ranjith N

    Hi,
    Once again check back your seach help creation by following the link below.
    http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
    Cheers!!
    VEnk@

  • Problem with collection names getting replaced when creating new collections in Photoshop Elements 5.0

    We have been using Photoshop Elements 5.0 a lot lately to organize many photos into collections.  A new problem just arose when creating a new collection.
    As we named the new collection and clicked on "OK" it replaced another existing collection with the new name.  The photos from the old collection were still there but now under the new collection name.  This happened at least three or four times, each time a different "old" collection was renamed.  Does anyone know why this would happen?
    This past week we have added at least 20 new collections with no problem prior to this.  Adobe actually had to shut down when this happened.  Each time we reopened Adobe it would happen again randomly renaming a different "old" collection when we tried to add the new one.  Any insights would be much appreciated.

    Thank you - that was the problem and now it is working correctly
    again!
    Tom Z.
    >>> saurabh288 <[email protected]> 05/24/09 4:23 AM >>>
    It may be that the catalog has been corupted.Try repairing the
    catalog of PSE.

  • Problem With Collection

    I am having problems populating a collection.
    I have created my collection on page load of Page 7 using
    BEGIN
    apex_collection.create_or_truncate_collection
      (p_collection_name => 'PEOPLE');
    END;The user then clicks on the "Copy" button that takes them to Page 13.
    It is here that I am trying to populate my collection, by clicking the Add link in the People report.
    for x in (select * from gus_people_2 where id = :P13_ID)
    loop
      apex_collection.add_member(p_collection_name => 'PEOPLE',
        p_c001 => x.id,
        p_c002 => x.rank,
        p_c003 => x.first_name,
        p_c004 => x.surname,
        p_c005 => x.dob,
        p_c006 => x.job,
        p_c007 => x.disp_seq);
    end loop;Once added, the member of the collection should appear in the Populated Collection report.
    select c001, c002, c003, c004, c005, c006, c007, 'Remove' remove
    from apex_collections
    where collection_name = 'PEOPLE'I am using Apex 4.1 on the Oracle web site
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    Workspace: GUSCRIGHTON
    Username : [email protected]
    Password: terminator
    Application Name: EXCEL_UPDATE_TEST
    Same username and password as above.
    It is probably something really obvious, but I cannot spot it today.
    Any help appreciated.
    Gus

    hI gUS,
    Now run your page, it will work,.
    Thanks,
    Loga
    Add Collection Process
    Request =exp1
    'ADD' - removed single quotation
    Remove Collection process
    Request =exp1
    DEL - I have given this string.
    Later you will add with link or button .
    Edited by: Logaa on May 18, 2012 6:04 AM

  • Problems with Collections using, HTMLDB_COLLECTIONS

    Hello everybody,
    I get strange problemss using the HTMLDB_COLLECTION. I want my collection to hold temporary data before the final insert or update processes. I have this list of persons with their name, phone number and phione extension number. This is quite simple and it works well on my form A. I have no problems, I can update, add, delete without any trouble.
    The content of my collections are showed in a status region. To edit the collection, I call a popup to fill the data. I can do all the operations there. But now I have a Form B which is an other version of FORM A, it's using the same code and popup window to alter the collections's information. But for a reason I do not understand. It's not working at all. It's the same popup page who is calling :
    HTMLDB_COLLECTION.DELETE_MEMBER(
    p_collection_name => collection name,
    p_seq => member sequence number);
    HTMLDB_COLLECTION.ADD_MEMBER(
    p_collection_name => collection name,
    p_c001 => [member attribute 1],
    p_c002 => [member attribute 2],
    p_c003 => [member attribute 3],
    p_c004 => [member attribute 4],
    p_c005 => [member attribute 5],
    p_c006 => [member attribute 6],
    p_c007 => [member attribute 7],
    p_c050 => [member attribute 50]);
    p_clob001 => [CLOB member attribute 1],
    p_generate_md5 => YES or NO);
    HTMLDB_COLLECTION.UPDATE_MEMBER (
    p_collection_name => collection name,
    p_seq => member sequence number,
    p_c001 => member attribute 1,
    p_c002 => member attribute 2,
    p_c003 => member attribute 3,
    p_c004 => member attribute 4,
    p_c005 => member attribute 5,
    p_c006 => member attribute 6,
    p_c007 => member attribute 7,
    p_c050 => member attribute 50);
    p_clob001 => [CLOB member attribute 1],
    etc ...
    If this works for page A, why it doesn't work for page B, when both pages use the same collections and popup window ?
    Thank you for your help.
    leinadjan
    Edited by: user13047323 on 2010-04-27 11:31

    Chantale,
    One thing jumped out at me there, that you might want to double-check -
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    p_collection_name => 'ApprobateurSelect',
    p_query => 'select approbateur.PEIN,
    approbateur.niveau_approbation,
    groupe.code_groupe
    from approbateur, usager, groupe
    where APPROBATEUR.PEIN = USAGER.PEIN
    AND approbateur.code_tache = :12_CODE_TACHE_HIDDEN');Is your item really called 12_CODE_TACHE_HIDDEN? Or should that be P12_CODE_TACHE_HIDDEN?
    If that item name is correct, then I would actually put the query itself into a variable, just so that it's easier on the eye to read and make sure there are no error in the query itself (can you run it from SQLPlus etc), then pass the variable into the CREATE_COLLECTION_FROM_QUERY_B procedure instead.

  • Problem With Collection Sets

    Wow, I am really regretting upgrading from v1.  What used to be simple catalogueing tasks are now so frustrating, long winded and unreliable my temper is being tested daily.
    I regularly photograph either similar events or the same annual events and like to organise my photos into collections, sub collections etc.  For a new event once I have got the structure of collections set up in my mine catalogue I was then able to export this as a new catalogue to use as a template for future events.  I started doing this as a result of great advise on this forum, as a work around for not being able to copy collection structures within a catalogue.  The result was I didnt need to keep setting up a structure of many collections for each event, I could use the template catalogue and import this into the main one when the photos were organised.
    So then I moved to Lightroom 3
    First I found that with the introduction of collection sets I could no longer have nested collections and had to use nested collection sets with only the final level as a collection.  A pain in the neck and one which meant my exisiting catalogue needed weeks of work to correct, in addition to an alteration to my workflow which still isnt ideal.
    Because of this I have now been trying to exprot my revised structure of collections and collection sets as new templates for the reasosn mentioned above.  But I can't becuase lightroom does not allow exporting collection sets, only collections i.e. one level, meaning this great workaround is no longer available.
    So I thought what I would do is copy my catalogue, delete everything in it but the collection set structure I wanted for each event, and then use this as a template.  Very time consuming but hopefully it would solve the problem.  But it didn't as when I import the catalogue there seems to be a limit as to the number of collection set levels that get imported, meaning the lowest levels and hence the collections dont import, i.e. all the organisation is pointless as the photos import but not the collections.
    So I thought OK I would move one of the collection sets from its parent to the top level and get around it this way, meaning I just have to do a little reorganisation after importing it.  Not ideal, but hopefully it would solve the problem.  Guess what, it doesnt.  I move the collection set (and with it all its child sets and collections) to the top, and when I delete the collection set which used to be the parent, all the child sets and collections disappear from the new top level set.
    Thsi is so frustrating.  In 20 years of using software I have never before experienced a product that removes / fundamentally changes the way in which it works so drastically as this.
    If anyone has any ideas how I can get around this I'd really appreciate it

    Hello,
    Please refer to the following article.
    http://blogs.msdn.com/b/sqlagent/archive/2011/07/22/remove-associated-data-collector-jobs.aspx
    You can run the dcclenaup.sql script mentioned in the article.
    Another option is using sp_syscollector_cleanup_collector.
    http://blogs.msdn.com/b/sqlagent/archive/2012/04/05/remove-associated-data-collector-jobs-in-sql-2012.aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Problem with collections

    hello all,
    i am getting the systex error (multiple markers at the line 3)
    from the following code, (i am using java 1.5 and eclipse 3)
    import java.util.*;
    public class FindDups {
        public static void main(String args[]) {
            Set <String> s = new HashSet<String>(); //ine 3
            for (String a : value){
                if (!s.add(a))
                    System.out.println("Duplicate detected: "+a);
            System.out.println(s.size()+" distinct words detected: "+s);
    }thanks
    daya

    thanks for replay,
    values come from command line (command line parameter)
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         Syntax error on token "<", invalid AssignmentOperator
         Syntax error on token "=", != expected
         Syntax error on token "<", ( expected
         Syntax error on token "(", invalid Expression
         Syntax error on token(s), misplaced construct(s)
         Syntax error on token ")", : expected
         at collection.FindDups.main(FindDups.java:18)

  • Problem with Collections.binarySearch()

    public class TaxPayerRecord implements Comparable <TaxPayerRecord>
    private String nric;
    private String name;
    private String dateOfBirth;
    private String gender;
    private String blockNo;
    private String unitNo;
    private String streetName;
    private String bldgName;
    private String postalCode;
    private long totalIncome;
    private long totalDonation;
    private long totalPersonalRelief;
    * Creates a new instance of TaxPayerRecord
    public TaxPayerRecord(String nric, String name, String dateOfBirth, String gender,
                   String blockNo, String unitNo, String streetName, String bldgName,
                   String postalCode, long totalIncome, long totalDonation,
                   long totalPersonalRelief)
    this.nric = nric;
    this.name = name;
    this.dateOfBirth = dateOfBirth;
    this.gender = gender;
    this.blockNo = blockNo;
    this.unitNo = unitNo;
    this.streetName = streetName;
    this.bldgName = bldgName;
    this.postalCode = postalCode;
    this.totalIncome = totalIncome;
    this.totalDonation = totalDonation;
    this.totalPersonalRelief = totalPersonalRelief;
    public String toString()
    return nric+"|"+name+"|"+dateOfBirth+"|"+gender+"|"+blockNo+"|"+unitNo+"|"+streetName+"|"+
    bldgName+"|"+postalCode+"|"+totalIncome+"|"+totalDonation+"|"+
    totalPersonalRelief;
    public long getTotalIncome()
    return totalIncome;
    public long getTotalDonation()
    return totalDonation;
    public long getTotalPersonalRelief()
    return totalPersonalRelief;
    public String getDateOfBirth()
    return dateOfBirth;
    public String getPostalCode()
    return postalCode;
    public int compareTo (TaxPayerRecord next)
              return this.nric.compareTo(next.nric);
    } //TaxPayerRecord
    import java.io.*;
    import java.util.*;
    public class TaxPayerProgramme
         public TaxPayerProgramme()
                             String menu = "Options: \n"
                                            + "1. Compute And Print List Of Tax Payers (Sorted by NRIC) \n"
                                            + "2. Compute And Summary Of Tax Revenue \n"
                                            + "3. Search for Tax Payer by NRIC \n"
                                            + "Enter option(1-2,0 to quit): ";
                             System.out.print(menu);
                             Scanner input = new Scanner( System.in );
                             int choice = input.nextInt();
                             System.out.println("");
                        // Declaration
                             ArrayList<TaxPayerRecord> list = new ArrayList<TaxPayerRecord>();
                             String inFile ="TaxPayer2005.txt";
                             String line = "";
                             String nric;
                             String name;
                             String dateOfBirth;
                             String gender;
                             String blockNo;
                             String unitNo;
                             String streetName;
                             String bldgName;
                             String postalCode;
                             long totalIncome;
                             long totalDonation;
                             long totalPersonalRelief;
                        try{
                             //Read from file
                             FileReader fr = new FileReader (inFile);
                             BufferedReader inFile1= new BufferedReader (fr);
                        line=inFile1.readLine();
                                       while (line!=null)
                                       StringTokenizer tokenizer = new StringTokenizer(line,"|");
                                       nric=tokenizer.nextToken();
                                       name=tokenizer.nextToken();
                                       dateOfBirth=tokenizer.nextToken();
                                       gender=tokenizer.nextToken();
                                       blockNo=tokenizer.nextToken();
                                       unitNo=tokenizer.nextToken();
                                       streetName=tokenizer.nextToken();
                                       bldgName=tokenizer.nextToken();
                                       postalCode=tokenizer.nextToken();
                                       totalIncome=Long.parseLong(tokenizer.nextToken());
                                       totalDonation=Long.parseLong(tokenizer.nextToken());
                                       totalPersonalRelief=Long.parseLong(tokenizer.nextToken());
                                       TaxPayerRecord person = new TaxPayerRecord(nric,name,dateOfBirth,gender,blockNo,unitNo,
                                                                                              streetName,bldgName,postalCode,totalIncome,
                                                                                              totalDonation,totalPersonalRelief);
                                       list.add(person);
                                       line=inFile1.readLine();
                                       }//end while
                        inFile1.close();
                             }// end try
                        catch (Exception e)
                             e.printStackTrace();
                        }//end catch
                        do{
                                  switch(choice)
                                       case 0:
                                       System.exit(0);
                                       break;
                                       case 1:
                                       // run list
                                       printList(list);
                                       break;
                                       case 2:
                                       printSummary(list);
                                       break;
                                       case 3:
                                       search(list,input);
                                       break;
                                  }//end switch
                             System.out.print(menu);
                             choice = input.nextInt();
                             System.out.println("");
                             }// end do
                             while(choice !=0);
                             Collections.sort(list);
         }//end TaxPayerProgramme()
         private void total(ArrayList<TaxPayerRecord> list)
              // Declaration
              double total=0;
              // calculate total
                   for (int i=0; i<list.size(); i++)
                   total=+ tax(i,list);
              //print msg
              System.out.println("Total revenue collectable for year 2006 (S$): "+total+"\n");
         private double tax(int i,ArrayList<TaxPayerRecord> list)
              // Declaration
              double income;
              double tax;
              // calculate income
              income =list.get(i).getTotalIncome()-list.get(i).getTotalDonation()
                        -list.get(i).getTotalPersonalRelief();
              // calculate tax
                   if (income>320000)
                        tax=(((income-320000)*0.21)+44850);
                   else if (income>160000)
                        tax=(((income-160000)*0.18)+16050);
                   else if (income>80000)
                        tax=(((income-80000)*0.145)+4450);
                   else if (income>40000)
                        tax=(((income-40000)*0.0875)+950);
                   else if (income>30000)
                        tax=(((income-30000)*0.0577)+375);
                   else
                        tax=((income-20000)*0.0577);
              return tax;
         private void totalAge(ArrayList<TaxPayerRecord> list)
                   // Declaration
                   String msg;
                   int i,age;
                   double grp1=0;
                   double grp2=0;
                   double grp3=0;
                   double grp4=0;
                   // calculate revenue by age
                        for (i=0; i<list.size(); i++)
                        age= 2006- Integer.parseInt(list.get(i).getDateOfBirth().substring(6,list.get(i).getDateOfBirth().length()));
                        if (age>55)
                             grp4 =+ tax(i,list);
                        else if (age>35)
                             grp3 =+ tax(i,list);
                        else if (age>17)
                             grp2 =+ tax(i,list);
                        else
                             grp1 =+ tax(i,list);
                   //print msg
                   msg="Total revenue by age range (S$) \n"+
                        "\t"+"(1 to 17)"+"\t"+ grp1 +"\n"     +
                        "\t"+"(18 to 35)"+"\t"+ grp2 +"\n"     +
                        "\t"+"(36 to 55)"+"\t"+ grp3 +"\n"     +
                        "\t"+"(above 55)"+"\t"+ grp4 +"\n";
                   System.out.println(msg);
    private void totalDistrict(ArrayList<TaxPayerRecord> list)
                   int count=1;
                   double temp=0;
                   double [][] array = new double [list.size()][2];
                        for (int i=0; i<list.size(); i++)
                        array[0]=Double.parseDouble(list.get(i).getPostalCode().substring(0,2));
                        array[i][1]=tax(i,list);
                   System.out.println("Total revenue by district (S$) ");
                        do{
                                  for (int a=0; a<list.size(); a++)
                                       if (count == array[a][0] )
                                       temp=array[a][1];
                                  }//end for loop
                             System.out.print("\t"+"(district "+count+")"+"\t"+ temp +"\n");
                             temp=0;
                             count++;
                        }while(count!= 80);// end of do_while loop
              System.out.print("\n");
         private void printList(ArrayList<TaxPayerRecord> list)
              System.out.println("List of Tax Payers fpr Year 2006");
                   for (int i=0; i<list.size(); i++)
                   System.out.println((i+1)+") "+list.get(i)+"|"+tax(i,list)+"\n");
         private void printSummary(ArrayList<TaxPayerRecord> list)
                   total(list);
                   totalAge(list);
                   totalDistrict(list);
         private void search(ArrayList<TaxPayerRecord> list,Scanner input)
                   String nric;
                   int value;
                   System.out.print("Enter NRIC Number: ");
                   nric = input.next();
                   Collections.sort(list);
                   value = Collections.binarySearch(list,nric);
         public static void main(String [] args)
                   new TaxPayerProgramme();
    I keep getting this message:
    C:\Documents and Settings\Xiong\Desktop\TaxPayerProgramme.java:285: cannot find symbol
    symbol : method binarySearch(java.util.ArrayList<TaxPayerRecord>,java.lang.String)
    location: class java.util.Collections
                   value = Collections.binarySearch(list,nric);
                   ^
    1 error
    Tool completed with exit code 1

    You can't search a list of TacPayerRecords using a String.

  • Problem with Collect statement

    Hi Experts,
    I am facing a peculiar problem. Please go through the code below and it is not giving the aggregate of it_ekbe_642_pgi-menge for the same it_ekbe_642_pgi-ebeln and it_ekbe_642_pgi-ebelp.
    LOOP AT it_ekbe_642_pgi.
        it_ekbe_642_pgi_tot-ebeln =   it_ekbe_642_pgi-ebeln.
        it_ekbe_642_pgi_tot-ebelp =   it_ekbe_642_pgi-ebelp.
        it_ekbe_642_pgi_tot-budat =   it_ekbe_642_pgi-budat.
        it_ekbe_642_pgi_tot-xblnr =   it_ekbe_642_pgi-xblnr.
        it_ekbe_642_pgi_tot-menge =   it_ekbe_642_pgi-menge.
        COLLECT it_ekbe_642_pgi_tot.
      ENDLOOP.
    Please suggest.
    Thanks....
    Shibaji.

    Hi Shibaji Maitra ,
    Since you are aggregating the it_ekbe_642_pgi-menge for the same it_ekbe_642_pgi-ebeln and it_ekbe_642_pgi-ebelp.
    For using the Collect statement the order of the fields should be
    in proper order i.e. all the char fields come up & then after that
    all the numeric fields.Please check the sequence in your internal
    table and also the fields type of menge field.
    LOOP AT it_ekbe_642_pgi.
      it_ekbe_642_pgi_tot-ebeln = it_ekbe_642_pgi-ebeln.
      it_ekbe_642_pgi_tot-ebelp = it_ekbe_642_pgi-ebelp.
    it_ekbe_642_pgi_tot-xblnr = it_ekbe_642_pgi-xblnr.
    it_ekbe_642_pgi_tot-budat = it_ekbe_642_pgi-budat.
    it_ekbe_642_pgi_tot-menge = it_ekbe_642_pgi-menge.
    COLLECT it_ekbe_642_pgi_tot.
    ENDLOOP.
    Rewards points if helpful.
    Regards
    Manoj Kumar

  • Problem with collection in cursor

    hi ,
    oracle srvr : 10.2.0.1.0
    when I'm executing the following
    declare
    type i_values is varray(20000) of employee_details%rowtype;
    s_values i_values :=i_values();
    cursor c1 is select * from employee_details where rownum < 11;
    begin
    loop
    begin
    fetch c1  into s_values  ;
    s_values.extend;
    exit when c1%NOTFOUND;
    exception
    when  invalid_cursor then
    dbms_output.put_line('Cursor invalid');
    when others then
    dbms_output.put_line('Others');
    end ;
    end loop;
    for i in 1 .. s_values.count loop
    dbms_output.put_line(s_values(i).eid);
    end loop;
    end;
    / I get the error as
    ERROR at line 8:
    ORA-06550: line 8, column 16:
    PLS-00597: expression 'S_VALUES' in the INTO list is of wrong type
    ORA-06550: line 8, column 1:
    PL/SQL: SQL Statement ignoredInstead when I run cursor as bulk collect its executing but going to a infinite loop
    please help

    As Justin showed, you want to use BULK collect if you need to fetch data into a collection.
    e.g.
    SQL> set serverout on
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    type t_emps is table of emp%rowtype;
      3    v_emps t_emps;
      4    cursor c1 is
      5      select *
      6      from emp
      7      where rownum <= 10;
      8  begin
      9    open c1;
    10    fetch c1 bulk collect into v_emps;
    11    close c1;
    12    for i in 1 .. v_emps.count
    13    loop
    14      dbms_output.put_line(v_emps(i).empno||' - '||v_emps(i).ename);
    15    end loop;
    16* end;
    SQL> /
    7369 - SMITH
    7499 - ALLEN
    7521 - WARD
    7566 - JONES
    7654 - MARTIN
    7698 - BLAKE
    7782 - CLARK
    7788 - SCOTT
    7839 - KING
    7844 - TURNER
    PL/SQL procedure successfully completed.
    SQL>If your code has got stuck in an infinite loop, you've probably left the LOOP construct in your code. That isn't needed with a bulk collect, unless you limit the number of rows fetched and need to process in set sized chunks.
    If you planning on extracting the data to a load of INSERT statements then consider that as being bad practice.
    You would be better to export the data to a flat file (CSV) and then have the receiving database use an external table (or SQL*Loader) if you must, to load that data back in. Lots of insert statements WILL be slow.
    If you want to export data to a flat file you can use something like:
    As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /As myuser:
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;This allows for the header row and the data to be written to seperate files if required.
    e.g.
    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    PL/SQL procedure successfully completed.Output.txt file contains:
    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
    Adapt to output different datatypes and styles are required.

Maybe you are looking for

  • What is the use of lookup tranformation in odi

    Hi Experts, What is the use of lookup transformation in ODI. In ODI we use different kinds of joins, so my doubt is what is the difference between lookup transformation joins and normal joins we use in ODI. Please let me know with your valueable info

  • How to query database to retrieve code to create existing objects(nonPLSQL)

    Hi, I would like to know how to query the database so I can pull out the SQL required to create objects. I can already get the code for PL/SQL objects such as triggers and procedures by using DBA_SOURCE, however I also need to pull out code for objec

  • Precalculation Server for Information Broadcasting

    Hi Folks, Do we need Precalculation server to use Information Broadcasting in BW7.0? I am especially interested in using the Filling OLAP Cache functionality in Information Broadcasting to fill OLAP cache for one workbook. Need your help on this. Reg

  • Prevent apps and icons from being rearranged or deleted?

    Is there a way to prevent apps and icons from being rearranged or deleted? My three year old son likes to move them around and delete them. I don't want to lock him out because he loves to play many of the learning apps and games.

  • Process Integrator and WL6

    When is PI going to be available for WL6, anyone have any idea? We want to use PI, but are using WL6, I couldn't believe it when I saw that the new release of PI 1.2 requires 5.1. What can we do??? Thanks Rich