Urgent query

I have table Like
contract_ref_no contract_type realized_internal_gmr_ref_no
53909-P P GMR-3584
102585-S S GMR-3584
51289-p p GMR-1869
104586-S S GMR-1869
57182-P P GMR-2890
102588-S S GMR-2890
I want to display order depending on purchase order(contract_ref_no) with corresponding sales order.
output:
51289-p p GMR-1869
104586-S S GMR-1869
53909-P P GMR-3584
102585-S S GMR-3584
57182-P P GMR-2890
102588-S S GMR-2890

You've even posted your question already in the wrong forum: query
And you've already asked the question here: query help
for which you've already had replies.
Duplicating your question just causes confusion and p!sses people off.
Why don't you answer the question you've been asked on the other thread? Tell people what's wrong so they can help you.

Similar Messages

  • Urgent query JDBC on linux

    I have an urgent query . I have written a java code on microsoft platform that talks with SQL server 2000 hosted on windows200 machine in a network using JDBCODBC driver wothou using a Data source name.
    But this same code when i try to run on mandrake linux throws an exception as
    java.sql.SQLException: [unixODBC] [Driver Manager] Data source name not found,
    and no default driver specified.

    MS provides a JDBC driver for MSSQL 2000, go to there site and download it.

  • Urgent query about copying array of objects to html item

    I have an urgent query about how I can display an array of objects on a html form. The only suitable html item I can see for this is a drop down box. Ideally a combo box would be preferable but I cant find anything like this. Basically the display item needs to contain 3 columns of data and has to display a number of rows. Can anyone tell me how to copy the array of values into a drop down box?

    Here is all the code from my jsp. It keeps returning null:
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page import="java.util.*, java.lang.*" %>
    <html:html locale="true">
    <head>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"/>
    <link rel="stylesheet" type="text/css" name="timesheet" href="stylesheets/timesheet.css"></link>
    <script type="text/javascript" language="javascript" src="javascript/sum.js"></script>
    <title><bean:message key="eng.title"/></title>
    <html:base/>
    </head>
    <body bgcolor="white">
    <table border="0" width="100%">
    <tr>
    <td width="30%"><html:img page="/images/PwC_logo.gif"/></td>
    <td width="40%" class="applicationTitleCell">
    <div align="center">
    <bean:message key="application.title"/>
    </div>
    </td>
    <td width="30%"> </td>
    </tr>
    </table>
    <center>
    <html:form action="/selectEng" focus="engSearchNumber">
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="20%" align="center"> <b> <bean:message key="eng.prompt.engSearchNumber"/> </b> </td>
    <td width="20%" align="center"> <b> <bean:message key="eng.prompt.clientSearchName"/> </b> </td>
    <td width="40%">   </td>
    </tr>
    <tr>
    <td width="30%"></td>
    <td width="20%" align="center"> <html:text property="engSearchNumber" size="20" maxlength="9" onchange='<%= "SearchLength(this)" %>' onkeypress="return NumberOnly()" /> </td>
    <td width="20%" align="center"> <html:text property="clientSearchName" size="20" maxlength="20" onchange='<%= "SearchLength(this)" %>'/> </td>
    <td width="30%">   </td>
    </tr>
    </table>
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><html:image property="findButton" src="images/Find.gif" alt="Find"/></td>
    <td width="30%">   </td>
    </tr>
    <jsp:useBean id="selectEngForm" scope="session" class="Time.SelectEngForm" />
    <% if (selectEngForm.getEngSearchNumber() != null) { %>
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><select name="engListing" size="5">
    <%= selectEngForm.getEngListing() %>
    </select></td>
    <td width="30%">   </td>
    </tr>
    <% } else if (selectEngForm.getClientSearchName()!=null){ %>
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><select name="engListing" size="5">
    <%= selectEngForm.getEngListing()%>
    </select></td>
    <td width="30%">   </td>
    </tr>
    <% } %>
    <%=request.getParameter("engListing")%>
    </table>
    <br><br>
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="11%" align="center"> <html:image property="addButton" src="images/Add.gif" alt="Add the selected engagement to the timesheet"/> </td>
    <td width="11%" align="center"> <html:image property="cancelButton" src="images/Cancel.gif" alt="Cancel"/> </td>
    <td width="30%">   </td>
    </tr>
    </table>
    </html:form>
    </center>
    <br>
    <center><html:link forward="timesheet"> <html:img src="images/Back.gif" border="0"/> </html:link></center>
    </body>
    </html:html>

  • URGENT - Query to get employes with multiple cost center

    Hello,
    The sample data for my requirement is:
    create table a
    (year     number(4),
    month      number(2),
    empno number(5),
    cost_center number(3)
    insert into a values(2003, 10, 1034, 102);
    insert into a values(2003, 10, 1034, 102);
    insert into a values(2003, 10, 1034, 102);
    insert into a values(2003, 10, 1034, 103);
    insert into a values(2003, 10, 1034, 103);
    insert into a values(2003, 10, 1039, 102);
    insert into a values(2003, 10, 1039, 102);
    insert into a values(2003, 10, 1070, 102);
    insert into a values(2003, 10, 1070, 103);
    commit;
    In the above sample data, empno 1034 & 1070 has two different cost centers (102 & 103) whereas empno 1039 has one only cost center i.e. (102).
    Now I want a query that returns empno, cost_center with employees having more than one cost center. Considering the above sample data, the query should return empno 1034 & 1070. Empno 1039 should not appear in the query output as it has only cost center.
    The output should be something like...
    Empno cost_center
    1034 102
    1034 103
    1070 102
    1070 103
    I'll b grateful for an urgent reply.
    HASAN.

    select distinct empno, cost_center
    from a a1
    where exists (select 1 from a a2
    where a2.empno = a1.empno
    having count(distinct cost_center) > 1)
    /

  • Urgent query related to execute immediate in a  procedure.

    hi,
    I want to create a table in the production database,within a procedure so I write query like:
    CREATE OR REPLACE PROCEDURE TEST
    IS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE PE.BUD_VS_REV AS SELECT * FROM WH.WH_BUD_VS_REVNM1';
    END;
    but this is not working within the procedure it gives the
    ORA-01031: insufficient privileges.
    I already have asked to DBA he said that this user has all previlidges.
    one more thing if I write this query in an annonymous block like:
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE PE.BUD_VS_REV AS SELECT * FROM WH.WH_BUD_VS_REVNM1';
    END;
    its working well.
    can any buddy tellme what can be the reason,actually.
    Thanx
    Ritesh!

    Look this example:
    DBA >> CREATE USER LEO IDENTIFIED BY LEO
    2 /
    User created.
    DBA >> GRANT CREATE SESSION TO LEO
    2 /
    Grant succeeded.
    LEO >> CREATE OR REPLACE PROCEDURE TEST
    2 IS
    3 BEGIN
    4 EXECUTE IMMEDIATE 'CREATE TABLE PE.BUD_VS_REV AS SELECT * FROM WH.WH_BUD_VS
    _REVNM1';
    5 END;
    6 /
    CREATE OR REPLACE PROCEDURE TEST
    ERROR at line 1:
    ORA-01031: insufficient privileges
    DBA >> GRANT CREATE ANY PROCEDURE TO LEO
    2 /
    Grant succeeded.
    LEO >> CREATE OR REPLACE PROCEDURE TEST
    2 IS
    3 BEGIN
    4 EXECUTE IMMEDIATE 'CREATE TABLE PE.BUD_VS_REV AS SELECT * FROM WH.WH_BUD_VS
    _REVNM1';
    5 END;
    6 /
    Procedure created.

  • {Urgent} Query Output

    Hi all,
    I have the following simple table. I'm using the LISTAGG function.
    The output of my query is :
    100,200,300,400,500,600
    102,302,602
    403,503
    If you notice for the id 2 and 3 there are missing data because they do not exist.
    I would like the output to be :
    100,200,300,400,500,600
    102, ,302, ,602
    , ,  ,403,503
    Thank you
    CREATE TABLE test
       id    INTEGER,
       yr    INTEGER,
       val   INTEGER
    INSERT INTO test (id, yr, val)
         VALUES (1, 2005, 100);
    INSERT INTO test (id, yr, val)
         VALUES (1, 2006, 200);
    INSERT INTO test (id, yr, val)
         VALUES (1, 2007, 300);
    INSERT INTO test (id, yr, val)
         VALUES (1, 2008, 400);
    INSERT INTO test (id, yr, val)
         VALUES (1, 2009, 500);
    INSERT INTO test (id, yr, val)
         VALUES (1, 2009, 600);
    INSERT INTO test (id, yr, val)
         VALUES (2, 2005, 102);
    INSERT INTO test (id, yr, val)
         VALUES (2, 2007, 302);
    INSERT INTO test (id, yr, val)
         VALUES (2, 2009, 602);
    INSERT INTO test (id, yr, val)
         VALUES (3, 2008, 403);
    INSERT INTO test (id, yr, val)
         VALUES (3, 2009, 503);
      SELECT LISTAGG (val, ',') WITHIN GROUP (ORDER BY yr)
        FROM test
       WHERE YR BETWEEN 2005 AND 2010
    GROUP BY id;

    Maybe NOT TESTED! LISTAGG states: Null values in the measure column are ignored.
    select listagg(decode(val,null,'_',to_char(val)),',') within group (order by yr) 
      from (select t.id,t.val,y.yr 
              from test t partition by (t.id) 
                   right join 
                   (select level + 2004 yr 
                      from dual 
                    connect by level <= 6
                   ) y 
                on y.yr = t.yr
    group by id
    Regards
    Etbin

  • An Urgent Query about ODI

    Hi,
    I have done a scenario which executes sum.sh file.This scenario is successfully executed by OraclediAgent. Now a web service(Let from bpel/soap ui) invokes this agent using agent's wsdl url (like this:-
    http://localhost:8886/oraclediagent/OdiInvoke?wsdl) and then the OraclediAgent execute the scenario. I am successful for this case too.Now my questions are:-
    *1)Is it possible to return the summation result to the invoker web service(bpel/soap ui) through odi.*
    *2)Is it possible to show the o/p(result of the summation) in odi console.*
    and my last question is:
    *3)Every time when the bpel/soap ui invokes OraclediAgent it gets session id as a return.How do I know the execution of the sum.sh file is successfully done or not wrt to invoker.(or more clear to say in weblogic console?)*
    Please ans.It's urgent
    Thanks
    Papai

    hi,
    any update??At least please tell me the reverse procedure i.e i also want to send two number from webservice to the odiOScommand so that the the sum.sh will run successfully where the odiOscommand parameter are variables not a static value.How'ii I do it?
    Please Ans.
    Thanks
    Papai

  • VERY URGENT:Query based on data passed by Button event

    Hiiiiiiiiiiii friends...
    I am new to fwk, and its very hard time to me,please help..
    I have 2 pages. On first page I am going to enter Pid, then by selecting FIND button I want to execute query for 2nd page for that Pid and get details.
    I have 2 COs.
    For calling page it is as....
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("FIND") != null)
    String PerNum = pageContext.getParameter("PersonId");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    Serializable[] parameters = { PerNum };
    am.invokeMethod("initDetails",parameters);
    pageContext.setForwardURL("OA.jsp?page=/NEW_PAGE/oracle/apps/PER/person/webui/detailsPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    and for 2nd CO i have..
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String PerNum = pageContext.getParameter("PersonId");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    Serializable[] parameters = { PerNum };
    am.invokeMethod("initDetails",parameters);
    and initquery and initDetails methods are written on VOIMPL and AMIMPL classes respectivly...
    I have used only one VO.
    but i unable to pass Pid to second page so that I get result.
    Please help me.....
    Thanks
    Message was edited by:
    Madhav_gharge
    Message was edited by:
    Madhav_gharge

    The parameters are not correct in your setForwardURL method. Use either
    public void setForwardURL(String functionName,
    byte menuContextAction,
    String menuName,
    com.sun.java.util.collections.HashMap parameters,
    boolean retainAM,
    String addBreadCrumb,
    byte messagingLevel)
    or
    public void setForwardURL(String url,
    String functionName,
    byte menuContextAction,
    String menuName,
    com.sun.java.util.collections.HashMap parameters,
    boolean retainAM,
    String addBreadCrumb,
    byte messagingLevel)
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Urgent : Query on Non cumulative cube

    Dear BI Experts,
    I have a non cumulative cube to help me report Stock Balance. It has stock entries from Jan till June,2006. When I query on the cube to report the balance as of Current Period (July,2006) it doesnot return anything. What I expected is that it would show me current stock balance (from Jan till June,2006) though my selection date is in July where there is new stock update done in July.
    I tried compression on the cubes as well but didnot change the result.
    Can anybody help.
    Kind regards,
    priyadarshi

    Hi Riccardo,
    Thanks for your very useful answer. I have "Company" , "SetOfBooks" , "Material" & "0CALDAY" in my validity table. Here For every combination I see a record in the validity table with "Fixed To Time" set with the last transaction dates for the combination. But I would like to preset the "Fixed To Time" for each record to some value like "31-12-9999" .
    Should this be possible & how ?
    Regards,
    priyadarshi

  • XML SQL Urgent Query

    I am trying to generate an XML file from a database table. I loaded the xmlparser for java into the database and executed the catxsu.sql script as indicated in the documentation. All the relevant files are in the Oracle Home. There is a sample script in the documentation and I have tried to run it from SQLplus. I set the serveroutput to on so I could see the results. The following shows the code I used and the errors. Any suggestions as to what the problem is? Thanks
    SQL> declare
    2 queryCtx DBMS_XMLquery.ctxType;
    3 result CLOB;
    4 begin
    5 queryCtx := DBMS_XMLquery.newContext('select * from emp_LOH');
    6 result := DBMS_XMLQuery.getXML(queryCtx);
    7 PrintClobOut(result);
    8 DBMS_XMLQuery.closeContext(queryCtx);
    9 end;
    10 /
    PrintClobOut(result);
    ERROR at line 7:
    ORA-06550: line 7, column 1:
    PLS-00201: identifier 'PRINTCLOBOUT' must be declared
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored

    I created the PrintClobOut procedure and now I get the following errors when I execute the code:
    SQL> declare
    2 queryCtx DBMS_XMLquery.ctxType;
    3 result CLOB;
    4 begin
    5 queryCtx := DBMS_XMLquery.newContext('select * from emp_LOH');
    6 result := DBMS_XMLQuery.getXML(queryCtx);
    7 PrintClobOut(result);
    8 DBMS_XMLQuery.closeContext(queryCtx);
    9 end;
    10 /
    declare
    ERROR at line 1:
    ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist
    ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 46
    ORA-06512: at line 5

  • Urgent query regarding performance

    hi
    i have one query regarding performance.iam using interactive reporting and workspace.
    i have all the linsence server,shared services,and Bi services and ui services and oracle9i which has metadata installed in one system(one server).data base which stores relationaldata(DB2) on another system.(i.e 2 systems in total).
    in order to increase performance i made some adjustments
    i installed hyperion BI server services, UI services,license server and shared services server such that all web applications (that used web sphere 5.1) such as shared services and UI services in server1(or computer1).and remaining linsence and bi server services in computer2 and i installed database(db2) on another computer3.(i.e 3 systems in total)
    my query : oracle 9i which has metadata where to install that in ( computer 1 or in computer 2 )
    i want to get best performance.where to install that oracle 9i which has metadata stored in it.
    for any queries please reply mail
    [email protected]
    9930120470

    You should know that executing a query is always slower the first time. Then Oracle can optimise your query and store it temporary for further executions. But passing from 3 minutes to 3 seconds, maybe your original query is really, really slow. Most of the times I only win few milliseconds. If Oracle is able to optimize it to 3 seconds. You must clearly rewrite your query.
    Things you should know to enhance your execution time : try to reduce the number of nested loops, nested loops give your an exponential execution time which is really slow :
    for rec1 in (select a from b) loop
      for  rec2 in (select c from d) loop
      end loop;
    end loop;Anything like that is bad.
    Try to avoid Cartesian products by writing the best where clause possible.
    select a.a,
             b.b
    from  a,
            b
    where b.b > 1This is bad and slow.

  • *Urgent* Query with dates

    Hi Gurus,
    I am having problem in developing such a query which has calculations with dates. The problem is:
    I have
    base date for example 26-feb-2006
    statring day: 4
    interval: 5
    input date: 15-mar-2006
    Now the problem is I want to get the results from the query which will start 26-feb-2006+4 which is 02-mar-2006 and calculate the interval which is 5 days from '02-mar-2006' and run it every 5 (interval) days
    02-mar-2006
    07-mar-2006
    12-mar-2006
    I hope I have cleared everything.
    Please let me know as soon as possible.
    Thanks in advance.
    Aqil

    Where is the base_date coming from?
    declare
    v_jobno number;
    dbms_job.submit(v_jobno, 'SCHEMA_NAME.sp_my_proc();',
    -- first time running I schedule for 11 pm staring in 4 days
                              trunc(sysdate+4)+23/24,
    -- here the interval
                              'trunc(sysdate+5)+23/24' );
    end;

  • Urgent - Query on CL

    Can I create a query on ODS(change log table) object. I want to know how to do it if it is possible.
    Thanks, Sunita

    I think, it is possible to create a query only on Active table but not on Change log table. But why do you want to create on CL table?
    Edited by: Arun Bala G on Feb 7, 2012 7:01 PM

  • HELP - Urgent Query - utf-8

    I have just started using the Oracle 11g database - with no exprience :(
    Unfortunatly i need some information. I have exprience with SQL but none with oracle Databases
    I need to urgently change a database format to UTF-8 however i can find NO option to do this despite the documentation stating you select this when creating a database.
    im using the http://XXXX/em - enterprise manager 11g
    Please can someone give me a top level overview on where i can accomplish this.
    I have read through numerous articles but none that EXPLAIN how to do this.
    the database has no information - and newly created ones dont have an option to change this.
    please help

    In a forum of volunteers there are no urgent queries.
    Your use of the word 'urgent' is disrespectful and rude.
    As UTF-8 is a multi-byte characterset, and multibyte charactersets are not supersets of single-byte charactersets, you need to create a new database in the correct characterset.
    If you want to retain the name, you can use dbca (Database Creation Assistant) to delete the current database first.
    Sybrand Bakker
    Senior Oracle DBA

  • Urgent - Query on STAX

    Hi All,
    I started learning and working with STAX- api (Iterator)
    My requirement is providing the implementation to the methods like
    writeElement
    writeStartElement
    How can i use STAX inorder to implement the above methods.
    Also can anyone provide the implementation classes for the interfaces in the STAX-api.jar (source code)
    Thanks in Advance.

    I think, it is possible to create a query only on Active table but not on Change log table. But why do you want to create on CL table?
    Edited by: Arun Bala G on Feb 7, 2012 7:01 PM

Maybe you are looking for