Custom query as a source in a mapping

Hi,
I am new to OWB, so please help... Is there any way to specify a custom query as the source in a mapping? I am trying to get data from multiple tables like -
select t1.colA, t2.colB, t3.colC, sum(t2.colA - t3.colB) colD, sum((t1.colB - t3.colC)/t2.colB) colE
from tableA t1, tableB t2, tableC t3
where t1.id = t2.tableA_id
and t2.id = t3.tableB_id
group by t1.colA, t2.colB, t3.colC
I wish I could have created a view in the source system with this query and just imported the view, but I don't have permissions to create any object in the source system. Can anyone point out how to do this?
Thanks!

Hi
You can't write a query as such. However, as David suggested you can create that query by putting the objects in mapping.
You would require 3 table operators, 1 joiner(for joing the 3tables and the function), 1 aggreagtor(for grouping) and an expression operator( for doing t2.colA - t3.colB). The ouput of aggreagator operator can be used as source. If you want to use the function you can use the in output variable of an expression operator.
So, your mapping might look lke this.
(t1,t2,t3)--> (Joiner with join conditiongiven in the where clause)-> Expression operator which are having inputs as t1.colA, t2.colB, t3.colC,t2.colA , t3.colB, colD,t2.colB. This expression operator would have ouput variables as in inout and also colE. For every ouput operator you assign the corresponding expression. nad for colE ,in the expression builder you use theprocedure with the input variable. The output would go into the Aggreagator operator where you can do the group by clause thing.
I know this is a long description but still i hope it helps.
Regards
Vibhuti

Similar Messages

  • Pagination in toplink using custom query

    Re: Pagination using TopLink
    Posted: Aug 31, 2006 10:42 PM in response to: Shaun Smith Reply
    Hi,
    I have my own customer query which is really complex with subqueries,joins,grouping,aggregation in the query etc etc for which I cant use toplink workbench to create a project and do the metadata mapping.
    But we need to enable pagination without holding the database resources between customer's page time in the browser.
    Is there any provision in toplink to just input the custom query (either statement/prepared statement) and do pagination without holding connection to the database between page time?
    The example i got from the link makes use of LogicalCursor/ChunkingLogicalCursor etc.
    LogicalCursor cursor = new LogicalCursor(Model.class,null);
    for (CursorIterator it = cursor.iterator(session); it.hasNext();)
    System.out.println(it.next(session));
    Only parameter that is passed to the LogicalCursor is "Model" which is a java object mapped to a particular table.
    But we had a java object which should be mapped to the output of a complex query involing complex query and pagination needs to be enabled.
    Could you please let us know a sample by which we can do by simply passing the query during the runtime ?

    It really seems weird.
    We followed the toplink tutorial and wrote a servlet FindAddress which on receiving the request
    1. instantiates ReadQuery and
    2. setreferenceclass to Address.class,
    3. setFetchSize(1000) and
    4.sets useScrollableCursor.
    5. It does session.executeQuery returning a ScrollableCursor.
    6. We place the ScrollableCursor in HttpSession
    and then redirect the page to viewAddress.jsp which
    1. retrieves the ScrollableCursor from the session
    2. i=0;     while(cursor.hasNext() && i<1000) {
         Address address = (Address)cursor.next();
    //display via the jsp all these 1000 address objects
    3. has a next button when a click on that it again goes to the same page retrieving the next set of 1000 records from ScrollableCursor from the session.
    Through out this experimentation I could see the connection is still held. I was expecting that once the page gets displayed for 1000 records and untill you press next, the connection should be handled back to the J2EE application server but still the connection is held .
    The logic of setFetchSize as mentioned in the documentation is that after reading the first set of records as per fetchSize ,connection should be returned to the pool and when we do iterator.next() after fetchsize limit, it has to again going to the database and fetch records but it doesnt seem to be.
    Could you please help us. This is what we are trying to do as next step and we had been evaluating toplink could be the best choice for our business scneario:
    We try to achieve pagination without holding the database resource when the user navigates between paged records.
    Any help on this would make us to hit toplink for our huge application.
    Here is the attached FindAddress.java and ViewAddress.jsp
    FindAddress.java
    =============
    // Decompiled by DJ v2.9.9.61 Copyright 2000 Atanas Neshkov Date: 9/8/2006 6:32:21 PM
    // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: FindAddress.java
    package examples.servletjsp;
    import java.io.IOException;
    import java.io.PrintStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.toplink.expressions.Expression;
    import oracle.toplink.expressions.ExpressionBuilder;
    import oracle.toplink.queryframework.ReadAllQuery;
    import oracle.toplink.queryframework.ScrollableCursor;
    import oracle.toplink.threetier.ClientSession;
    import oracle.toplink.threetier.Server;
    // Referenced classes of package examples.servletjsp:
    // JSPDemoServlet
    public class FindAddress extends JSPDemoServlet
    public FindAddress()
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    doPost(request, response);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    request.setCharacterEncoding("UTF-8");
    getServletContext().log("FindAddress servlet - doPost");
    java.util.Vector address = null;
    ScrollableCursor cursor = null;
    try
    HttpSession session = request.getSession(true);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(examples.servletjsp.model.Address.class);
    ExpressionBuilder builder = new ExpressionBuilder();
    query.setSelectionCriteria(builder.get("id").greaterThan(100));
    query.setFetchSize(5000);
    query.useScrollableCursor();
    System.out.println("########### Sleep Mode Before assigning to CURSOR ###############");
    System.out.println("############ Back from Sleep Mode before CURSOR ############");
    cursor = (ScrollableCursor)((Server)getSession()).acquireClientSession().executeQuery(query);
    System.out.println("############ Sleep Mode After assigning to CURSOR ###########");
    System.out.println("############ Back from Sleep Mode After CURSOR ############");
    session.setAttribute("ScrollableCursor", cursor);
    catch(Exception e)
    request.setAttribute("source", "FindEmployees doPost");
    request.setAttribute("header", "An Error Occurred");
    request.setAttribute("errorMessage", e.getMessage());
    request.getRequestDispatcher("./errorPage.jsp").forward(request, response);
    return;
    System.out.println("cursor------------" + (cursor == null));
    if(cursor == null)
    request.getRequestDispatcher("./EmployeesNotFound.jsp").forward(request, response);
    } else
    request.setAttribute("address", address);
    request.getRequestDispatcher("./viewAddress.jsp").forward(request, response);
    viewAddress.jsp
    =============
    <%@page import="java.util.*"%>
    <%@page import="examples.servletjsp.*"%>
    <%@page import="examples.servletjsp.model.*"%>
    <%@page import="oracle.toplink.queryframework.ScrollableCursor"%>
    <%@page import="java.math.*"%>
    <%@page contentType = "text/html; charset=UTF-8"%>
    <html>
    <head><title>Employee Query Results</title></head>
    <body>
    <form name="test" method="post" action="viewAddress.jsp">
    <!--      Prepare s heading.
         Get the employees passed in from ViewEmployees servlet. Show them in table format. Provide button
         to ViewEmployee -->
    <%
         request.setCharacterEncoding("UTF-8");
         String searchString = request.getParameter("employeeString");
         ScrollableCursor cursor = (ScrollableCursor) session.getAttribute("ScrollableCursor");
         String heading = null;
              heading="Search Results for FindAll on Employee";
         String employeeData = "";
         //Iterator data = ((Vector)request.getAttribute("address")).iterator();
         int i =0;
         while(cursor.hasNext() && i<4995) {
              if(i<10){
                   System.out.println("######### JSP Count TRhread Sleep ###########");
                   //Thread.sleep(100);
                   //System.out.println("######### JSP Count TRhread Sleep Over ###########");
              i++;
         Address address = (Address)cursor.next();
         BigDecimal id = address.getId();
         String city = address.getCity();
         String province = address.getProvince();
         String street = address.getStreet();
         String country = address.getCountry();
         String pCode = address.getPostalCode();
         employeeData += "<tr><td>" + id + "</td>"
              + "<td>" + province + "</td>"
              + "<td>" + street + "</td>"
              + "<td>" + city + "</td>"
              + "<td>" + pCode + "</td>"
              + "<td>" + country+ "</td>"
              + "</tr>";
         //cursor.close();
         System.out.println("abcdAfter closing the cursor ->plz see whether connpool monitorcnt = 0");
    %>
    <center>
         <h2><%=heading%></h2>
         <hr>
         Return to Main
         <p>
         <table border=1>
              <tr>
                   <td align="center">Address Id</td>
                   <td align="center">Province</td>
                   <td align="center">Street</td>
                   <td align="center">City</td>
                   <td align="center">Postal Code</td>
                   <td align="center">Country</td></tr>
              <%=employeeData %>
         </table>
    </center>
    <p>
    <input type="submit" name ="next" value="next" >
    <center>Return to Main</center>
    </form>
    </body>
    </html>

  • SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field

    Hi,
    I am using Access 2013 and I have the following VBA code, 
    strSQL = "INSERT INTO Master SELECT * from Master WHERE ID = 1"
     DoCmd.RunSQL (strSQL)
    when the SQL statement is run, I got this error.
    SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field
    Any suggestion on how to get around this?
    Please advice and your help would be greatly appreciated!

    Rather than modelling the many-to-many relationship type by means of a multi-valued field, do so by the conventional means of modelling the relationship type by a table which resolves it into two one-to-many relationship types.  You give no indication
    of what is being modelled here, so let's assume a generic model where there is a many-to-many relationship type between Masters and Slaves, for which you'd have the following tables:
    Masters
    ....MasterID  (PK)
    ....Master
    Slaves
    ....SlaveID  (PK)
    ....Slave
    and to model the relationship type:
    SlaveMastership
    ....SlaveID  (FK)
    ....MasterID  (FK)
    The primary key of the last is a composite one of the two foreign keys SlaveID and MasterID.
    You appear to be trying to insert duplicates of a subset of rows from the same table.  With the above structure, to do this you would firstly have to insert rows into the referenced table Masters for all columns bar the key, which, presuming this to be
    an autonumber column, would be assigned new values automatically.  To map these new rows to the same rows in Slaves as the original subset you would then need to insert rows into SlaveMastership with the same SlaveID values as those in Slaves referenced
    by those rows in Slavemastership which referenced the keys of the original subset of rows from Masters, and the MasterID values of the rows inserted in the first insert operation.  This would require joins to be made between the original and the new subsets
    of rows in two instances of Masters on other columns which constitute a candidate key of Masters, so that the rows from SlaveMastership can be identified.
    You'll find examples of these sort of insert operations in DecomposerDemo.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    In this little demo file non-normalized data from Excel is decomposed into a set of normalized tables.  Unlike your situation this does not involve duplication of rows into the same table, but the methodology for the insertion of rows into a table which
    models a many-to-many relationship type is broadly the same.
    The fact that you have this requirement to duplicate a subset of rows into the same table, however, does make me wonder about the validity of the underlying logical model.  I think it would help us if you could describe in detail just what in real world
    terms is being modelled by this table, and the purpose of the insert operation which you are attempting.
    Ken Sheridan, Stafford, England

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Master Data ------  Source and Target Mapping

    I want to know the source and target mapping of some master data elements like plant,vendor,customer,workcenter.
    Where can I get it. Please provide the relevant documents or links.

    Hi,
    Check in RSOSFIELDMAP table.
    Thanks
    Reddy

  • How to specify custom query as well as a selection criteria

    Hi
    I'm struggling to specify a custom select query with variable no. of agruments through toplink.
    The custom query looks like:
    select outer.col1, outer.col2, outer.col3,
    outer.effective_date, outer.capacity_rate, outer.expiry_date, outer.comments, outer.create_date,
    outer.create_user_id, outer.modify_date, outer.modify_user_id, outer.vol_uom_type_code
    from tbl outer,
    ( select max(effective_date) effective_date, col1, col2, col3 from tbl
    where expiry_date is null
    or (trunc(effective_date) >= to_date('01/01/'||to_char(sysdate,'yyyy'), 'dd/mm/yyyy') )
    group by col1, col2, col3
    ) inner
    where outer.col1 = inner.col1
    and outer.col2 = inner.col2
    and outer.col3 = inner.col3
    and trunc(outer.effective_date) = trunc(inner.effective_date)
    My domain class TBL.class is mapped one to one with DB Table TBL.
    With this customer query, I want to add a selection criteria depending upon what is specified on the UI-screen - I can get col1, col2 or a combination of these as search criteria.
    So far I have tried multiple approaches:
    1. Specifying the custom query (without arguments) as a ReadAll Query in toplink descriptor and then using expression builder to add the criteria but this doesn't work as custom ReadAll query gets overridden and i get back all the results from
    TBL which match the criteria specified.
    expFinal = new ExpressionBuilder().get("col1").equal(srchCriteria.getCol1());
    results = (List) getTopLinkTemplate().readAll(TBL.class,expFinal,false);
    2. Using Named Query:
    Toplink doesn't allow me to specify a custom SQL along with a selection criteria - both for the same NamedQuery.
    3. Specifying the DB query in java layer and then adding arguments and argument values. When query is executed, i don't see arguments being added.
    ReadAllQuery query = new ReadAllQuery(TBL.class);
    query.setSQLString(READ_ALL_QUERY);
    ExpressionBuilder exp = new ExpressionBuilder();
    query.addArgument("col1", Long.class);
    Vector vect = new Vector();
    vect.add(srchCriteria.getCol1());
    query.addArgumentValues(vect);
    result = (List) getTopLinkTemplate().executeQuery(query, false);
    Please suggest. Would be great if you could share some code bits.
    Thanks
    Nitin

    Nitin,
    This style of query does require code to apply logic as it is created. If you wish to have this used as a named query you can use a query re-direct so that instead of executing a query we call a method of yours.
    You can setup your named query to use re-direction into a static method as:
            QueryRedirector redirector = new MethodBaseQueryRedirector(QueryRedirectorExample.class, "redirectMethod");
            ReadAllQuery raq = new ReadAllQuery(Employee.class);
            raq.addArgument("FIRST_NAME");
            raq.setRedirector(redirector);
            descriptor.getDescriptorQueryManager().addQuery("findByFirstNameLike", raq);The static method that then gets invoked where you can dynamically create a query looks like:
        public static Object redirectMethod(DatabaseQuery query, Record record, Session session) {
            String firstName = (String)record.get("FIRST_NAME");
            ReadAllQuery raq = new ReadAllQuery(Employee.class);
            if (firstName != null) {
                raq.setSelectionCriteria(raq.getExpressionBuilder().get("firstName").likeIgnoreCase(firstName));           
            return session.executeQuery(raq);
        }Doug

  • Enhydra  DODS - Open Source Object/Relational Mapping Tool from Enhydra

    Hi all,
    I just want to inform you that the final version 5.1 of DODS is released.
    Data Object Design Studio is an open source Object/Relational mapping tool.
    Based on XML data model descriptions (DOML files) SQL DDL, sophisticated Java O/R code and documentation (HTML, pdf, XMI) is generated automatically using a generator GUI, by Ant tasks or from within your IDE of choice (using Kelp).
    The generated Java code provides a lot of possibilities for runtime optimization (DO LRU caching, Query LRU caching, cache initialization, lazyloading,...).
    DODS can be used with or without the Enhydra application server.
    DODS Development Team
    Home page http://dods.enhydra.org
    Objectweb project http://forge.objectweb.org/projects/dods
    Download page http://forge.objectweb.org/project/showfiles.php?group_id=61

    Hi Davide,
    SAP doesn't have proprietary O/R tool but it supports JDO 1.0 standard and Entity Beans as part of J2EE 1.3.
    Regards,
    Avi

  • How can I edit custom query in Data Insight

    1.  Whenever I click the edit sql query by right clicking on the custom query, the system hangs up and does not proceed further
    2.  Once you create a query without retrieving data results, is it possible to change to retrieve the data and how.
    Thanks -   Mahrukh

    Hi Mahrukh,
    I do not have this issue.  What version of Data Insight are you using?  What database is your metadata repository?  What database is your source data in for the Data Insight query you are writing?  Have you tried double clicking on the custom query - this should open it up for you to be able to edit it as well!
    You should be able to open the query to edit it and either click the return data box or un-check it for any type of query.
    Thanks,
    Denise

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error occurred querying a data source in office 365.

    I have created a simple infopath form and in one of my dropdown box  i am receiving the REST services. 
    when i run the infopath form 2013 in preview it was running good but when i upload it on to office 365 cloud it's showing me error. i had converted the services into UDL and save it on Data connection Library and it's approved.
    Warning
    Click OK to resume filling out the form. You may want to check your form data for errors.
    The entry has been added to the Windows event log of the server.
    log ID:5566
    Correlation ID:feb08a9c-9d47-30f5-5d89-60340242d6d1.

    Hi,
    According to your post, my understanding is that you got error when querying a data source in office 365.
    Per my knowleadge, we cannot connect to SharePoint Web Services from InfoPath Forms within SharePoint Online.
    Loopback protection is enabled on the SharePoint Online environment and will block calls to SOAP and REST from InfoPath Form Services.
    For more information, you can refer to:
    Error message when you connect an InfoPath form to a SharePoint Online web service: "An error occurred while connecting to a Web Service"
    As a workaround, to look up data for some dropdowns from several external REST Web Services, we need to have a Data Connection library in your Site Collection in which to store the UDCX files.
    The steps seem to be:
    Create a Data Connection Library in your Site Collection
    In the InfoPath ribbon, go to Data, then Data Connections. Your existing data connections should be listed.
    Choose the data connection which is hosted on a different domain.
    Clink the
    Convert to  Connection File… button
    In the location selector, specify the path to the Data Connection Library you created above.
    Leave the
    Relative to  site collection (recommended) radio button selected.
    Click OK
    Here is a great blog for your reference:
    InfoPath 2013 Forms on Office365 with External REST DataSources
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error in running custom query from jspx(site) for Content Tracker Report

    Hi All,
    I want to generate a custom Content Tracker Report. I am able to do so from Content Tracker console, but when i try to invoke the service 'SCT_GET_DOCUMENT_INFO_ADMIN' or 'SCT_GET_DOCUMENT_INFO' with my custom query(which simply counts the number of rows in a table) from my jspx page, it gives the following error.
    oracle.stellent.wcm.server.request.RequestException: Error
    occurred in Content Server executing service
    'SCT_GET_DOCUMENT_INFO_ADMIN'
    Caused By: oracle.stellent.ridc.protocol.ServiceException: Unable to get
    document info. Unable to execute service method 'sctExecuteQuery'. The
    error was caused by an internally generated issue. The error has been
    logged.
    What could be the reason and the resolution?
    Also, I know that i am invoking the service in the right way as custom report from query as 'select * from users' works fine from site.
    P.S. I am using UCM 11g + SSXA

    Things are turning weird. The below two queries work from jspx.
    1. SELECT * FROM Users
    2. SELECT dname FROM Users
    But, the following query gives error (SQL is correct).
    select dname, count(dname) from users group by dname
    Unable to execute service method 'sctExecuteQuery'. Null pointer is dereferenced.
    $Unable to get document info.!csUnableToExecMethod,sctExecuteQuery!syNullPointerException
    intradoc.common.ServiceException: !$Unable to get document info.!csUnableToExecMethod,sctExecuteQuery
    *ScriptStack SCT_GET_DOCUMENT_INFO_ADMIN
    3:sctExecuteQuery,**no captured values**
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2260)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
    at intradoc.server.Service.createServiceException(Service.java:2249)
    at intradoc.server.Service.doCodeEx(Service.java:584)
    at intradoc.server.Service.doCode(Service.java:505)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
    at intradoc.server.Service.executeActions(Service.java:458)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
    at intradoc.util.IdcConcurrentHashMap.get(IdcConcurrentHashMap.java:60)
    This works fine from Content Tracker UI.
    Anyone has any idea, what could be the issue here?

  • Sql query in report/source

    Is possible use this kind of select select a,(select b from b) from b
    in sql query in report/source?

    Pretty much any valid select statement can be used.
    If it works in SQL*Plus, then it should work in Application Express.
    I think your example would not be valid if table b has more than one row.
    A scalar subquery (like your "select b from b") must only return a single value.
    SQL>  select ename, (select job from emp) from emp e;
    ORA-01427: single-row subquery returns more than one rowIf your subquery can be restricted to return one value, then it should work.
    SQL>  select ename, (select job from emp where empno = e.empno) job from emp e;
    ENAME      JOB
    KING       PRESIDENT
    BLAKE      MANAGER
    CLARK      MANAGER
    JONES      MANAGER
    SCOTT      ANALYST
    FORD       ANALYST
    SMITH      CLERK
    ALLEN      SALESMAN
    WARD       SALESMAN
    MARTIN     SALESMAN
    TURNER     SALESMAN
    ADAMS      CLERK
    JAMES      CLERK
    MILLER     CLERK
    14 rows selectedBut is that the kind of result you were looking for?

  • "An error occured querying a data source" - Web Service connecting to GetUserCollectionFromGroupSupport

    I have an infopath form that is getting the error when opening an existing form or creating a new form:-
    Warning
    An error occurred querying a data source.
    Click OK to resume filling out the form. You may want to check your form data for errors.
    Hide error details
    An error occurred while trying to connect to a Web service.
    Correlation ID:7ab6be2c-60e1-4025-be1e-1a2fbe00acd3
    So I know its a permission issue because full control users have no problem.  I have found a suggestion here suggesting making sure the group has "Who can View Membership to the Group" but that didn't work for me - and
    my test user is only a member of one group -
    http://sharepoint.stackexchange.com/questions/109488/usergroup-asmx-returns-unauthorized-for-some-groups
    How can I get around this without provding users Full Control?

    So I fixed this with exactly what I mentioned above by adding "everyone" "Who can View Membership to the Group" permission.  My error initially was that I was looking at the incorrect security group.

  • Add custom query to standard PLD layout

    Hi Everybody,
    I need to change the standard Invoice PLD report, in order to include additional data that is
    kept in my UDO.
    Is it possible to define a custom query inside PLD to retrieve data from the UDO
    (the UDO is linked to the Invoice) and show it in the Invoice layout?
    Thanks all,
    Manuel Dias

    Hi Manuel,
    One workaround you can try is to use UDF and formatted search to retrive the info on the invoice screen and then directly display it on the invoice PLD.
    Hope it helps.
    Regards,
    Hamsa

  • Transformation: Need for calling a custom function module on source system

    Hi Gurus,
    I need to use a custom FM residing on source system within the transformation to determine the type (e.g. posting type) of a document item. The logic is quite complex with many exceptions (many if statements) and 2 customizing & few transparent tables are in use as well in the FM.
    From my point of view, there are few options for achieving the outcome:
    1. Copy the FM logic 1:1 in transformation
    2. Transport the FM from ERP to BW system
    3. Source system delivers the info (e.g. with an extra field "posting_type")
    4. Access the FM directly via RFC/BAPI
    However, there are pros and cons for each of the alternatives:
    *Option 1*
    pros:
    cons: consistency problem, need for importing customizing tables & source tables, high maintenance effort
    *Option 2*
    pros: better consistency compared to Option 1
    cons: need for importing tables, administrative efforts
    *Option 3*
    pros: no logic is needed at BW side, no transformations means no impact on performance, high consistency, no administrative effort
    cons: structure in source system has to be changed, impact on historical records
    *Option 4*
    pros: best consistency (better than Option 3 as FM might change), no administrative effort
    cons: impact on performance during transformation
    Could you please verify my assumptions and give suggestions on solving the problem?
    Thanks a lot!
    Regards,
    Meng

    Hi Joon,
    According to me.
    If Historical data amount is so high, historical data is available in BW(at PSA level or acquisition layer or corporate memory layer) and headache to load history data(because of overload on ECC due to huge amount of data) from ECC then I will suggest combination of 3 and 4 steps.
    If fetching history data from ECC is not headache for you then go for step 3.
    Step 3 is most common approach in BW, which is easy for implementation and support.
    Regards,
    Ashish

Maybe you are looking for

  • Application Error - Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385

    Hi, we have one Visual C++ application and this application also using few external dlls. while exiting from application, getting following error. This is happened in Windows 7. Please help us to resolve this issue. Log Name:      Application Source:

  • ECC to CRM Mapping Issue for vendor data

    Hi, I am facing an issue for replicating vendor data from ECC to CRM. One of the vendor is not confirmed at ECC side and one vendor's time zone is not maintain in the master of time zone in CRM side. This may be the issue. But Where exact we can see

  • [875P Neo Series] pro2kxp (INTEL(R) PRO1000 CT Network Connection Diagnostics Utility

    Hi I am using the pro2kxp (INTEL(R) PRO1000 CT Network Connection Diagnostics Utility which not only installs the driver but also a network connection diagnostics utility. The driver date as shown in Device Manager is 29/08/2003 and the driver versio

  • Transaction iView - reload of content

    Hi Experts. A transaction iView (SAP GUI for HTML) displays a SAP transaction in the portal. But whenever I navigate to another portal content and then back to the SAP transaction iView the procedure starts again (connecting to R/3 and starting the S

  • Can 'maps' on iPad find the address in china?

    I ve stored some Chinese addresses in the 'contact', but when I use the 'maps', I found it can not find these addresses. Is it possible for the 'maps' to do that?