Fetch records where there is increase in Total_Sales.

I have table like :-
Year Month Total_sales
2001     1     50000
2001     2     50000
2001     3     50000
2001 4     50000
2001     5     60000
2001     6     70000
2001     8     80000
2001     7     70000
I need the output like
Year Month Total_sales
2001     1     50000
2001     5     60000
2001     6     70000
2001     8     80000
It means, I want only those records where there is increase in Total_Sales.

SQL> With Data As
  2  (Select 2001 Year, 1 Month,  50000 Total_Sales From Dual Union All
  3  Select 2001, 2, 50000 From Dual Union All
  4  Select 2001 ,3, 50000 From Dual Union All
  5  Select 2001, 4, 50000 From Dual Union All
  6  Select 2001, 5, 60000 From Dual Union All
  7  Select 2001, 6, 70000 From Dual Union All
  8  Select 2001, 8, 80000 From Dual Union All
  9  Select 2001, 7, 70000 From Dual
10  )
11  Select * From (
12                 Select Year,
13                        Month,
14                        Case
15                        When Row_Number() Over(Order By Month) = 1 Then
16                        Total_Sales
17                        When (Lag(Total_Sales,1,Total_Sales) Over (Order By Total_Sales) < Total_Sales) Then
18                                                             Total_Sales
19                                                             Else
20                                                             Null
21                                                             End
22                        Total_Sales
23                                                      From Data
24                                                      )
25  where total_sales is not null;
      YEAR      MONTH TOTAL_SALES
      2001          1       50000
      2001          5       60000
      2001          6       70000
      2001          8       80000
SQL>

Similar Messages

  • Fetching records 21 to 30

    Hi All,
    I have a table and i want to fetch records where rownum>20 and rownum<31(i.e records from 21 to 30).
    What will be sql query for this.Kindly suggest.
    Thanks,
    Vineet

    For what its worth I'll throw in my 2 cents. I see this question a lot on forums.
    In a relational DB like Oracle, row numbers dont really have much significance. If you query the table, there is no guarantee Oracle will return the results in the order you loaded them in.
    So what may be in rows 21-30 now could change tomorrow if you added or deleted more rows. If you wanted say the top 10 records (based on a specific condition) that would be one thing.
    There must be some criteria for wanting to pull back only those rows. Instead of naming the rows specifically, you should look into setting a condition in your WHERE clause which pulls back those records.
    In Oracle, if you are going to explicity name rownums, you better have an ORDER BY clause, or you will not be guaranteed of any actual order.
    Personally speaking, using rownum as criteria except for a TOP N query is not great practice.
    Hope that helps!

  • Crystal Reports Displaying records where field 1 is populated but field 2 is empty

    i have 3 fields in my report.
    Job id, date on hold, date off hold
    I need to display records where there is a value for on hold but where off hold is blank so I can see which jobs are still on hold. How do i do this?
    thanks in advance

    Have you tried adding criteria of:
    Not IsNull() and
    IsNull()?
    Alastair

  • Time out error while fetching records from table BKPF

    Hi,
    I am fetching records from table BKPF using BUKRS & AWKEY in where clause. Query is as follows:
        SELECT BELNR  XBLNR  AWKEY
        FROM   BKPF
        INTO TABLE L_I_BKPF_TEMP
        PACKAGE SIZE 500
        WHERE BUKRS LIKE L_C_EG
        AND   AWKEY IN L_R_AWKEY .
          APPEND LINES OF L_I_BKPF_TEMP TO I_BKPF .
        ENDSELECT .
    Program is giving time out error. There are 25628 records in range L_R_AWKEY , i m fetching 500 records at a time using  PACKAGE SIZE. But the execution of prog stops on this query.
    Please suggest something to overcome this problem.

    Hi
    Rui is right,
    if you need to get the data by  operation parameters u have to use the fields AWTYP and AWKEY.
    In this selection u can omit the company code.
    SELECT BELNR XBLNR AWKEY FROM BKPF
           INTO TABLE L_I_BKPF_TEMP
                 PACKAGE SIZE 500
                      WHERE   AWTYP = <......> "<------------
                             AND AWKEY IN L_R_AWKEY .
           APPEND LINES OF L_I_BKPF_TEMP TO I_BKPF .
    ENDSELECT .
    Max

  • List Of Value not fetching records

    I have a ViewObject (VO1) with a ListOfValue that points to a ViewObject (VO2), and fetches records from VO2. There is no ViewCriteria added on VO2.
    When testing in the BC tester, the LOV works fine. Both on editing a row in VO1, and when creating a row in VO1.
    Using the LOV in a jspx page, the LOV works fine when editing a row in VO1. But when I'm creating a new row in the jspx page, the LOV doesn't fetch any records. Just an empty list.
    I can't figure out what is wrong, or why it doesn't work. I have created several LOV all working like a charm, but this one is making me tear my hair out.
    Anyone else experienced a similar scenario where a LOV only works upon editing a row?
    Any ideas what can be wrong?
    (I am using JDeveloper 11.1.1.5.0 - Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013 - Running on a Windows 7 64bit)
    Edited by: hogni89 on May 3, 2012 4:01 AM

    The SOC on the jspx page:
    <af:selectOneChoice value="#{row.bindings.IdSosBasGrantType.inputValue}"
    label="#{row.bindings.IdSosBasGrantType.label}"
    required="#{bindings.SosBasCaseGrantPerCaseType.hints.IdSosBasGrantType.mandatory}"
    shortDesc="#{bindings.SosBasCaseGrantPerCaseType.hints.IdSosBasGrantType.tooltip}"
    id="soc12" autoSubmit="true">
    <f:selectItems value="#{row.bindings.IdSosBasGrantType.items}" id="si11"/>
    </af:selectOneChoice>
    The iterator binding:
    <tree IterBinding="SosBasCaseGrantPerCaseTypeIterator" id="SosBasCaseGrantPerCaseType">
    <nodeDefinition DefName="fo.att.alm.sos.model.bas.views.SosBasCaseGrantVO" Name="SosBasCaseGrantPerCaseType0">
    <AttrNames>
    <Item Value="Seq"/>
    <Item Value="IdSosBasGrantType"/>
    <Item Value="IdSosBasGrantVariant"/>
    <Item Value="RuleType"/>
    <Item Value="Status"/>
    <Item Value="IdAplCfgPartyType"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    The ViewAttribute:
    <ViewAttribute
    Name="IdSosBasGrantType"
    LOVName="LOV_IdSosBasGrantType"
    IsUnique="true"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="IdSosBasGrantType"
    EntityUsage="SosBasCaseGrantEO"
    AliasName="ID_SOS_BAS_GRANT_TYPE">
    <Properties>
    <SchemaBasedProperties>
    <CONTROLTYPE
    Value="choice"/>
    </SchemaBasedProperties>
    </Properties>
    </ViewAttribute>
    The ListBinding:
    <ListBinding
    Name="LOV_IdSosBasGrantType"
    ListVOName="SosBasGrantTypeUsgLOV"
    ListRangeSize="-1"
    NullValueFlag="none"
    NullValueId="LOV_IdSosBasGrantType_LOVUIHints_NullValueId"
    MRUCount="0">
    <AttrArray Name="AttrNames">
    <Item Value="IdSosBasGrantType"/>
    </AttrArray>
    <AttrArray Name="ListAttrNames">
    <Item Value="GrantTypeId"/>
    </AttrArray>
    <AttrArray Name="ListDisplayAttrNames">
    <Item Value="ObjectTypeDisplayName"/>
    </AttrArray>
    <DisplayCriteria/>
    </ListBinding>
    The ViewAccessor
    <ViewAccessor
    Name="SosBasGrantTypeUsgLOV"
    ViewObjectName="fo.att.alm.sos.model.bas.views.SosBasGrantTypeUsgRO"
    RowLevelBinds="true"/>

  • How to fetch records between two seq uence numbers?

    We have thousands of records with seq uence numbers in the oracle database, we need to retrieve a number of records between two seq uence numbers, i.e. to retrieve records between 100 and 200 seq uence numbers. Could some one help me to find a query to fetch records.
    I'll be waiting for your response..
    Edited by: sumant on Jul 27, 2010 12:42 PM

    Is this is what you are looking for?
    SQL> create table tab1 (id number);
    Table created.
    SQL> insert into tab1 values (1);
    1 row created.
    SQL> insert into tab1 values (2);
    1 row created.
    SQL> insert into tab1 values (3);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from tab1;
            ID
             1
             2
             3
    SQL> select round(dbms_random.value(max(id)+1,max(id)+50)) random_number
      2  from tab1;
    RANDOM_NUMBER
               43
    SQL> select round(dbms_random.value(max(id)+1,max(id)+50)) random_number
      2  from tab1;
    RANDOM_NUMBER
               39
    SQL> select round(dbms_random.value(max(id)+1,max(id)+50)) random_number
      2  from tab1;
    RANDOM_NUMBER
               13 This will generate a random number that will be greater then the maximum value in the table and lower then the maxvalue + 50. Having the range starting from maxvalue in the table you will never get a number generated which already exists in the table.
    As you see in the above number genrated they are all between 4 and 53.
    If you want to increase the range from where the number are generated just increase the value 50 that I used in the query.

  • Fetching record from table and displaying in JSP while loading page -struts

    Hi all,
    I have a problem relating to struts .
    I am fetching records from database and I want to diaplay those records in corresponding fields in the jsp page.
    I am using Struts MVC Framework.
    I am giving the sample code below.
    In my action class i am giving the following code.
    String sql="Select empname from emp where empcode='1' ";
    ResultSet rs=S.executeQuery(sql);
    if(rs.next()){
    EditForm e=new EditForm();
    e.setEmpname(rs.getString(1));
    In my Action Form
    I gave setter and getter methods for Empname
    public String getEmpname() {
    return empname;
    public void setEmpname(String empname) {
    this.empname = empname;
    In my jsp gave
    <html:form method="POST" action="submitForm.do?action=1" >
    <html:text property="empname" />
    </html:form>
    The targets given are correct and it is being redirected.
    But the value is not displaying in the textbox while the jsp is loading.
    There is a record for the sql query.
    Anybody please help me out
    It is very urgent
    Thank You
    Parvathy

    Now in the following code, why are u creating a new form?
    Why dont you use the form which is input to the Action Class's execute methof?
    if(rs.next()){
    EditForm e=new EditForm();
    e.setEmpname(rs.getString(1));
    }Thanks and regards,
    Pazhanikanthan. P

  • Cycle recording, where is take 1,2,3

    when I use "cycle" to do the recording,
    where is the function/button that i should click in order to see
    "take 1, take 2, take 3" so
    can choose the one to listen, or the ones i'll delete
    thanks

    Hi,
    at the beginning of a multitake region, there should be a small triangle you can click on. And at the end of the region, there is another triangle inside a small circle.
    The left one is to expand the region so that you can see all the takes (and can do quick swipe comping). The right triangle opens a menu where you can perform some tasks (i.E.: Select a specific take, reduce the takes to the current comp and so on)
    Cheers,
    Fox

  • How to fetch records from the database into a combo box?

    Hi:
    I&acute;m really new with ABLBPM and I&acute;m trying to fetch records from the database to display them into a combo box as valid values for a presentation but I&acute;m using a dynamic method with this code:
    <em>for each row in SELECT campo1, campo2 from TABLE</em>
    <em>do</em>
    <em>solicitudes[] = [row.campo1, row.campo2]</em>
    <em>end</em>
    <em>return solicitudes
    </em>And the debugger says that SQL instructions can be used only in fuctions and procedures that are executed on the server.
    Do you know another way to do it?
    P.D. Sorry for my terrible english
    Greetings

    Hi Steve,
    Thank you, your idea is perfect, but when I try to run the screenflow where the combo should be filled I get this error:
    fuego.lang.ComponentExecutionException: No se ha podido ejecutar correctamente la tarea.
    Motivo: 'java.lang.NullPointerException'.
         at fuego.web.execution.InteractiveExecution.setExecutionError(InteractiveExecution.java:307)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:166)
         at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
         at fuego.webdebugger.servlet.DebuggerServlet.redirect(DebuggerServlet.java:136)
         at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:85)
         at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
         at fuego.web.execution.servlet.ServletExternalContext.processAction(ServletExternalContext.java:110)
         at fuego.webdebugger.servlet.DebuggerExecution.dispatchComponentExecution(DebuggerExecution.java:64)
         at fuego.web.execution.InteractiveExecution.invokePrepare(InteractiveExecution.java:351)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:192)
         at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
         at fuego.webdebugger.servlet.DebuggerServlet.doDebug(DebuggerServlet.java:148)
         at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:82)
         at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    Any ideas??
    Thanks and greetings

  • Pulling records where number of records for unique ID = 6

    I have a table that contains address information for everyone in the system. It has numerous fields, though I've only included a few in the create table query below for the sake of brevity. The PIDM uniquely identifies each record as belonging to a particular person in the database. A person can have multiple addresses in the table, though we normally do not allow them to have more than one active address of a particular ATYP_CODE. Again, I am doing this here for the sake of brevity. What I need to do is pull all the records for each PIDM, but only where there are >= 6 records per PIDM. The user doesn't care if the data are pivoted (I can do that part if needed). Pulling the actual data isn't the issue. I just need a little help figuring out how to get only the records of PIDMs with six or more records in the table. So, from the example data below, the records for PIDM 12345 and 34567 are the ones that should be in the output, but the ones from PIDM 23456 should not.
    DROP TABLE SPRADDR;
    CREATE TABLE SPRADDR
    (PIDM              NUMBER(8),
    ATYP_CODE     VARCHAR2(2 CHAR),
    STREETLINE1   VARCHAR2(60 CHAR),
    CITY              VARCHAR2(60 CHAR),
    STATE              VARCHAR2(2 CHAR),
    ZIP              VARCHAR2(10));
    INSERT INTO SPRADDR VALUES (12345,'PR','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (12345,'MA','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (12345,'BU','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (12345,'PR','2 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (12345,'MA','3 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (12345,'PR','4 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (23456,'PR','1 MAIN','KENT','OH','44240');
    INSERT INTO SPRADDR VALUES (23456,'MA','1 MAIN','KENT','OH','44240');
    INSERT INTO SPRADDR VALUES (23456,'BU','1 MAIN','KENT','OH','44240');
    INSERT INTO SPRADDR VALUES (34567,'PR','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'MA','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'BU','1 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'PR','2 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'MA','3 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'PR','4 MAIN','CANFIELD','OH','44406');
    INSERT INTO SPRADDR VALUES (34567,'PR','6 MAIN','CANFIELD','OH','44406');
    COMMIT;I'd greatly appreciate any help you might be able to provide. I'm sure this is easy, but what I've done so far has not worked and I'm not including the code I tried because it's totally cockeyed and not working at all.
    Thanks,
    Michelle Craig
    Data Coordinator
    Admissions Operations and Transfer Systems
    Kent State University

    PIDM 12345 and 34567 are the ones that should.Why 12345? It is repeated 6 times where you asked for > 6. Anyway:
    SQL> select  *
      2    from  (
      3           select  s.*,
      4                   count(*) over(partition by pidm) cnt
      5             from  spraddr s
      6          )
      7    where cnt > 6
      8    order by pidm
      9  /
          PIDM AT STREETLINE1     CITY                 ST ZIP               CNT
         34567 PR 1 MAIN          CANFIELD             OH 44406               7
         34567 MA 1 MAIN          CANFIELD             OH 44406               7
         34567 BU 1 MAIN          CANFIELD             OH 44406               7
         34567 PR 2 MAIN          CANFIELD             OH 44406               7
         34567 MA 3 MAIN          CANFIELD             OH 44406               7
         34567 PR 4 MAIN          CANFIELD             OH 44406               7
         34567 PR 6 MAIN          CANFIELD             OH 44406               7
    7 rows selected.
    SQL> select  *
      2    from  (
      3           select  s.*,
      4                   count(*) over(partition by pidm) cnt
      5             from  spraddr s
      6          )
      7    where cnt >= 6
      8    order by pidm
      9  /
          PIDM AT STREETLINE1     CITY                 ST ZIP               CNT
         12345 PR 1 MAIN          CANFIELD             OH 44406               6
         12345 MA 1 MAIN          CANFIELD             OH 44406               6
         12345 BU 1 MAIN          CANFIELD             OH 44406               6
         12345 PR 2 MAIN          CANFIELD             OH 44406               6
         12345 MA 3 MAIN          CANFIELD             OH 44406               6
         12345 PR 4 MAIN          CANFIELD             OH 44406               6
         34567 PR 1 MAIN          CANFIELD             OH 44406               7
         34567 MA 1 MAIN          CANFIELD             OH 44406               7
          PIDM AT STREETLINE1     CITY                 ST ZIP               CNT
         34567 BU 1 MAIN          CANFIELD             OH 44406               7
         34567 PR 2 MAIN          CANFIELD             OH 44406               7
         34567 MA 3 MAIN          CANFIELD             OH 44406               7
         34567 PR 4 MAIN          CANFIELD             OH 44406               7
         34567 PR 6 MAIN          CANFIELD             OH 44406               7
    13 rows selected.
    SQL>  SY.
    Edited by: Solomon Yakobson on May 10, 2012 10:02 AM

  • Sender JDBC Adapter : Fetch records from multiple tables

    Hi Friends,
    I am using sender JDBC adapter to select few records from DB2 database table.
    This scenario is working fine.
    Now my requirement is to fetch records from 3 tables. These table are independent to each other. There is no primary key or foreign key.
    Please let me know how to write the sql in sender JDBC adapter to fetch records from these 3 tables.
    Thanks,
    Sandeep Maurya

    hi sandeep...
    if the tables are completely independent and do not share any primary / foreign key relation ship...
    why dont u think towards creating a seperate interface for each of them..
    or if u still want to select from multiple table at once..the best way would be to write a stored procedure on the sender side which do all the fetching n processing and pass the final resultset to PI
    or u can think towards fetching the data from 1 table and then in UDF do lookup from other tables..which again is tricky and performace intensive

  • JDBC Sender Adapter - NOT FETCHING RECORDS...

    Hello Experts,
    I know this was answered in a separate thread (JDBC Sender Adapter -  NOT FETCHING RECORDS -PROCESSING STARTED).
    However, my question is, Is there a way that we can be notified if a channel has stopped fetching records?
    or is there a reporting tool that can be used to check/monitor if a channel is not processing any messages?
    Thanks & Kregards,
    allar

    Hi Sreedhar,
    Thanks for your reply.
    These case is not being captured by our alert configuration because its not throwing any error.
    in the communication channel monitoring, we see only something like this..:
    3/16/09 8:25:19 PM Processing started
    3/16/09 8:34:20 PM Processing started
    3/16/09 8:33:55 PM Processing started
    3/16/09 8:32:54 PM Processing started
    but no error is being displayed nor sent.
    Also, there was a case that the channel just stopped fetching, even though everything is active.
    example log:
            3/12/09 8:32:54 PM Processing started
    We're looking for ways on how we can trap these scenarios as early as possible,  get us notified and   perform adapter-lock release when needed.
    Regards,
    allar

  • How can i fetch records from 3 tables in a single query  without using join

    Hi.
    Can any body please tell me <b>How can i fetch records from 3 tables with a single query  without using joins</b>
    Thanx
    prabhudutta

    Hi Prabgudutta,
    We can fetch the data by using the views concept.
    Go throuth this info we can know the how to create view and same like database table only we can fetch the data.
    Views conatin the data at runtime only.
    Four different view types are supported. These differ in the
    way in which the view is implemented and in the methods
    permitted for accessing the view data.
    Database views are implemented with an equivalent view on
    the database.
    Projection views are used to hide fields of a table (only
    projection).
    Help views can be used as selection method in search helps.
    Maintenance views permit you to maintain the data
    distributed
    on several tables for one application object at one time.
    step by step creation of Maintenance view:
    With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
    It can be set in transaction SE11 - Tools - Table maintenance generator.
    Table maintanance Generator is used to manually input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under attributes tab
    2) utilities-table maintanance Generator-> create function group and assign it under
    function group input box. Also assign authorization group default &NC& .
    3) select standard recording routine radio in table table mainitainence generator to move table
    contents to quality and production by assigning it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers this dialog box appears when you click on create button
    6) save and activate table
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    SM30 is used for table maintenance(addition or deletion of records),
    For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
    Sm30 is used to maintain the table ,i.e to delete ,insert or modify the field values and all..
    It creates the maintenance screen for u for the aprticular table as the maintenance is not allowed for the table..
    In the SE11 delivery and maintenance tab, keep the maintenance allowed..
    Then come to the SM30 and then enter the table name and press maintain..,
    Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
    Then create,,,
    Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
    We use SM30 transaction for entering values into any DB table.
    First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
    Then it will create a View.
    After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
    Hope this resolves your query.
    Reward all the helpful answers.
    Rgds,
    P.Naganjana Reddy

  • Writing OR query for fetching records

    Hi,
    I have dowloaded a custom wsdl and generated a java client from it using Jdeveloper.
    I have a method named customObject1QueryPage(QueryInputObj) which is used to query the CRM oD to fetch records.
    I have successfully queried using the above method for one condition:-
    QueryInputObj param= new QueryInputObj();
    QueryType q = new QueryType();
    q.set_value("='" + "ABC'");
    //q.set_value("LIKE 'A*'");
    param.setAccountName(q);
    customObject1QueryPage(param);
    But now I want to query using "OR" condition with multiple names in the condition and I don't know how to
    write query for that.
    SQL query would be like "Select * from table where name='ABC' OR name='PQR' OR name ='XYZ' ";
    I want to execute same query for CRM oD but have no idea how to write it.
    Can somebody please help me as soon as possible.
    Thanks.

    Hi,
    If your intent to Use OR Condition on a field with multiple Values
    say, AccountName = 'xyz' OR AccountName= 'abc' the syntax would be *(='xyz') OR (='abc')*
    say, AccountName = 'xyz' OR AccountName= 'abc' OR AccountName = 'pqr' the syntax would be *((='xyz') OR (='abc'))OR(='pqr')*
    You can find similar example under On Demand Web Service Documentation
    Regards
    Deepak H Andeli

  • How to fetch records with two recordset

    i want fetch records from the table using two recordset like
    ResultSet r1=stmt.executeQuery("select * from pf_data");
    i want to take another recodeset
    ResultSet r2=stmt.executeQuery("select * from finyr");
    I am using Microsoft SQL server as my database.
    I am also closing the recordset like r1.close();
    then i cannot take two recordset at the same time.

    Hi,
    This is an example of a Top-N problem, and here's one way to do it:
    WITH got_r_num AS
        SELECT  item_id, supp_id, rnk                         -- RANK is not a good column name
        ,       DENSE_RANK () OVER ( PARTITION BY  item_id    -- Just guessing
                                     ORDER BY      rnk
                                   )  AS r_num
        FROM    table_x
        WHERE   item_id  = 2      -- If desired
    SELECT    item_id, supp_id. rnk
    FROM      got_r_num
    WHERE     r_num    <= 2
    RANK is the name of a built-in function in Oracle, so it will cause lots of trouble if you use it as a column name.  (The RANK function is closely related to DENSE_RANK, used above.)
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Point out where the query above is giving the wrong results, and explain, using specific examples, how you get the correct results from the given data in those places.  If you changed the query at all, post your code.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • How can I operate Reader X in "Kiosk" mode?

    What I need to do: Open a single document via a command line reference and "lock" Reader from being able to go anywhere else. Initially opening the document is easy enough...just supply the complete pathname to the file on the command line.   I will

  • Why isn't the verification email coming in?

    I have been waiting for the verification email on a Apple ID, and after several requests for the email to be sent, it does not come in. I can reset the password, but not verify the ID.

  • Access problem in bpel console

    I have bpel pm 10.1.2 and os is win2k. My problem is te list of domains is empty, and with no domain I am not able to login. I read some threads that said to install oracle db, but I am using mysql, and don't need a oracle database. Should I install

  • Issue with online ordering

    Well this is going to be a bit long given my issue. I've got a family member who is willing to pay full retail to upgrade their phone and we were going to place the order online and pick it up at the store since the store is listed as having in-store

  • Overdelivery tolerance - extended classic

    Hi all, We have extended classic scenario, and would like to have overdelivery tolerance.  I've created a tolerance group in SRM, and assigned tol keys CF, DA and DQ.  I've also maintained a Purchasing Value Key in ECC via OMQW (SPRO --> MM --> Purch