Mapping query result

Hello,
I can't map string Display Name to the string property, on the User prompts tab I set prompt with type Query Result, on the Configure Prompts I configure this query by selecting AD User of Group -> Display Name, now I have Prompt Output called DisplayName
(string). On the Map prompts I can't map this prompt to the string property, why? I just want to choose one user from AD and put it on the form as string.

You will never get "simple values" from a query result. The option "3. Display Columns" are the properties on the class that you display on the portal. You will not be able to map a query result anywhere. You must attach it somehow to the request (in the
last tab "4. Options").
So even though the prompt output says "DisplayName (string)" you are still getting an object out of it. This makes more sense if you select more properties in 3.
http://codebeaver.blogspot.dk/
Thanks fro info, I have a script which reads custom string property of my custom service request class and translates it to 'AD user class' and makes it as Reviewer in the Review Activity. But instead of textbox field on the portal I need to use query,
how can I get info from this service request about query to create AD user in my script?
I placed query form on the portal to test, it shows only 2000 objects by default, is it possisble to show members of some OU or group in this field?

Similar Messages

  • Mapping query result to excel sheet

    Hi Experts,
    i have a requirement where in i need to map the result into particular cellls of the excel sheet, because the excel sheet acts as front end which has graphs and by just putting the result in particular cells of excel the graph is automatically generated, so is there any way where i can map the result cells into particulat cells in excel?
    Thank you.

    Hi Shetty,
    You might have stopped reading this thread since you have the answer you need for now.  From experience, let me tell you what might happen next.
    If the query definition is ever changed ... say, a new characteristic is added because a different user has a slightly different need ... the result table will move down by a few rows and your equation no longer works.
    If you think this might happen, let me tell you a very easy way to get around it.
    1.  Name the range(s) you will use.  If the first result is in cell B31 on Sheet1, then go to cell B31 on Sheet1 and Select Insert>>Name>>Define.  Call it something you will remember, like "LastMonthSales" (no spaces, but underline is OK)
    2. use the range name in your formula.  This happens automatically, in fact.  If you press = then click on cell B31, Excel will automatically use the range name instead of the range address.  Excel LIKES names.
    3. now, go to the Visual Basic Editor (Tools >> Macro >> Visual Basic Editor; or, Alt+F11).  In your workbook, there should be a subroutine as follows:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    If you do not find it, add it.  This probably also means that you are using Excel 2002 or later and have not set your Macro security to "trust access to Visual Basic Project"; so, change that security setting (Tools >> Options >> Security >> Macro Settings).
    The visual basic code is very simple.  For each result that you need to map you will want one line of code like this one:
    resultArea.Cells(4, 2).Name = "LastMonthSales"
    The Cells(4, 2) are counted from the top left of the result table.  So, in this case if B31 = Cells(4,2), then the top left of my result table must have been in cell A28 in Excel.
    This subroutine will be run automatically every time that the query is refreshed.  So, if the result table moves, the names will move with it.  One less thing to worry about.
    If you do not think you need to do this today, don't!  No sense in doing work that is not necessary.  But, save this.  I suspect that some day you will need it.
    - Pete

  • PL/SQL to map query results to a column?

    Is there a programmatic way to map the query result to a value in a table?
    I have table A. There's a column with a carat-delimited string 0^0^1^ that I can parse with substr/instr functions. So, query that table/column for a 5th digit that sits between 5th and 6th ^ character.
    There's table B. It has a 'position' column and 'key' column. How do I let the table A know that when I query table A for 5th digit, it needs to map to table B's where position=5?
    thanks,

    Did you try to run those statements? Please do so next time.
    Also the creation of table C (or is it D) and E are missing.
    However, the tricky part is in deciphering table A to make up for the flawed design.
    I hope this piece of SQL is helpful for you, because you could join the outcome to your other tables:
    SQL> create table a
      2  ( visitor_id number(*,0),
      3  adate date,
      4  carat varchar2(4000 byte),
      5  ip_address varchar2(4000 byte),
      6  state varchar2(4000 byte),
      7  city varchar2(4000 byte),
      8  id number(*,0) not null enable,
      9  constraint "a" primary key (id)
    10  )
    11  /
    Tabel is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(194296532,TO_DATE('2007-06-26.00.01.46',''),'-1^1^2^0^3^85741^3^0^176^0^1
    ^-1^41^-1^-1^US^0^-1^2^0^1^^^^^^^','71.226.9.44','az','tucson',1);
    1 rij is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(37482918,TO_DATE('2007-06-26.00.01.46',''),'0^1^2^5^^78154^3^7^184^0^1^2^
    17^2^1^US^1^0^1^0^0^^^^^^^','70.163.196.111','tx','san antonio',2);
    1 rij is aangemaakt.
    SQL> select id
      2       , visitor_id
      3       , i position
      4       , c value
      5    from a
      6   model
      7         return updated rows
      8         partition by (id, visitor_id)
      9         dimension by (0 i)
    10         measures ('^' || carat || '^' c)
    11         rules
    12         ( c[for i from 1 to length(regexp_replace(c[0],'[^\^]'))-1 increment 1]
    13           = regexp_substr(c[0],'[^\^]+',1,cv(i))
    14         )
    15   order by id
    16       , position
    17  /
            ID VISITOR_ID   POSITION VALUE
             1  194296532          1 -1
             1  194296532          2 1
             1  194296532          3 2
             1  194296532          4 0
             1  194296532          5 3
             1  194296532          6 85741
             1  194296532          7 3
             1  194296532          8 0
             1  194296532          9 176
             1  194296532         10 0
             1  194296532         11 1
             1  194296532         12 -1
             1  194296532         13 41
             1  194296532         14 -1
             1  194296532         15 -1
             1  194296532         16 US
             1  194296532         17 0
             1  194296532         18 -1
             1  194296532         19 2
             1  194296532         20 0
             1  194296532         21 1
             1  194296532         22
             1  194296532         23
             1  194296532         24
             1  194296532         25
             1  194296532         26
             1  194296532         27
             1  194296532         28
             2   37482918          1 0
             2   37482918          2 1
             2   37482918          3 2
             2   37482918          4 5
             2   37482918          5 78154
             2   37482918          6 3
             2   37482918          7 7
             2   37482918          8 184
             2   37482918          9 0
             2   37482918         10 1
             2   37482918         11 2
             2   37482918         12 17
             2   37482918         13 2
             2   37482918         14 1
             2   37482918         15 US
             2   37482918         16 1
             2   37482918         17 0
             2   37482918         18 1
             2   37482918         19 0
             2   37482918         20 0
             2   37482918         21
             2   37482918         22
             2   37482918         23
             2   37482918         24
             2   37482918         25
             2   37482918         26
             2   37482918         27
             2   37482918         28
    56 rijen zijn geselecteerd.Regards,
    Rob.

  • Execute query in mapping and map the result to next field in target

    Hi Guys,
    Doing file to jdbc Scenario.
    source:
    root:
      row
           sf1
    target:
    root:
        row
           target1
           target2
    I have requirement as:
    I have to map sf1 to target1 ( I do not have any problema in it)
    target2 field must populate basing upon query which results. this should run with the input parameter sf1. If the query results then update target2 else update with MESSAGE_DONE.

    Hi Swarna,
    What kind of query do you mean? In certain cases, it might be worthwhile to consider ABAP mapping, which seems to be the easiest way to do some sequential steps, especially for such a simple message structures.
    Hope this helps,
    Grzegorz

  • Export query results to flat file with dynamic filename

    Hi
    Can anybody can point me how to dynamic export query serults set to for example txt file using process flows in OWB.
    Let say I have simple select query
    select * from table1 where daterange >= sysdate -1 and daterange < sysdate
    so query results will be different every day because daterange will be different. Also I would like to name txt file dynamicly as well
    eg. results_20090601.txt, results_20090602.txt, results_20090603.txt
    I cant see any activity in process editor to enter custom sql statment, like it is in MSSQL 2000 or 2005
    thanks in advance

    You can call existing procedures from a process flow the procedure can create the filename with whatever name you desire. OWB maps with file as target can also create a file with a dynamic name defined by an expression (see here ).
    Cheers
    David

  • Incorrect query results with conformResultsInUnitOfWork

    Hi,
    has anybody experienced this:
    Take two classes User and Group
    Group has a 1:n Mapping to User (attribute users)
    User has a 1:1 Mapping to User (attribute partner).
    Following query returns too many objects
    User user1 = someUserObject;
    ReadAllQuery readAllQuery = new ReadAllQuery(Group.class);
    Expression e = builder.anyOf("users").get("partner").equal(user1);
    readAllQuery.setSelectionCriteria(e);
    readAllQuery.conformResultsInUnitOfWork();
    Vector vector = (Vector) unitOfWork.executeQuery(readAllQuery);
    It returns
    - the correct Group object as determined from the sql query +
    - any other objects of the same class that are fully instantiated (users is instantiated and for each user, partner is instantiated), even if they don't conform to the expression.
    The same query works properly ;
    - without conformResults
    - or if the other objects are not fully instantiated

    Hi,
    we need an workaround badly and the support is moving at exactly the rate I feared it would.
    So I thought, since we only hit this bug with existing objects and we use conformResultsInUnitOfWork because we want to find the newly created objects, is there a way to get
    - the SQL Query results
    + any new objects that conform to the query
    We still might get new objects that don't conform to the query (this is the bug) but I'll worry about that later if it happens.
    My first attempt at a solution looks like this:
    1. turn off conformResults
    2. manually add all new objects that conform to the query
    I had to guess a little for 2, since I don't know what exactly toplink does to select the "conform" objects.
    private static List findConformNewObjects(UnitOfWork unitOfWork, ReadAllQuery query) {
    List result = new ArrayList();
    Class resultClass = query.getReferenceClass();
    Expression selectionCriteria = query.getSelectionCriteria();
    Enumeration enumeration;
    IdentityHashtable newObjectsCloneToOriginal = unitOfWork.getNewObjectsCloneToOriginal();
    if (newObjectsCloneToOriginal != null && newObjectsCloneToOriginal.size() > 0)
    enumeration = newObjectsCloneToOriginal.keys();
    while (enumeration.hasMoreElements())
    Object o = enumeration.nextElement();
    if (resultClass.isInstance(o))
    if (selectionCriteria != null && selectionCriteria.doesConform(o, unitOfWork, null, query.getInMemoryQueryIndirectionPolicy()))
    result.add(o);
    return result;
    Does this look OK to you? Is there a better way to do it?
    Ana

  • InfoSet query results confusion...

    HI All,
    We have 2 ODS.  One is Billing and the other is Project Sales.  In the billing ODS we have billing documents that have the billing date (calmonth) and employee.  The projected sales is an ODS that has for each employee for each month, their Projected Sales.
    We have created an InfoSet and linked in the billing ODS the calmonth (in billing) to period field (in Projected Sales) and 0SALESEMPLOYEE (in billing) to PERNR (in Projected) ODS.
    The Projected Sales ODS has exactly 1 entry for each employee for each month.  i.e. employee '12345' for 200501 a projected sales of 10,000.  With the above mapping the query results for projected sales is about 50X more.  In other words, it shows 30 million when it should be 150,000.  I think this has to do with it somehow including results from the billing ODS??
    We've read help about interpreting infoset query results and it's quite confusing.  It speaks of some filter option to exclude query result set, but can't figure it out.
    In addition to the monthly projected sales we want to see for each employee, we want to include all the net sales they had for the same month.  So you can see the mapping we did above.
    Query would look like this:
    Calmonth  Employee  NetSales  ProjSales
    200501    123456    220,000   10,000
    The projected sales is entirely off by millions of dollars and also the net value isn't calculating correctly.  I'm sure out setup is incorrect.
    Can someone help us out please.
    Thanks
    Mike

    Hi Ashish,
    What you explained is exactly what is the case.
    The billing ODS has many, many entries for the for the employee + calmonth combination while the projected sales only has 1.  I've figured out that this is what is happening...multiplying the number of entries in the billing X the Projected Sales.
    Is there a way to avoid this with a particular join in InfoSet? 
    The key for billing ODS has billing number, billing item and fiscal year variant, while the key for projected sales is start period and pernr.  So I don't see how a multiprovider would work because the fields are different...am I incorrect?
    Thanks for your quick reply,
    Mike

  • cache-query-results question

    I have another post for general descriptor tag information but I do have a specific question. In a project I am looking at I see:
    <cache-usage> check cache by primary key </cache-usage>
    <cache-query-results>false</cache-query-results>
    <maintain-cache>true</maintain-cache>
    I'm not sure how to interpret this. Does this mean that a cache is in place or not? cache-query-rests is set to false which implies no caching, yet the other parameters imply a cache is in place. What overrides here?
    Thanks

    The XML maps directly to the API so the JavaDocs and related documentation are the best tools:
    cache-usage: query.setCacheUsage(int)
    This option indicates how the object cache should be used when processing the query. This is how in-memory query is configured as well as support for cache-hits on ReadObjectQuery.
    cache-query-result: query.setShouldCacheQueryResults(boolean)
    This option allows you to indicate that the results returned from the query execution should be held. When the query is executed again these results will be returned without going to the database or searching the object cache. This is just caching the results locally within the query.
    maintain-cache: query.maintainCache() or query.dontMaintainCache()
    This setting determines if the results returned from the query should be cached in the shared object cache. It is on by default and turning this off is very rare. Occasionally done to compare the cache version with the database verision when handling an optimistic locking failure.
    Doug

  • Returning query results in XML format

    Besides using custom tag library, does anyone know any methods or techniques that i can retrive the query results from database in XML format. for example, i have a table named student in database like this:
    StudentNo  Name   Gender  Degree
    123       Tony    male    B.Comp.Sci.
    456       Tom     male    B.Fiance
    343       Mary    female  B.Accountingso, if i have query select * from table student, i would get someting like the following:
    <row>
    <studentNo>123</studentNo>
    <name>Tony</name>
    <Gender>male</Gender>
    <Degree>B.Comp.Sci</Degree>
    </row>
    <row>
    <studentNo>456</studentNo>
    <name>Tom</name>
    <Gender>male</Gender>
    <Degree>B.Finace</Degree>
    </row>
    The reason i am asking for this is i need query results returned in XML format, so i can wrap XSLT tag around, and apply for HTML, WML, and XHTML template resprectively so i can display them on different terminals. any help is appreciated.

    I have this method in a ResultSetMapper class:
         * Return result sets as an XML stream, with root tag named
         * "results", one "result" tag per row, and "result" child tag
         * names equal to the column name
         * @param query result set
         * @param list of column names to include in the result map
         * @throws SQLException if the query fails
         * @throws JDOMException if the XML stream creation fails
        public static final Document toJDOM(ResultSet rs, List wantedColumnNames)
            throws SQLException, JDOMException
            Element rows         = new Element("results");
            int numWantedColumns = wantedColumnNames.size();
            while (rs.next())
                Element row = new Element("result");
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value = rs.getObject(columnName);
                    row.addContent(new Element(columnName).setText(value.toString()));
                rows.addContent(row);
            return new Document(rows);
        }It uses JDOM from www.jdom.org. - MOD

  • RE: Load of query results

    Hi Patrice,
    Currently, there is little difference between the enterprise edition and
    the standard edition as you pointed out. However, over time, we expect
    to see some major differences as we add fucntionality that is more
    suited for enterprise application - caching is one of these major
    differences.
    We are staggering the release of the SE and EE versions for several
    reasons: 1) we believe the EE needs to have additional functionality to
    justify the two versions and what will be 2 different price points; 2)
    we are hopeful that the specification is finalized shortly - we feel a
    certain discomfort with releasing an "Enterprise" version based on a
    Draft specification; and 3) we are using the SE version to better
    understand the market and the needs of the EE customers. We've put out
    the EE beta to inform those interested in the EE version that one will
    be available.
    No, we do not have a reseller in France at this time although we have
    some development that takes place in Paris. We are definitely
    interested in developing business development relationships throughout
    the world to penetrate this market as efficiently as possible. Do you
    have any suggestions on resellers in France?
    Thanks for your interest.
    Neelan Choksi
    The Kodo JDO Product Team
    -----Original Message-----
    From: Patrice Thiebaud
    To: Choksi, Neelan
    Sent: 8/13/01 1:18 PM
    Subject: RE: Load of query results
    Choksi,
    Thank you for the information.
    I have the additional three following questions :
    in my understanding :.. the Enterprise Edition currently only adds the synchronization with
    the transaction manager of an application server
    .. the JDO specification also mandates the use of a JCA adapter in the
    context of a managed environment
    - are you going to provide also a JCA adapter that could use any JDBC
    driver ?
    - how come that there is such a time interval between the GA dates of SE
    and EE ?
    do you have a reseller in France ? If not, are you looking for one ?Thanks in advance.
    At 22:14 11/08/2001 -0400, you wrote:
    Hi Patrice and all,
    We are planning on releasing Kodo JDO Standard Edition in late August or
    early September. We have not determined a release date for the
    Enterprise
    Edition (likely towards the end of the year).
    Thanks,
    Neelan Choksi
    Kodo JDO Product Team
    -----Original Message-----
    From: White, Abe [ mailto:[email protected]
    <mailto:[email protected]> ]
    Sent: Friday, August 10, 2001 10:30 AM
    To: JDO-ListServ
    Subject: RE: Load of query results
    Could you please clarify exactly what you mean by an 'automatic load' of
    query results? And in what way is the 'resource manager' (db?) accessed
    for each query object returned?
    When Kodo issues a query it selects all fields of the expected result
    class that lie in the primary table used by that type (with the
    exception of LOB fields). Thus the objects returned by the query
    already have all of their data filled in that is accessible with a
    single SELECT. Additional queries are made only if you access fields of
    an object that do not lie in its primary table, such as Collections,
    arrays, Maps, and relations to other persistent objects.
    Is that what you meant?
    Whatever you mean, our goal is to implement the entire JDO
    specification, including as much optional behavior as is useful to our
    customers.
    I'll have someone from marketing get back to you with the GA schedule.
    -----Original Message-----
    From: Patrice Thiebaud
    To: [email protected]
    Sent: 8/10/01 5:08 AM
    Subject: Load of query results
    Hi,
    The final JDO specification is likely to support the need for having an
    automatic load of query results, probably through a property (thus
    answering a performance optimization need, as it is better to avoid
    futher
    access to the resource manager for each object used).
    Will the GA version provide this feature ?
    By the way, is it possible to know the scheduled date for GA ?
    Thanks in advance.
    BEA Systems : How Business Becomes E-Business
    Patrice Thiebaud - Presales Senior Consultant
    BEA Systems - France
    Tour Manhattan
    6 place de l'Iris
    92095 PARIS La D__fense C__dex
    Tel: 33 1 41 45 70 27 Mobile: 06 08 05 95 95
    BEA Systems : How Business Becomes E-Business
    Patrice Thiebaud - Presales Senior Consultant
    BEA Systems - France
    Tour Manhattan
    6 place de l'Iris
    92095 PARIS La D__fense C__dex
    Tel: 33 1 41 45 70 27 Mobile: 06 08 05 95 95

    I have tested Oracle only. Teradata has a "sample" command and I would hope that Web Intelligence would use that. The Oracle method involves the dbms_random package to assign each row a random number, then the query is sorted by that number and a limit is placed for the sample size.
    I have not written about this on my blog yet, but it could be an interesting topic. Thanks for the suggestion.

  • QA: Designer's operation to Add one more Field to display in Query Result Web Part

    QUESTION ABOUT Query Result Web Part presentation +1 Field
    I'd be looking at a property of Web Part to look up Discussion Board through Query Result Web Part. Currently it displays 'Title' column of Discussion Board, and my caring requirement is presentation customization to hold double
    columns of 'Title'+'Updated Date'. How could I add one more field 'Updated Date' to display in addition to that preexisting 'Title' field?
    Any procedural steps to realize how to add Filed to display in Query Result Web Part?

    Hi Yoshihiro,
    As I understand, you want to add the field to display in Query Result Web Part in SharePoint 2013.
    Which web part does you use? Content query web part or search results web part?
    If you use search results web part, you could edit the discussion board result template and add the updated field in the template.
    You could go to Design Manager: Edit Display Templates (site setting-> look and feel->design manager->edit display template), download the Discussion Item.htm file, and edit the file. 
    After editing, upload the file.
    The articles below are about how to modify an existing Display Template in SharePoint 2013.
    http://www.learningsharepoint.com/2012/09/17/sharepoint-2013-the-new-display-templates-for-styling-your-content/
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/01/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-1.aspx
     If you use content query web part, you could edit the content query web part, in the Property Mappings section select the “Change the mapping of managed”, and add the “modifiedOWSDATE” (it means the last modified date) in the line, after
    that you could see the update date under the title.
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get POF object's field value from query result

    hi,all:
    I want to get field value from the query result, my code is below
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
    Contact c=(Contact)iter.next();
    System.out.println ("firstame####=" + c.getFirstName());
    * but I get error*
    Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
    tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
    at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
    at com.oracle.handson.QueryExample.query(QueryExample.java:86)
    at com.oracle.handson.QueryExample.main(QueryExample.java:43)
    who can tell me how to get POF object's field value from query result

    Hi,
    If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
        Map.Entry entry = iter.next();
        Contact c=(Contact)entry.getValue();
        System.out.println ("firstame####=" + c.getFirstName());
    }JK

  • Xml Mapping Query

    Hi Java Team
    For a calling a servlet from a HTML form that is placed inside a folder name HTML in the webcontent we need to map the welcome file as
    <welcome-file>HTML\Home.html</welcome-file>
    In my application I am reading an Excel file to update database
    but when i am creating the input stream object i am currently giving the entire path like
    FileInputStream f = new FileInputStream("E://sample1/sample1/WebContent/Files/Book10.xls")
    is there any mapping which we can do in web.xml by which i need to give only the file name like
    FileInputStream f = new FileInputStream ("Book10.xls")
    Thanks
    Santhosh

    Hi Mark,
    I don't think it is possible to nest the XML mapping.
    This is because your table data will be just two-dimentional. Through your table return several keywords for each template, the query result will look something like:
    template_key        id                         ver       keyword
    tkey1                  INSTLP0001a         1.2      key 1 v1.2
    tkey1                  INSTLP0001a         1.2      key 2 v1.2
    tkey1                  INSTLP0001a         1.2      key 3 v1.2
    Look at the above exhibit. all the column except keyword are repeated.
    So, you can achieve this in two ways.
    1. Change your schema to have a one level data mapping.
    2. Split your schema into three so that you will have three xml files.
    Hope this may help you!
    Nith

  • Getting query results from a PL/SQL procedure

    Hi! So, I’m a little stumped and I can’t seem to find the answer to what I believe is probably a simple question…
    So, here goes… I have a big ol’ union query that I use to create a report on a page, it’s about 25k – not over the 32k limit, but fails to be able to compile every time (I always get a 400 – Bad Request error). I’m not sure why this is happening, but I can remove a union statement and it compiles just fine – so it has something to do with the size of the query. ANYWAY – I’ve resolved that I should put this bad boy into the database as a stored procedure and just call it from Apex, my problem is I can’t figure out quite how to do this with variables, etc.…
    Instead of giving you my whole big query, I’ll use the emp table as the concept is the same:
    Say we have a query that creates a report on a page:
    select empno, ename, job, mgr, hiredate, sal, comm, deptno
    from emp
    where job = :P_JOB
    and hiredate >= :P_HIREDATE;
    How would I take this query, create it as a stored procedure on the db, pass the variables from Apex and return the query result set from the stored proc as a report?
    I really appreciate any help on this!
    Best,
    Gilcrest

    Hi Gilcrest,
    You should create the query as a View and use the view name and the WHERE clause in the report's sql source.
    Andy

  • Sending email using PL/SQL based on a query result

    Hello all,
    I want to create a procedure using PL/SQL, based on a query result.Here is the scenario:
    I have multiple tables in Target and Source databases that I want to compare(not the whole table but queries on these tables) and if they differ, I want to shoot an email. I have some ideas how to implement this but not sure whether it is the best approach.
    select Acct_id, total from SourceTableA
    minus
    select Acct_id, total from TargetTableA
    select Acct_id, sum from SourceTableB
    minus
    select Acct_id, sum from TargetTableB
    If the result of any of above queries > 0 then I want to shoot an email and want to repeat this procedure in the morning every day.
    I know how to implement send_mail procedure using UTL_SMTP package and how to schedule tha job by dbms_job package. But I am not sure how to implement the result of minus query. In case if minus > 0 then I also want to send the name of tables in the email message where source and target tables are not same. Should i use cursor, variable or insert the result in a new table? any help would be highly appreciated. Thanks in advance.
    Khan

    Actually these queries are the part of our daily testing that we run everyday manually(after the scheduled ETL load) to see if there are any discrepencies between our datawarehouse tables and source tables. So instead of running these queries manually everyday we want to schedula a procedure that will shoot an email in case of any discrepency and indicate which tables have problems.

Maybe you are looking for

  • Import from a catalog

    When i try to import from another catalog (from my laptop), the finder window opens and then shuts down instantly.  How do I transfer photos saved as an LRcat file?

  • "Bounce to new track" creates a mixdown 2/3 volume of the original

    When I right click and bounce a track to a new track, the resulting Mixdown file shows as only about 2/3 the volume of the original. The original is -1, the Mixdown is -4. It also looks flat and compressed. I have no buses and the volume/pans are all

  • Cannot start Cube Viewer

    The following bug was found for Windows platform. Do anyone have the patch for LINUX- SUSE. I have got the same problem under Linux but the patch is used for Window but it isn't any pacth for Linux there. The below description ist the same as for UNI

  • Disk images in Win XP ... how to ?

    Howdy folks ! I have Leopard and Win XP running on my MBP pretty much without probs. I will use Windows solely for gaming and here comes my question to the wise: In Mac OS, I can create a disk image of my Game DVD on the desktop and mount it when nee

  • Costs Involved with SAP Netweaver PI 7.1?

    Hi SAP Experts, Just wanted to ask if there are any transaction based costs for the SAP Netweaver PI 7.1?  For example, data is sent to PI -> PI sends data to 3rd party software (and vice-versa). Would there be a transaction costfor the scenario abov