Combine two set of queries

Hi,Please can any one help me how to combine the following two queries...
Query 1
SELECT distinct GCC.segment1,GCC.segment2,GCC.segment3,GCC.segment4,GCC.segment5,
GCC.segment6, DECODE(gcc.segment6,NULL,'',SUBSTR(apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,6,gcc.segment6),1,40))
DETAILS, sum(gje.accounted_dr) BUDGET_2014
FROM  gl_je_lines gje, gl_code_combinations gcc
WHERE gje.code_combination_id(+)=gcc.code_combination_id
and je_header_id in (select je_header_id from gl_je_headers  where
BUDGET_VERSION_ID in (select Bv.budget_version_id from gl_budget_versions Bv , gl_balances bal  where BUDGET_NAME = 'BUDGET 2014_2' and actual_flag= 'B'))
and gcc.segment3 between 3100000000 and 3199999999 and gcc.segment2 =31
group by GCC.segment1,GCC.segment2,GCC.segment3,GCC.segment4,GCC.segment5,
GCC.segment6, DECODE(gcc.segment6,NULL,'',SUBSTR(apps.gl_flexfields_pkg.get_description_sql
(gcc.chart_of_accounts_id,6,gcc.segment6),1,40))
Query 2
SELECT distinct GCC.segment1,GCC.segment2,GCC.segment3,GCC.segment4,GCC.segment5,
GCC.segment6, DECODE(gcc.segment6,NULL,'',SUBSTR(apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,6,gcc.segment6),1,40))
DETAILS,sum(gje.accounted_dr) BUDGET_2011
FROM  gl_je_lines gje, gl_code_combinations gcc
WHERE gje.code_combination_id(+)=gcc.code_combination_id
and je_header_id in (select je_header_id from gl_je_headers  where
BUDGET_VERSION_ID in (select Bv.budget_version_id from gl_budget_versions Bv , gl_balances bal  where BUDGET_NAME = '2011 BUDGET' and actual_flag= 'B'))
and gcc.segment3 between 3100000000 and 3199999999 and gcc.segment2 =31
group by GCC.segment1,GCC.segment2,GCC.segment3,GCC.segment4,GCC.segment5,
GCC.segment6, DECODE(gcc.segment6,NULL,'',SUBSTR(apps.gl_flexfields_pkg.get_description_sql
(gcc.chart_of_accounts_id,6,gcc.segment6),1,40))

fermusic said...
"use I/O plugin in the Master 1-2 Output ... you will be able to route the signal to 3-4... or wherever you need.... just Bypass I/O plugin to return at 1-2 OUTs"
Thank you!
That's exactly how it works.
With the output assigned to 3-4 and input to 1-2, toggling the Bypass button switches the output.
And I don't have to replicate processors on the output 3-4 bus.
Very cool.
Cheers.

Similar Messages

  • Combining two queries in a join

    SQL> desc messages;
    Name Null? Type
    MESSAGEID NOT NULL NUMBER
    TITLE NOT NULL VARCHAR2(50)
    AUTHOR VARCHAR2(20)
    BODY NOT NULL VARCHAR2(4000)
    BOARD NUMBER
    THREAD NOT NULL NUMBER
    DATE_CREATED NOT NULL DATE
    SQL>
    I'm trying to combine both queries outlined below. The first query
    selects the very first message created in the messages table. It does
    this by checking whether thread=0. If it is that means it started a message.
    The second query checks the number of replies to the thread above.
    The replies to the above message
    will have a thread value the same as the above messageid.
    That is how a reply is identified.
    I am trying to do both queries in one so that the output has
    the starting message first with the name
    of the person who created the new thread(author), date_created, etc....below that
    then is the
    number of replies to the message,the author of each reply and the date....
    I'm using oracle 8i so i cant use the join key word...
    any ideas would be appreciated.
    ----selects message that started thread---------------------------------
    select b.title,b.boardid,m.messageid,m.title,m.author,
    m.date_created,m.body
    from messages m, boards b where b.boardid=m.board and m.thread=0 and b.boardid='198'
    and m.messageid='241';
    Thread title Author Starting message Last post
    Austrailia noel Austrailia 04/01/2005 21:22:35
    -----selects replies to the above message-----------
    select author,date_created,body
    from messages
    where board=198 and thread=241;
    AUTHOR DATE_CREATED BODY
    noel           05-JAN-05 Oz is played on clay
    noel 05-JAN-05 Oz played on grass
    noel 05-JAN-05     Oz played on grass

    This is a duplicate post of the following thread:
    URGENT: combining two sql statements

  • Combine two resultset sidebyside in coulmn using mdx

    hi i am new to mdx,
    i want to combine two select statement resultset (side by side like union) using mdx query,please any body help me to solve this query
    first query:
     SELECT
    { [Last Year] }
    ON COLUMNS,
     { {[Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11],
    [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16],
    [Location].[Location].&[9], [Location].[Location].&[18] },{[Location].[Location].[All]}}
    ON ROWS
    FROM [Cube1]
    WHERE ( [Measures].[Labour %] )
    here [Last Year] is a calculated set
    {STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-2) +"-11-01T00:00:00]"):
            (STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-1) +"-10-01T00:00:00]"))}
    2nd query:
    WITH MEMBER [Measures].[Budget ] AS IIF(avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),
                                            avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),0.00),
    MEMBER [Measures].[YTD] AS IIF(avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null))<>null,
                                  avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null)),0.00),
    FORMAT_STRING = "Standard",
    BACK_COLOR = CASE WHEN [YTD] = 0  THEN /*White*/16777215 /*White*/  
    WHEN [YTD] <= [Measures].[Budget ] THEN 65408
         WHEN [YTD]<= [Measures].[Budget ] +5 THEN 65535
         WHEN [YTD]> [Measures].[Budget ] +5 THEN 255
    END,
    VISIBLE = 1
    SELECT
    {  [Measures].[YTD], [Measures].[Budget ] }
    ON COLUMNS,
    { { [Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11], [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16], [Location].[Location].&[9], [Location].[Location].&[18]
    },{[Location].[Location].[All]} }
    ON ROWS
    FROM [Cube1]
    here   ==> [Measures].[YTD], [Measures].[Budget ] are calculated member
    i want result like in
    coulmns===> ytd,budget,nov,dec,jan,feb.,,,,,,,,,,out
    rows ====> are only locations and total(average of all locations)
    please guide me to get solution like mdx query

    Hi Vsp,
    According to your description, you want to create a calculated member to combine two members, and then set it as Default member, right?
    In SQL Server Analysis Services, we can use the script below to create a calculated members.
    create member currentcube.[Date].[Day of Week].[weekend]
    as
    {[Date].[Day of Week].&[6],[Date].[Day of Week].&[7]
    Every attribute in a dimension in Microsoft SQL Server Analysis Services has a default member, which you can specify by using the
    DefaultMember property for an attribute. This setting is used to evaluate expressions if an attribute is not included in a query. Please refer to the link below to see the detail information about specify a default member.
    http://technet.microsoft.com/en-us/library/ms174822(v=sql.105).aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • How do I combine two user accounts into one account?

    When we originally set-up our iMac, I set-up two accounts for my wife and I. Since then it has been a royal pain with music and applications sharing. How do I merge the two accounts into one?

    I found an answer to this by searching on "merging two accounts" rather than "combining two accounts." BTW, it's a little mini-nightmare if you only use "combine" on both Google and Apple support. At least this post might help others avoid the same fate.
    Here's where to go to find the answer: http://discussions.apple.com/message.jspa?messageID=5629676#5629676

  • How to combine two dimension in dashboard??

    Dear experts,
    I have a requirement that i need two combine two dimension in dashboard.
    Ex:-
    -  I have two different providers (Query1 and Query2) and both is having common dimension called Plant.
    - The plant from both query is having different values (for example, Query1 Plant = A,B,C and Query2 Plant = D,E,F,G)
    - Now I want the total list of plants from both query and list of plants will be used as filter on combo box in dashboard.
    Note: List of values for Plant (dimension) may increase or decrease from both query.
    Thanks and regards
    Vijay Muniraj

    Hi Vijay,
    How can you combine the 2 queries as a single query in dashboard?If i understood the query,use a Multiprovider for your requirement and get the combined results in single query and use Plant as single prompt in the dashboard(If you are getting data from BI).You cannot merge this behaviour in the dashboard.(In Web Intelligence you can merge it based on common dimension values only).
    Regards,
    Venkat

  • How to combine two photos in one without white border?

    I am trying to combine two different photos next to each other (each 10 cm * 7.5 cm) in one of 10 cm * 15 cm and save it as a jpg file. Unfortunately when I do this in the print module (custom package) I get a file with a white border. I have set up page settings to 10*15 cm without border. How can I get a combined file without a border?

    Titas,
    This involves row level comparison of the report column data values we can achieve this in BI Publisher but at answers level there is no option.
    Thanks,
    Saichand

  • Combine two jsp pages into single

    hai how to combine two jsp pages in to one
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionMessage;
    import org.apache.struts.action.ActionMessages;
    import com.latchiya.Constants;
    import com.latchiya.model.Staffinfo;
    import com.latchiya.service.Manager;
    import com.latchiya.webapp.form.StaffinfoForm;
    * Action class to handle CRUD on a Staffinfo object
    * @struts.action name="staffinfoForm" path="/staffinfos" scope="request"
    * validate="false" parameter="method" input="mainMenu"
    * @struts.action name="staffinfoForm" path="/editStaffinfo" scope="request"
    * validate="false" parameter="method" input="list"
    * @struts.action name="staffinfoForm" path="/saveStaffinfo" scope="request"
    * validate="true" parameter="method" input="edit"
    * @struts.action-forward name="edit" path="/WEB-INF/pages/staffinfoForm.jsp"
    * @struts.action-forward name="list" path="/WEB-INF/pages/staffinfoList.jsp"
    * @struts.action-forward name="search" path="/staffinfos.html" redirect="true"
    public final class StaffinfoAction extends BaseAction {
    public ActionForward cancel(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    return mapping.findForward("search");
    public ActionForward delete(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    if (log.isDebugEnabled()) {
    log.debug("Entering 'delete' method");
    ActionMessages messages = new ActionMessages();
    StaffinfoForm staffinfoForm = (StaffinfoForm) form;
    // Exceptions are caught by ActionExceptionHandler
    Manager mgr = (Manager) getBean("manager");
    Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
    mgr.removeObject(Staffinfo.class, staffinfo.getStaffId());
    messages.add(ActionMessages.GLOBAL_MESSAGE,
    new ActionMessage("staffinfo.deleted"));
    // save messages in session, so they'll survive the redirect
    saveMessages(request.getSession(), messages);
    return mapping.findForward("search");
    public ActionForward edit(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    if (log.isDebugEnabled()) {
    log.debug("Entering 'edit' method");
    StaffinfoForm staffinfoForm = (StaffinfoForm) form;
    // if an id is passed in, look up the user - otherwise
    // don't do anything - user is doing an add
    if (staffinfoForm.getStaffId() != null) {
    Manager mgr = (Manager) getBean("manager");
    Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
    staffinfo = (Staffinfo) mgr.getObject(Staffinfo.class, staffinfo.getStaffId());
    staffinfoForm = (StaffinfoForm) convert(staffinfo);
    updateFormBean(mapping, request, staffinfoForm);
    return mapping.findForward("edit");
    public ActionForward save(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    if (log.isDebugEnabled()) {
    log.debug("Entering 'save' method");
    // Extract attributes and parameters we will need
    ActionMessages messages = new ActionMessages();
    StaffinfoForm staffinfoForm = (StaffinfoForm) form;
    boolean isNew = ("".equals(staffinfoForm.getStaffId()) || staffinfoForm.getStaffId() == null);
    Manager mgr = (Manager) getBean("manager");
    Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
    mgr.saveObject(staffinfo);
    // add success messages
    if (isNew) {
    messages.add(ActionMessages.GLOBAL_MESSAGE,
    new ActionMessage("staffinfo.added"));
    // save messages in session to survive a redirect
    saveMessages(request.getSession(), messages);
    return mapping.findForward("search");
    } else {
    messages.add(ActionMessages.GLOBAL_MESSAGE,
    new ActionMessage("staffinfo.updated"));
    saveMessages(request, messages);
    return mapping.findForward("edit");
    public ActionForward search(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    if (log.isDebugEnabled()) {
    log.debug("Entering 'search' method");
    Manager mgr = (Manager) getBean("manager");
    request.setAttribute(Constants.STAFFINFO_LIST, mgr.getObjects(Staffinfo.class));
    return mapping.findForward("list");
    public ActionForward unspecified(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    return search(mapping, form, request, response);
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.upload.FormFile;
    import com.latchiya.Constants;
    import com.latchiya.webapp.form.UploadForm;
    * This class handles the uploading of a resume (or any file) and writing it to
    * the filesystem. Eventually, it will also add support for persisting the
    * files information into the database.
    * <p>
    * <i>View Source</i>
    * </p>
    * @author Matt Raible
    * @struts.action name="uploadForm" path="/uploadFile" scope="request"
    * validate="true" input="failure"
    * @struts.action-forward name="failure" path="/WEB-INF/pages/uploadForm.jsp"
    * @struts.action-forward name="success" path="/WEB-INF/pages/uploadDisplay.jsp"
    public class UploadAction extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    // Did the user click the cancel button?
    if (isCancelled(request)) {   
    request.removeAttribute(mapping.getAttribute());
    return (mapping.findForward("mainMenu"));
    //this line is here for when the input page is upload-utf8.jsp,
    //it sets the correct character encoding for the response
    String encoding = request.getCharacterEncoding();
    if ((encoding != null) && (encoding.equalsIgnoreCase("utf-8"))) {
    response.setContentType("text/html; charset=utf-8");
    UploadForm theForm = (UploadForm) form;
    //retrieve the name
    String name = theForm.getName();
    //retrieve the file representation
    FormFile file = theForm.getFile();
    //retrieve the file name
    String fileName = file.getFileName();
    //retrieve the content type
    String contentType = file.getContentType();
    //retrieve the file size
    String size = (file.getFileSize() + " bytes");
    String data = null;
    String location = null;
    // the directory to upload to
    String uploadDir =
    servlet.getServletContext().getRealPath("/resources") + "/"
    + request.getRemoteUser() + "/";
    //write the file to the file specified
    File dirPath = new File(uploadDir);
    if (!dirPath.exists()) {
    dirPath.mkdirs();
    //retrieve the file data
    InputStream stream = file.getInputStream();
    //write the file to the file specified
    OutputStream bos = new FileOutputStream(uploadDir + fileName);
    int bytesRead = 0;
    byte[] buffer = new byte[8192];
    while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
    bos.write(buffer, 0, bytesRead);
    bos.close();
    location = dirPath.getAbsolutePath()
    + Constants.FILE_SEP + file.getFileName();
    //close the stream
    stream.close();
    // place the data into the request for retrieval on next page
    request.setAttribute("friendlyName", name);
    request.setAttribute("fileName", fileName);
    request.setAttribute("contentType", contentType);
    request.setAttribute("size", size);
    request.setAttribute("data", data);
    request.setAttribute("location", location);
    //destroy the temporary file created
    file.destroy();
    //return a forward to display.jsp
    return mapping.findForward("success");
    ===========================================================================================
    i want to get second jsp file ie upload file to student file
    if anybody know please tell i am new to java side
    regards
    ranga

    ur not able to give solution
    insted giving comment mind ur words being in software fied
    commentting like bad words not good i warn u mind ur words

  • Combining two source fields in Import Manager

    Hi,
    I am trying to combine two source fields say fld1 with 5 digit and Fld2 with 3 digit so that combined fld3 of 8 digit can be mapped to a 8 digit field in destination MDM side.
    Any suggestion how to do this is highly appreciated
    Thanks,
    -reo

    Hi Reo,
    I am just adding details to how to combine fields in the import manager.
    To combine two or more existing partitions for a destination node steps are as follows:
    <b>1. </b>In the appropriate source hierarchy tree, select the node whose partitions you want to combine.
    <b>2.</b> click on the Partition Field/Value tab to make it the active tab.
    <b>3.</b> In the appropriate Partition list, select the two or more partition items you want to combine into a single partition.
    <b>4.</b> Click on the Combine button, or right-click on one of the items and choose Combine Partitions from the context menu.
    <b>5.</b> MDM combines the selected partition items.
    <b>6.</b> Now you can map this partition directly to the destination field.
    But as ur requirement seems ,u do not need to set delimiter.
    Hope it will help you and let me know the results. please remark .
    Thanks,
    <b>Shiv Prashant Dixit</b>

  • Combining two sales documents  into one billing document

    Hi Friends,
    I need to combine two sales document into one billing document. Header data is same in both sales document.
    I have set factory calendar in the payer master.
    Tried for data transfer rotine at copy control of item level. But was not sure which routine to be set.
    Please let me know, what all settings are required to create one combine billing document.
    Regards
    Suman

    Hi,
    Is it delivery based billing or order based billing?
    2 orders / 2 deliveries and 1 invoice.
    For the above situation you need to write a routine which eliminates document number difference for Reference and Allocation.
    If you do not have different customer purchase orders for these two sales orders and in your copy control from delivery to billing your assignment and reference numbers are blank then system will club these deliveries and create one sales order.
    Else you need to eliminate these by writing a copy control routine and assign it at the header level.
    Hope this helps.  Pl. revert in case of further clarifications.
    Thanks
    Krishna.

  • How can I combine two XDOXSLT functions?

    Hi all,
    I would like to combine two xdoxslt functions:
    <?xdoxslt:get_variable($_XDOCTX, 'minYear')?>
    with
    <?xdoxslt:get_day(‘2000-04-08’, $_XDOLOCALE)?>
    instead of 2000-04-08 I wrote this:
    <?xdoxslt:get_day(‘xdoxslt:get_variable($_XDOCTX, 'minYear')’, $_XDOLOCALE)?>
    but it doesn't work or the syntax is not accepted. Does someone know, how can I build that with XDOXSLT, please not XDOXF or something like that...
    thanks in advance
    Regards

    <?xdoxslt:get_day(‘2000-04-08’, $_XDOLOCALE)?>
    Set <?xdoxslt:set_variable($_XDOCTX, 'minYear', ‘2000-04-08’)?>
    Get <?xdoxslt:get_day(xdoxslt:get_variable($_XDOCTX, 'minYear'), $_XDOLOCALE)?>You can nest the xdoxslt functions.
    just make sure, you don't make them as string , .. don't pass them in single or double quotes.

  • Combining two like cd's into one in my library

    how do i combine two like cd's into one

    Give each CD its own disc number as Disc X of Y where in this case X would be 1 or 2, and Y would be 2. Then give both discs a common Album name and a common Album Artist.
    Personally I prefer to use sequential track numbers across both discs as well. For example if disc 1 has tracks 1-12 and disc 2 has tracks 1-13 I would renumber the tracks on the second disc as 13-25 and set a track total of 25 for all tracks on both discs.
    For more details see Grouping tracks into albums.
    tt2

  • Search view : Combine two search views into one serch view

    Hi ,
    We have a requirement for combining two search views into one and display single result view consisting of some fields from One search and few fields from other search.
    Ex. There are two seperate search views for Oppotunity and Quotation. Now we want to combine search views of both into one search view with selected fields and then display a single result view with combined fields from both result views .
    Kindly suggest me the steps I can follow to achieve the same.
    Thanks,
    Madhura

    Hi,
    This is possible by creating dynamic views in a window.
    1)create views you required.
    2)create a tray in the view 1 and a link and set the properties.
    3)create an outbound plug for the view1 and save the application.
    4)create one more link in the tray for view1 and set the properties and create one more outbound plug.
    5)go the main view view and create 2nd tray and create a UI container element in it.
    6) now embed view1 and view2 in the container .........................
    <removed_by_moderator>
    regards,
    Muralidhar .C
    Edited by: Stephen Johannes on Jan 26, 2010 7:53 AM

  • Combining two insert statements into one.

    I am using Oracle 19 g Release 10.2.0.1.0
    I have two dynamic complex queries running whose data looks similar to what i have loaded into current_tbl and past_tbl
    create table current_tbl as select * from(
    select '1' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '2' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '3' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '4' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '5' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '3' cast_key, '10' host_key, 'C' semester_cd from dual union all
    select '4' cast_key, '10' host_key, 'C' semester_cd from dual union all
    select '5' cast_key, '10' host_key, 'C' semester_cd from dual
    create table past_tbl as
    select * from(
    select '1' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '4' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '5' cast_key, '10' host_key, 'T' semester_cd from dual union all
    select '3' cast_key, '10' host_key, 'C' semester_cd from dual union all
    select '4' cast_key, '10' host_key, 'C' semester_cd from dual union all
    select '5' cast_key, '10' host_key, 'C' semester_cd from dual
    ) The process also dynamically builds insert statements into a temp_tbl, and runs in the loop for Semester_cd 'T' and Semester_cd = 'C', below are the queries it knows to run if its "T" or "C". The thing is it inserts duplicates. IS it possible to combine both the queires below and make a one insert statement.
    I do not want to use delete statement since it will be loading millions of records on each insert. also do not want to use (cast_key,host_key......) not in (select cast_key,host_key.... from temp_tbl)...
    Query 1
    insert into temp_tbl
    select *
    from current_tbl a, (select cast_key, max(Decode(semester_cd,'T','T',NULL)) t_ind,
                                max(Decode(semester_cd,'C','C',NULL)) c_ind
                         from past_tbl
                         group by cast_key) b
    where a.cast_key = b.cast_key(+)Query 2
    insert into temp_tbl
    select *
    from current_tbl a, (select host_key, max(Decode(semester_cd,'T','T',NULL)) t_ind,
                                max(Decode(semester_cd,'C','C',NULL)) c_ind
                         from past_tbl
                         group by host_key) b
    where a.host_key = b.host_key(+)Results it loads into each run of above query which loads duplicates
    Results by Query 1
    CAST_KEY    HOST_KEY    SEMESTER_CD    CAST_KEY_1    T_IND    C_IND
    1           10              T               1           T   
    2           10              T           
    3           10              C               3                   C
    3           10              T               3                   C
    4           10              T               4           T       C
    4           10              C               4           T       C
    5           10              T               5           T       C
    5           10              C               5           T       CResults by Query 2
    CAST_KEY    HOST_KEY    SEMESTER_CD    HOST_KEY_1    T_IND    C_IND
    1               10          T           10              T    C
    2               10          T           10              T    C
    3               10          C           10              T    C
    3               10          T           10              T    C
    4               10          C           10              T    C
    4               10          T           10              T    C
    5               10          C           10              T    C
    5               10          T           10              T    CIs there a way to to combine to one insert statement.

    If you just want to get rid of the duplicates (note that your sample results output doesn't appear to have any duplicate data), could you just UNION the two queries, i.e.
    INSERT INTO temp_tbl( column_list )
      <<query 1>>
      UNION
      <<query 2>>Of course, since the UNION will be removing duplicates, it will add some expense to the query, probably equivalent to sorting the result.
    Justin

  • Trying to prove one set of queries is killing performace (50% CPU)

    A set of queries for which SUM( cpu_time ) from the V$SQLAREA view represents around 50% of all CPU_TIME in the entire V$SQLAREA at any given point in time. We ran the check every 15 seconds and these queries always count for a hughe 40-60%.
    QUESTION: given that pin ratio is 99+% for SQL AREA, can we assert that these few queries are actually responsible for +/- 50% of the load ?
    This is important to us as we have a workaround that will be costly to put in place and want to confirm the hypothesis before undertaking the work. Moreover, thess queries are coming from an ERP and we may need their approval to do such customization.
    We saw interesting stuff on the FORUM confirming our thinking but could not see anything yet that positively confirms our approach.
    Thx a lot
    Claude Huard

    Thanks John,
    This is a long story. We first looked at Statpack info. We are READ and CPU intense. We have then identified the TOP SQL, the so-called "bad guys". We regognize them by the table they access.
    To see how bad the bad guys were, we have tried this V$SQLAREA thing I am questioning about and the numbers were impressive ( 40 - 65 % of CPU_TIME ).
    Parallelly, we could also confirmed that when then BUFFER_GETS go higher than a certain threshold, the response time for a typical query running every 20 minutes is degradating. The two curves follow a similar pattern.
    Tadam : we believe we have found the bad guys that most likely impact performance and make users complain.
    Fixing the bad guys is an issue because they are in the core of a financial ERP so we need a good case to undertake that effort. We would also prefer having the vendor’s support in the customization effort.
    To build our case, we though we could show the relative load of the bad guys with respect to the entire load. Back to the original question, maybe I shall nuance what I mean by the every-15-seconds lookup. We get the instant face value of the cumulative CPU_TIME (and BUFFER_GETS, etc.) for the cursors. One lookup is the sum of all cursors within V$SQLAREA. Another lookup is the sum of those bad guys matching a criteria (excluding our own query...). What we look at is the delta between two cumulative values. The sum of all cursors increases by such and the sum of the bad guys increases by such. That is the percentage of increase we are looking at. Does that approach make sense ?
    Plese note that the cumulative for the entire V$SQLAREA sometimes go down. To be thourouigh, we only consider snapshots where the total number of cursors + the sums look the same. We have several snapshotrs to look at so we only keep numbers that seem growing steadily. We pay attention to the number of cursors that typically is 3700. The pin ration of SQL AREA is close to 100% so we though the approach was raesonable.
    Thanks,
    Claude

  • Dear All, today i am trying to generate a chm in Robohelp 11, by combining two topics under a single book but again and again i am facing same issue  that is "Cannot open the file: mk:@MSITStore: C:\\Users\..\Desktop\filename.chm"

    Dear All, today i am trying to generate a chm in Robohelp 11, by combining two topics under a single book but again and again i am facing same issue  that is "Cannot open the file: mk:@MSITStore: C:\\Users\..\Desktop\filename.chm"
    Amy_WongWoojinDebbieclawsonmghalpinjwarrenJochem van DietenLee Design
    Please help me in solving the same

    HI,
    Thanks for the response.
    I am really tensed for the same...
    Actually the error occurs in the following case:
    1. I am creating a Parent folder in robohelp with the name ABC..
    2. Next Under ABC i have created 2 separate folders say XYZ and EFG.
    3. Under XYZ i have created various Topics say 2 or 3.
    4. Under EFG i have created various Topics say 7 or 8.
    5. Now, i have created a TOC with name for ABC (Parent Folder.)
    6. Next i have dragged and dropped my two sub folders that i have created under ABC in Project Set up wizard that is XYZ and EFG, in order to generate the webhelp first and then the CHM file fo rthe same.
    7. Webhelp is successfully getting generated.
    8. But when i convert the Webhelp to CHM Converter, after few seconds the robohelp gets halt and it shuts up the robohelp, showing a message dialog box that the Adobe Robohelp 11 is Troubleshooting for the error, the Windows manager will get back to you..Someting like this, the .CHM file for the same gets generated on the described path, but when i click on it, it does not open and shows the error as "Cannot open file: mk:@MSITStore: C:\\Users\..\Desktop\filename.chm".
    Please  help me in sorting the above issue.
    According to me:
    I think i am Lacking in the two things:
    1. How to link all the topics with the parent folder.
    2. How to Merge the projects.
    Can you please provide me the link where i can get tutorial to create a TOC for multiple files in a same TOC and to generate a chm for them.
    Actually for single project folder i have worked successfully. But, its first time i have to create a chm with lot many sub folders in it, as like one create a book.
    Please help
    Thanks & Regards,
    dhm

Maybe you are looking for

  • What are the roles in CRM implementation Project(all generic extractions)

    Hi Gurus, Now I am placed from a support project from BW (CRM) implementation project(all are generic extractions). & I am also new to implementation project. what are the neccessary steps to be taken when we are implementing BW for CRM. Gurus please

  • How do I lock in Firefox to English only?

    I live in Japan but cannot read kanji, therefore most of the time am not heading for the pages in Japanese that open up via Firefox after using a search engine. This occurs nine times out of ten. I'm tired of playing hunt and peck trying to find the

  • Extended Program check for multipl programes in single run

    Hello All, I wan to do the syntax check for multiple programs at single execution run. SAP has provided SLIN transaction for single program, Is there any SAP standard transaction similar as SLIN for multiple program check at single execution run? Tha

  • Validator shows errors affecting SERPs for my site

    This is the SERP for my site for the keyword Loan Modification: I cannot figure out why it is not picking up my title tag and meta from my index.html page, which is what I need the SERPs to pick up Here is the head section of my Index.html code. <!DO

  • Reinstall iSync?

    I have somehow managed to delete the iSync application some time ago. Now I need it reinstalled but would prefer not to have to reinstall Tiger from scratch... (might as well wait for Leopard then). I have two isync files left om my disk. iSync.pkg a