Problem  in using COLLECT statment

Hi experts,
getting problem in using COLLECT statement.  attaching my code below.
LOOP AT it_final1 INTO wa_final1.
     LOOP AT it_final INTO wa_final WHERE vagrp = wa_final1-vagrp AND verwmerkm = wa_final1-verwmerkm.
       wa_final1-anzwertg = wa_final-anzwertg.
       COLLECT wa_final1 INTO it_final1.
     ENDLOOP.
     CLEAR: wa_final1, wa_final.
   ENDLOOP.
here , i want to use collect statement only for  "anzwertg" field from internal table. but 2 more fields also getting  compressed .
attaching screen shot
here, original_input and max fields also getting compressed.
could anybody please help me out in this.
Thanks in advance.
Regards
satish

Hi satish....
collect statement works based on char fields..
by default it will taken char fields as a key fields .........
if any char field is repeated then corresponding numc values will be added....
other wise it will act as a APPEND statement......
Here in ur code there is no char field then how it will caliculate that values...
just check it once..
Regards,
Vamsi....

Similar Messages

  • Problem when using Collection in struts

    Hai
    I am using the collction classes like Vector, ArrayList to store details from database and then i assigned that as a session attribute and then i use that to display values in jsp. But at compilation time it displays the following message.
    Note: DatabaseOperation.java uses unchecked of unsafe opertaions.
    Note: Recompile with -Xlint: unchecked for details
    Here DatabaseOperation is a java file in which i am using the following method.
    public ArrayList dbSelectServerDetails(String serverName)
                       ArrayList serverList=new ArrayList();
         try
         st=con.createStatement();
         rs=st.executeQuery("Select * from cx_server where server_name='"+serverName+"'");
         while(rs.next())
         serverList.add(rs.getString(1));
         serverList.add(rs.getString(2));
         serverList.add(rs.getString(3));
         catch(Exception e)
         System.out.println("Error in dbSelectServerDetails : "+e);
         return serverList;
    } I assigned this returned serverList as session attribute named "serverList"
    jsp file
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <logic:present name="serverList">
         <logic:iterate id="serverName" name="serverList">
              <bean:write name="serverName"/>
         </logic:iterate>
    </logic:present>What is problem here? pls help me.

    Double Post: http://forum.java.sun.com/thread.jspa?threadID=631435&messageID=3644257#3644257

  • Problem while using collections

    CREATE OR REPLACE
    TYPE LID_OBJ_TYPE AS OBJECT
    CONTRACT varchar2(120),
    TYPE varchar2(50),
    Sno VARCHAR2 (30),
    PiD varchar2(50),
    INUMBER varchar2(30),
    DMID number,
    STATUS CHAR(1),
    MAP MEMBER FUNCTION dmid_f RETURN NUMBER
    CREATE OR REPLACE
    type body LID_OBJ_TYPE as
    MAP MEMBER FUNCTION dmid_f RETURN NUMBER
    IS
    BEGIN
    return DMID;
    END dmid_f;
    END ;
    CREATE OR REPLACE
    type LID_TAB_TYPE is table of LID_OBJ_TYPE;
    in my procedure in declartion part i used like this
    lid_list lid_tab_type
    := lid_tab_type ();
    CURSOR c_test
    IS
    SELECT lid_obj_type (contract,
    NULL,
    NULL,
    NULL,
    NULL,
    dmid,
    status
    FROM (SELECT contract, dmid,'Y' status
    FROM contracts where dmid >100
    and.....
    in begin section
    OPEN c_test;
    FETCH c_test
    BULK COLLECT INTO lid_list;
    CLOSE c_test;
    if lid_list.count>0 then
    FORALL i IN 1 .. lid_list .COUNT
    UPDATE xx_d
    SET error_msg = 'error'
    WHERE dm_line_id =
    lid_list (i).dmid;
    end if;
    but its giving error as PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records
    how to solve this

    Try this as your FORALL. This should work.
    FORALL i IN 1 .. lid_list.COUNT
             UPDATE xx_d
                SET error_msg    = 'error'
              WHERE dm_line_id = TREAT(lid_list(i) AS LID_OBJ_TYPE).dmid;G.

  • Problem in Using Collections as Web Parameters

    Hello,
    I have tried to use ArrayList and Map variables to pass as web parameter in oc4j(10.1.3.1.0). The interesting this is that, in my web method return type object, if i am declaring a variable of type Map or List, and the variable name is all in small letters, then the wsdl generated is having the proper mappings.
    But if the variable name is in proper case, the wsdl generated is not having the proper definition.
    Eg:
    private List<String> mylist;
    public List<String> getMylist() {
    public setMylist(List<String> mylist){
    as part of my web param or web method return type object, works fine. But,
    private List<String> myList;
    public List<String> getMyList() {
    public setMyList(List<String> myList){
    as part of my web param or web method return type object, is getting failed.
    Any input in this matter will be appreciated.
    Thanks and Regards,
    Dipu

    Hello,
    Thank you very much for your reply.
    Please find the attached java source files (CollectionsTestService.java, FormInformationDTO.java and AnotherDTO.java). Also I have attached the wsdl generated by the ant task <oracle:deploy....>.
    Please find the differences of type definitions, in case of the two sets of variables,
    "genderCodes, testMap, testList" and "gendercodes, testmap, testlist"
    I am not able to find any logical reason for the same, but it is happening in my environment. The type definitions for the second set is well and fine and it satisfies my requirement.
    If you can help me in sorting out this issue, that will be really helpful. As you know I can not impose any restrictions to name the variables, just to make the things work. More than that I am interested in finding the actual reason for this abnormal behavior with OC4J.
    Thanks and Regards,
    Dipu.
    ######CollectionsTestService.java
    package poc;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    * @author dipu.kumar
    * Description: A web service to test collection objects as peb param return type and arguments.
    @WebService ( name = "CollectionsTestService" )
    @Stateless
    public class CollectionsTestService
    * This is a test method and please dont think about the argument types.
    * @param searchCriteria
    * @return
    @WebMethod ( operationName = "search" )
    public List < FormInformationDTO > search ( FormInformationDTO searchCriteria )
    List < FormInformationDTO > testResults = new ArrayList < FormInformationDTO > ();
    testResults.add ( searchCriteria );
    return testResults;
    #####FormInformationDTO.java
    package poc;
    import java.io.Serializable;
    import java.util.List;
    import java.util.Map;
    public class FormInformationDTO implements Serializable
    private Map < String , Long > genderCodes;
    private Map < String , AnotherDTO > testMap;
    private List < AnotherDTO > testList;
    private Map < String , Long > gendercodes;
    private Map < String , String > testmap;
    private List < AnotherDTO > testlist;
    public Map < String , Long > getGenderCodes ()
    return genderCodes;
    public void setGenderCodes ( Map < String , Long > genderCodes )
    this.genderCodes = genderCodes;
    public List < AnotherDTO > getTestList ()
    return testList;
    public void setTestList ( List < AnotherDTO > testList )
    this.testList = testList;
    public Map < String , AnotherDTO > getTestMap ()
    return testMap;
    public void setTestMap ( Map < String , AnotherDTO > testMap )
    this.testMap = testMap;
    public Map < String , Long > getGendercodes ()
    return gendercodes;
    public void setGendercodes ( Map < String , Long > gendercodes )
    this.gendercodes = gendercodes;
    public List < AnotherDTO > getTestlist ()
    return testlist;
    public void setTestlist ( List < AnotherDTO > testlist )
    this.testlist = testlist;
    public Map < String , String > getTestmap ()
    return testmap;
    public void setTestmap ( Map < String , String > testmap )
    this.testmap = testmap;
    ########AnotherDTO.java
    package poc;
    import java.util.List;
    import java.util.Map;
    public class AnotherDTO
    private Map < String , Long > genderCodes;
    private Map < String , FormInformationDTO > testMap;
    private List < FormInformationDTO > testList;
    private Map < String , Long > gendercodes;
    private Map < String , String > testmap;
    private List < FormInformationDTO > testlist;
    public Map < String , Long > getGenderCodes ()
    return genderCodes;
    public void setGenderCodes ( Map < String , Long > genderCodes )
    this.genderCodes = genderCodes;
    public List < FormInformationDTO > getTestList ()
    return testList;
    public void setTestList ( List < FormInformationDTO > testList )
    this.testList = testList;
    public Map < String , FormInformationDTO > getTestMap ()
    return testMap;
    public void setTestMap ( Map < String , FormInformationDTO > testMap )
    this.testMap = testMap;
    public Map < String , Long > getGendercodes ()
    return gendercodes;
    public void setGendercodes ( Map < String , Long > gendercodes )
    this.gendercodes = gendercodes;
    public List < FormInformationDTO > getTestlist ()
    return testlist;
    public void setTestlist ( List < FormInformationDTO > testlist )
    this.testlist = testlist;
    public Map < String , String > getTestmap ()
    return testmap;
    public void setTestmap ( Map < String , String > testmap )
    this.testmap = testmap;
    ###CollectionsTestService-WSDL.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns0="http://www.oracle.com/webservices/internal/literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://poc/" name="CollectionsTestServiceService" targetNamespace="http://poc/">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.oracle.com/webservices/internal/literal" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://poc/" elementFormDefault="qualified">
    <import namespace="http://www.oracle.com/webservices/internal/literal"/>
    <complexType name="FormInformationDTO">
    <sequence>
    <element name="testMap" type="ns1:map" nillable="true"/>
    <element name="testList" type="ns1:list" nillable="true"/>
    <element name="gendercodes" type="tns:MapOfStringToLong" nillable="true"/>
    <element name="genderCodes" type="ns1:map" nillable="true"/>
    <element name="testlist" type="tns:ListOfAnotherDTO" nillable="true"/>
    <element name="testmap" type="tns:MapOfStringToAnotherDTO" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="MapOfStringToLong">
    <sequence>
    <element name="mapEntry" type="tns:MapEntryOfStringToLong" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="MapEntryOfStringToLong">
    <sequence>
    <element name="key" type="string"/>
    <element name="value" type="long"/>
    </sequence>
    </complexType>
    <complexType name="ListOfAnotherDTO">
    <sequence>
    <element name="item" type="tns:AnotherDTO" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="AnotherDTO">
    <sequence>
    <element name="testMap" type="ns1:map" nillable="true"/>
    <element name="testList" type="ns1:list" nillable="true"/>
    <element name="gendercodes" type="tns:MapOfStringToLong" nillable="true"/>
    <element name="genderCodes" type="ns1:map" nillable="true"/>
    <element name="testlist" type="tns:ListOfFormInformationDTO" nillable="true"/>
    <element name="testmap" type="tns:MapOfStringToFormInformationDTO" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="ListOfFormInformationDTO">
    <sequence>
    <element name="item" type="tns:FormInformationDTO" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="MapOfStringToFormInformationDTO">
    <sequence>
    <element name="mapEntry" type="tns:MapEntryOfStringToFormInformationDTO" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="MapEntryOfStringToFormInformationDTO">
    <sequence>
    <element name="key" type="string"/>
    <element name="value" type="tns:FormInformationDTO"/>
    </sequence>
    </complexType>
    <complexType name="MapOfStringToAnotherDTO">
    <sequence>
    <element name="mapEntry" type="tns:MapEntryOfStringToAnotherDTO" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="MapEntryOfStringToAnotherDTO">
    <sequence>
    <element name="key" type="string"/>
    <element name="value" type="tns:AnotherDTO"/>
    </sequence>
    </complexType>
    <element name="search" type="tns:search"/>
    <complexType name="search">
    <sequence>
    <element name="searchCriteria" type="tns:FormInformationDTO" nillable="true"/>
    </sequence>
    </complexType>
    <element name="searchResponse" type="tns:searchResponse"/>
    <complexType name="searchResponse">
    <sequence>
    <element name="return" type="tns:ListOfFormInformationDTO" nillable="true"/>
    </sequence>
    </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.oracle.com/webservices/internal/literal" targetNamespace="http://www.oracle.com/webservices/internal/literal" elementFormDefault="qualified">
    <import namespace="http://poc/"/>
    <complexType name="map">
    <sequence>
    <element name="mapEntry" type="tns:mapEntry" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="mapEntry">
    <sequence>
    <element name="key" type="anyType"/>
    <element name="value" type="anyType"/>
    </sequence>
    </complexType>
    <complexType name="list">
    <complexContent>
    <extension base="tns:collection">
    <sequence/>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="collection">
    <sequence>
    <element name="item" type="anyType" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </schema>
    </types>
    <message name="CollectionsTestServicePortType_search">
    <part name="parameters" element="tns:search"/>
    </message>
    <message name="CollectionsTestServicePortType_searchResponse">
    <part name="parameters" element="tns:searchResponse"/>
    </message>
    <portType name="CollectionsTestService">
    <operation name="search">
    <input message="tns:CollectionsTestServicePortType_search"/>
    <output message="tns:CollectionsTestServicePortType_searchResponse"/>
    </operation>
    </portType>
    <binding name="CollectionsTestServiceSoapHttp" type="tns:CollectionsTestService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="search">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="CollectionsTestServiceService">
    <port name="CollectionsTestService" binding="tns:CollectionsTestServiceSoapHttp">
    <soap:address location="http://wdjpd0610005.djp.dintranet:8888/mdpackageejb/CollectionsTestService"/>
    </port>
    </service>
    </definitions>

  • Problem is using collection variables in contracts

    Hi all
    I am trying to create a contract from master agreement that would pull in the line item information in master agreement in a tabular format in my MS Word based contract.
    For the same I have added contract gen variable  "Agreement Line Items (Table format)" in one of the clauses.I am used this clause in my contract generation template. When i create contract using this contract gen template valuse are not getting pulled.
    This is working fine for attribute variables like Title, company etc.
    Plz help if somebody has faced similar issues
    Regards
    Tripti
    Edited by: Tripti A on Mar 24, 2010 1:12 PM

    Hi
    Is the functionality working fine for everyone? Please let me know.
    Tripti

  • Using collections / Bind variables with a PL/SQL functio returning a query

    I have this code, which is supposed to assign collection variables as column names
    FOR i in 1 .. Collection_count -1
    LOOP
    SELECT c002 into :P341_M1 FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=i;
    SELECT c002 into varholder FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=i;
    vQuery:= vQuery || 'SUM(decode(label, ''Aware'', product_'|| i || ', ''Expert'', product_' || i || ', ''Proficient'', product_' || i || ', ''Advanced(Demo)'', product_' || i || ' )) as ';
    vQuery:=vQuery || varholder || ', ' ;
    END LOOP;
    I've tried &P341_M1. , :P341_M1, ':P341_M1', varholder
    When I try '&P341_M1' it returns the whole SUM(decode... line as the label
    Basically Im having a hard time using bind variables with the PL/SQL returning a query...anybody?

    Ok so working through this problem more I have realized that the problem is using the for loop i as an index value
    This will get a value:
    SELECT c002 into :P341_M1 FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=2;
    But this won't
    SELECT c002 into :P341_M1 FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=i;
    I'm in the for loop, and use the i variable in other places within this loop...Is there a reason why I can't compare seq_id to i?
    My new code as follows:
    FOR i in 1 .. Collection_count -1 --apex_application.g_f01.COUNT - 1
    LOOP
    varholder:=i;
    SELECT c002 into :P341_M1 FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=2;
    SELECT c002 into varholder FROM APEX_collections WHERE collection_name = 'MA_SKILLS' AND seq_id=4;
    vQuery:= vQuery || 'SUM(decode(label, ''Aware'', product_'|| i || ', ''Expert'', product_' || i || ', ''Proficient'', product_' || i || ', ''Advanced(Demo)'', product_' || i || ' )) as f';
    vQuery:=vQuery || :P341_M1 ||i||', ' ;
    END LOOP;

  • How to acheive this scnerio in PL/SQl using collections

    Hi All,
    In my apllication we are handling two types of procedures which runs based on the jobs.
    Due to some problem few records where got missed in prouduction.
    We have tried to run this jobs manaually one by one and it is taking time to execute..
    I have got a suggetsion from my senior to do in a collection and run this packages at a time..
    Here is my exact scenerio, can you please help me out to implemnet in collections..
    Steps:
    Populate the missing records namely ordered, event sequence, Start date, end date, region in to plsql table/collection. ( Hard-coded since this will run the code
    for a date which will take less time and take less record).
    looping the plsqltable/collection for missing records
    Running the procedure p_Daily with startdate and end date parameter
    -- if the above executed successfully we need to execute second procedure i.e p_Region procedure by checking records in f_daily_report exist/relevant table
    (Id and sequence).
    Running the procedure p_region with start date and region id ( checking whether id and sequece is exist f_daily_report table).
    end loop
    The above steps which i have explained needs to achievd thru collections, can anybody helps me out on this.
    Note:
    1. All the missing jobs wil fal under differnt date rane groups.
    2. For second job i.e p_region i have mentioned that it will run based on start date and region id..This job will run on three differnt region id's..We can find the
    region id based on by joining f_region and d_region table. It seems that these misisng records belongs to all three regions
    Hope u all understand my scenrio. can you please help me out..
    Thanks in advance,
    Anoo..

    Anoo wrote:
    Hi,
    Hope you have not clear my question..The reason is i want to know how we can achieve my problem in collection
    rather than select statement.. Even though if we can get in simple statement is not advisible in my case..That is the reason why i was looking collections...
    Rather than providing data is it possible to how we can proceed in collections.That's like saying you want to write poor code that performs slowly rather than fast and performant code.
    Without clear explanations and examples of data and output, there doesn't appear to be a valid reason for using collections. The reason you're not getting many responses on your thread is because you're not explaining clearly what is required with examples. Please read {message:id=9360002} for an idea of what people need from you in order to help you.

  • Kodo 3.4.1: how to limit # of sql query params when using collection param

    Hi,
    We have a problem when using Kodo 3.4.1 against SQL Server 2005, when we execute query:
              Query query = pm.newQuery( extent, "IdList.contains( this )" );
              query.declareParameters( "Collection IdList" );
              query.declareImports( "import java.util.Collection;" );
              return (List) query.execute( list );
    We got:
    com.microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:354)
    at com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.executeQuery(PoolConnection.java:341)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1106)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at kodo.jdbc.runtime.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1730)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:339)
    at kodo.jdbc.sql.Select.execute(Select.java:1581)
    at kodo.jdbc.sql.Select.execute(Select.java:1533)
    at kodo.jdbc.runtime.SelectResultObjectProvider.open(SelectResultObjectProvider.java:102)
    at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:1081)
    at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:799)
    It seems that there're too many ids in the list, and Kodo didn't limit the # of sql parameters when craft the sql query. Is there a way to ask Kodo to use multiple queries with smaller # of sql parameters instead of using one big sql query?
    Thanks

    Hi,
    Sadly, there is no way to do that in Kodo currently. The closest is the inClauseLimit DBDictionary setting, but that setting just breaks things up into multiple IN statements put together with an OR clause. In your case, it looks like the network transport, not the SQL parser, is complaining about size limits.
    You could force the query to run in-memory, but that would probably be prohibitively slow, unless the data set that you're querying against is relatively small.
    -Patrick

  • Best practices when using collections in LR 2

    How are you using collections and collection sets? I realize that each photographer uses them differently, but I'm looking some inspiration because I have used them only very little.
    In LR 1 I used collections a bit like virtual Folders, but it doesn't anymore work as naturally in LR2.
    In LR 1 it was like:
    Travel (1000 images, all Berlin images)
    Travel / Berlin trip (400 images, all Berlin trip images)
    Travel / Berlin trip / web (200 images)
    Travel / Berlin trip / print (100 images)
    In LR 2 it could be done like this, but this somehow feels unnatural.
    Travel (Collection Set)
    Travel / Berlin trip (CS)
    Travel / Berlin trip / All (collection, 400 images)
    Travel / Berlin trip / web (collection, 200 images)
    Travel / Berlin trip / print (collection, 100 images)
    Or is this kind of use stupid, because same could be done with keywords and smart collections, and it would be more transferable.
    Also, how heavily are you using Collections? I'm kind of on the edge now (should I start using them heavily or not), because I just lost all my collections because I had to build my library from scratch because of weird library/database problems.

    Basically, i suggest not to use collections to replicate the physical folder structure, but rather to collect images independent of physical storage to serve a particular purpose. The folder structure is already available as a selection means.
    Collections are used to keep a user defined selection of images as a persistent collection, that can be easily accessed.
    Smart collections are based on criteria that are understood by the application and automatically kept up to date, again as a persistent collection for easy access. If this is based on a simple criterium, this can also, and perhaps even easier, done by use of keywords. If however it is a set of criteria with AND, OR combinations, or includes any other metadata field, the smart collection is the better way to do it. So keywords and collections in Lightroom are complementary to eachother.
    I use (smart)collections extensively, check my website  www.fromklicktokick.com where i have published a paper and an essay on the use of (smart)collections to add controls to the workflow.
    Jan R.

  • Using Collections

    HI EXPERTS
    i want to implement the below procedure using pl/sql collections can any one suggest for the followinG
    create or replace procedure test_proc
    is
    cursor c1 is select * from temp;
    cursor c1 is select * from MONITORING;
    i temp%rowtype;
    j MONITORING%type;
    begin
    open c1
    loop
    if (I.RES_CODE = '02' and i.CUST_ACCNO = j.CUST_ACCNO and i.CUST_MMID = j.CUST_MMID and i.CUST_MOBNO = j.CUST_MOBNO) then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'03'
    FROM temp I
    WHERE EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
    AND I.RES_CODE = '02';
    elsif (I.RES_CODE = '02' and (i.CUST_ACCNO != j.CUST_ACCNO or i.CUST_MMID != j.CUST_MMID or i.CUST_MOBNO != j.CUST_MOBNO)) then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'04'
    FROM temp I
    WHERE NOT EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
    AND I.RES_CODE = '02';
    elsif I.RES_CODE != '02' then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'02'
    FROM temp I
    WHERE I.RES_CODE != '02';
    exit whenc1
    end loop;
    close c1;
    end;
    /

    Didn't you have a discussion just yesterday about Re: Collections:?
    As was discussed in your previous thread, if the goal is to improve efficiency, it would be more efficient to get rid of the cursors and to just issue SQL statements to insert all the rows at once. Using collections may be an improvement over slow row-by-row processing but set-based processing will be even more efficient.
    In yesterdays thread, multiple people showed you how to use collections. Is there some specific problem/ question that you have? Presumably, the goal of you posting here is to learn how to use collections on your own, not to post all of your procedures one at a time and ask others to rewrite them using collections.
    The code you posted can't possibly compile. For example, you have two different declarations of the c1 cursor that query two completely different tables. There is an "exit whenc1" call that doesn't appear to match to any loop. Your code is also rather hard to follow since it is not formatted. If you put the tag \ (6 characteers all lower case) immediately before and after a code snippet, the forum will maintain all the spacing.  That makes the code much, much easier to read.
    Justin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use collections

    Hi
    i'm still quite the novice on APEX so bare with me.
    my problem is as follows:
    I have to develop a page for mass registration of sales, in APEX, and the client would like a tabular form with 20 empty rows in which the client can insert sales data.
    i'm developing on apex version 3.0.0.00.20 on a 10g Enterprise Edition Release 10.1.0.5.0 database.
    i've tried using collections for the job, but my problem is that i can't get the code to save any changes to the collection??
    i've created a on load before header process
    that creates a collection named SALGSBUFREG using apex_collection.create_collection_from_query where no rows are returned.
    the table i query is the table that the sales data eventually is inserted into.
    /** on-load before header process start */
    declare
    c_coll_name constant varchar2(100) := 'SALGSBUFREG';
    c_number_of_rows constant number := 20;
    begin
    if apex_collection.collection_exists(p_collection_name=>c_coll_name) then
    apex_collection.delete_collection(p_collection_name=>c_coll_name);
    end if;
    apex_collection.create_collection_from_query(
    p_collection_name=>c_coll_name,
    p_query=>'SELECT varenummer,
    antal,
    aip_omsaetning,
    apotekskode ,
    salgsdato,
    salgsperiode,
    dlibruger_id,
    salgsbatch_id,
    sygehuskode,
    afvist,
    indsat,
    updateret,
    registreringsdato
    FROM salgsbuffere
    WHERE 1 = 2');
    /** create c_number_of_rows empty rows*/
    for i in 1 .. c_number_of_rows
    loop
    apex_collection.add_member (p_collection_name => c_coll_name,
    p_c001 => ' ',
    p_c002 => ' ',
    p_c003 => ' ',
    p_c004 => ' ',
    p_c005 => null,
    p_c006 => ' ',
    p_c007 => ' ',
    p_c008 => ' ',
    p_c009 => ' ',
    p_c010 => ' ',
    p_c011 => ' ',
    p_c012 => ' ',
    p_c013 => null
    end loop;
    end;
    /** on-load before header process stop */
    i've created a report region called salgs_buf based on the following query:
    select c001, c002, c003, c004, c005, c006, c007, c008,c009,c010,c011, c012,c013
    from apex_collections
    where collection_name = 'SALGSBUFREG'
    i've made the report attributes c001 - c005 editable.
    finally i've made a on submit - after computations and validations process with the following content:
    declare
    c pls_integer := 0;
    c_coll_name constant varchar2(100) := 'SALGSREGBUF';
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = c_coll_name
    order by seq_id) loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f01(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f02(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f03(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f04(c));
    end loop;
    end;
    For some reason the collection dosen't get updated????
    any idears why, or am I using the wrong apporach.

    first off thanks for your help.
    I seem to have cracked the nut so to speak, i'm just posting my solution
    I've changed the process so that exisisting collections aren't deleted.
    /** before header process start**/
    DECLARE
    c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
    c_number_of_rows CONSTANT NUMBER := 20;
    v_row_count_diff NUMBER;
    v_row_count NUMBER;
    BEGIN
    IF NOT apex_collection.collection_exists (c_coll_name)
    THEN
    apex_collection.create_collection_from_query
    (p_collection_name => c_coll_name,
    p_query => 'SELECT varenummer,
    antal,
    aip_omsaetning,
    apotekskode,
    salgsdato,
    salgsperiode,
    dlibruger_id,
    salgsbatch_id,
    sygehuskode,
    afvist,
    indsat,
    updateret,
    registreringsdato
    FROM salgsbuffere
    WHERE 1 = 2'
    -- create c_number_of_rows empty rows
    FOR i IN 1 .. c_number_of_rows
    LOOP
    apex_collection.add_member (p_collection_name => c_coll_name,
    p_c001 => ' ',
    /** vare nr*/
    p_c002 => ' ',
    /** antal */
    p_c003 => ' ',
    /** aip_omsaetning*/
    p_c004 => ' ',
    /** apotekskode */
    p_c005 => NULL,
    /** salgsdato*/
    p_c006 => ' ',
    /** salgsperiode */
    p_c007 => ' ',
    /** dlibruger_id*/
    p_c008 => ' ',
    /** salgsbatch_id*/
    p_c009 => ' ',
    /** sygehuskode*/
    p_c010 => ' ',
    /** afvist*/
    p_c011 => ' ',
    /** indsat*/
    p_c012 => ' ',
    /** updateret*/
    p_c013 => NULL
    /** registrerings dato*/
    END LOOP;
    -- the empty collection is set to unchanged
    apex_collection.reset_collection_changed (c_coll_name);
    END IF;
    END;
    /** before header process stop**/
    i've made a on submit and before computation process that populates the collection with the values that i input in the updatable rport region on my page, and it works just fine:
    /** on submit and before computation start**/
    /* Formatted on 2008/06/11 09:37 (Formatter Plus v4.8.8) */
    DECLARE
    c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
    c_row_count CONSTANT NUMBER := 20;
    v_member_count NUMBER;
    BEGIN
    IF apex_collection.collection_exists (c_coll_name)
    THEN
    FOR i IN 1 .. apex_collection.collection_member_count (c_coll_name)
    LOOP
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 1,
    p_attr_value => apex_application.g_f01
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 2,
    p_attr_value => apex_application.g_f02
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 3,
    p_attr_value => apex_application.g_f03
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 4,
    p_attr_value => apex_application.g_f04
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 5,
    p_attr_value => apex_application.g_f05
    (i)
    END LOOP;
    END IF;
    END;
    /** on submit and before computation start**/

  • Facing problem while using Thread analyzer in Sunstudio 12

    Hello all
    I am new in Sunstudio 12. I am using Linux RedHat enterprise 5 (*Hardware configuration: Intel Pentium 4 , 2.40GHz, 1GB RAM*)
    I am trying run a sample program for deadlock detection as described in [http://docs.sun.com/app/docs/doc/820-0619/6ncbk8g78?a=view|http://docs.sun.com/app/docs/doc/820-0619/6ncbk8g78?a=view]
    I used the following commands:
    *./cc din_Philo.c -mt -g*
    *./collect -r deadlock a.out*
    But I got the following message:
    WARNING: Linux-32-bit, 1 CPUs, RH_Server_5 system localhost is not supported by the Performance tools.
    WARNING: Data collection may fail: system is not properly configured or is unsupported.
    Creating experiment database tha.1.er ...
    execvp of a.out failed: No such file or directory
    What is the problem?? Is it related to operating system?? or Is it related hardware??
    Any idea??
    Thanks in advance
    Nasif

    Sun Studio 12 is supported on RedHat Enterprise 4, but you have version 5. So yes, it is related to the operating system.
    Some (or even all) components on Sun Studio might work on an unsupported system, but they are not guaranteed to and besides, might fail in some situations. Collector and dbx are most OS-sensitive components on Sun Studio, so I'd expect you are likely to run into compatibility problems when using collector on RHat 5.
    From the other hand, your immediate problem might not be related to OS compatibility. It looks like the system simply refuses to look for a.out in current directory.
    Try changing the second command to
    ./collect -r deadlock ./a.out(BTW, do you really keep a.out inside Sun Studio's installation directory? It must be really inconvenient as you might accidentally delete some parts of Sun Studio instead of your build's scratch files).

  • I am going to buy unlocked iphone 5.. i will be going to india nxt months and will stay there for a while... so my question is will i get warrenty in india.. and will there be any problem with using indian sims..?? thnx for the help..

    i am going to buy unlocked iphone 5.. i will be going to india nxt months and will stay there for a while... so my question is will i get warrenty in india.. and will there be any problem with using indian sims..?? thnx for the help..

    The warranty for the iPhone is not and has never been International.
    Warranty and support are ONLY valid in the country of origin.  The only exception is the EU where the entire EU is treated as one country.
    If the device will be used in India, buy it in India.
    An unlocked iPhone will work on any supported GSM carrier world wide.  The LTE portion of a US purchased, unlocked iPhone is unlikely to work outside North America as it does not support the appropriate bands used in other countries.

  • Problem on using Crystal Report Viewer on windows application ("specified type is not valid ")

    Hi
    I am having problem on using Crystal Report Viewer on one of my windows application.
    I am not sure how to put the Crystal Report Viewer 11 Control onto the tool box.
    I could found a Crystal Report Viewer control on my computer, but it is version 8.5.
    I have also found another one which is Called Crytal ActiveX Report Viewer, i don't think it is the one I can use. As when I try to load a dummy report on to the Crytal ActiveX Report Viewer, It return an error. "specified type is not valid"
    Please see the Code sample below.
    private sub loadReport()
         Dim r as New ReportDocument
         'v is the name of the Crystal ActiveX Report Viewer Control
         r.Load("C:\Report1.rtp")
         v.ReportSource(r) <---It throw error on this line.
    End Sub
    Could you give me some advice about what have I done wrong, How to check if I have set up the Crystal Report Component correctly in my Visual Studio 2005 Standard edition.
    Thanks in advances.
    Many thanks
    Chi

    VS 2005 Standard and Express editions do not come with Crystal Reports; only the Professional and higher editions will have CR bundled. However, I believe you can purchase CR XI R2 Developer and it will give you the components you need to create a VS .NET 2005 application using the Standard edition.
    -MJ

  • Problem in using FM SELECT_TEXT

    Hi friends,
    I have a problem in using fm SELECT_TEXT.
    Here I want to fetch Material PO text in Material master to my report.
    I just dont know in which field of table "it_thead" the actual text is available.\
    I tried debugging the program but was not successful.
    I have also tried using READ_TEXT but it gives an error if no Text exists.
        CALL FUNCTION 'SELECT_TEXT'
          EXPORTING
            client     = sy-mandt
            object     = 'MATERIAL'
            name       = wrk_matnr
            id         = 'BEST'
            language   = sy-langu
          TABLES
            selections = it_thead.
    How do i print the actual MAterial PO text in IT_THEAD ?
    hope u understand the question...please do let me know if any details are required from myside..

    Hi,
    My mistake.
    Check below sample code.
    PARAMETERS: po_matnr TYPE mara-matnr.
    DATA: i_lines TYPE STANDARD TABLE OF tline,
          wa_lines TYPE tline,
          l_matnr TYPE thead-tdname.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = po_matnr
    IMPORTING
       OUTPUT        = po_matnr
    MOVE po_matnr TO l_matnr.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        ID                            = 'BEST'
        LANGUAGE                      = sy-langu
        NAME                          = l_matnr              "Pass material with leading zeros
        OBJECT                        = 'MATERIAL'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
      TABLES
        LINES                         = i_lines
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT i_lines INTO wa_lines.
      WRITE: /1 wa_lines-tdline.
    ENDLOOP.
    Just execute this code by inputting ur material number.
    If the text doesnot exist the error u r getting because of not commenting the MESSAGE statement after FM call. Try in the way i told above.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Feb 28, 2009 4:36 PM

Maybe you are looking for

  • 1 Gig Ram upgrade on a Satellite A60-302

    Hi there, 1st time user here I bought a Sodimm DDR 333mhz 1gig ram card for my Satellite A60-302 and installed it today - but with no luck The notebook turns on but the screen stays black and then the notebook turns itself off, it's also emitted a co

  • Run Oracle VM Manager in VMware VM??

    Yes, I know it's sounds a little clugy but that is what my customer is asking. They do not want to provision another physical server simply to be the VM Manager. Is it supported to install the Oracle VM Manager inside of a VMware virtual machine?

  • Subject Areas are inaccessible in OBIEE 11g

    Hi, We are facing a peculiar issue in our OBIEE environment. Some times when we update RPD in online mode and check in the changes, other developers are not able to access few Subject Areas though they have Read access for Everyone group. Today we fa

  • How can i make playlists with only music and no videos?

    I would love to be able to make a playlist that only has music so I can figure out exactly how much I have in there and also be able to put it on my older iPod.

  • Barcode not getting printed from web dynpro

    Hi, We have a smnart form with bar code. When we test it from GUI, it is diplaying the bar code and also printing the bar code successfully. However when we show the same smart form in webd ynpro as PDF,  Bar code is getting displayed but when we pri