Build view with data rows from one of two views.

Hello. I've got problem with PL/SQL.
I have built two PL/SQL views. Now I have to write a third
view based on the data from "view_1" or "view_2". "view_2" contains all data rows
but "view_1" contains special information. If the needed data rows (it's
always a tupel of two rows) are available in "view_1" i have to use these data.
Are they not available in "view_1" i have to get it from the second view.
I've tried it with the DECODE function and a procedure I've written but I think it's
the completly wrong way because I have to search for a tour_id and there are always
two shipments for one tour.
It looks something like:
>
SELECT
DECODE(FNC_OPERATION_INSTRUCTION_EXISTS(T1.TOURNO),0,
(SELECT SHIPPING_NO
FROM VIEW_SHIPPINGADRESS
WHERE TOUR_ID=TO_CHAR(T1.TOURNO)),
(SELECT SHIPPING_NO
FROM VIEW_SHIPPINGADRESS_OPERATION_INSTRUCTION
WHERE TOUR_ID=TO_CHAR(T1.TOURNO)) "SHIPPING_NO"
FROM
TB_TOURS     T1
WHERE
But for sure I've got the error "ORA-01427: single-row subquery returns more than one row."
because there are always two rows for one T1.TOURNO.
I think that it's a standard problem but I also think that I'm on the wrong way.
I will be very thankful for any hint.
Thanx,
Christoph

select col1,
       col2,
       col3
  from  (select (select decode(count(*),0,0,1) cnt
                   from view_1
                  where ...)) chk,
                 col1,
                 col2,
                 col3
           from view_1
          where ...) tab1
where tab1.chk = 1
union all
select col1,
       col2,
       col3
  from  (select (select decode(count(*),0,0,1) cnt
                   from view_1
                  where ...)) chk,
                 col1,
                 col2,
                 col3
           from view_2
          where ...) tab1
where tab1.chk = 0note: untested.

Similar Messages

  • One user receiving WINMAIL.DAT attachments from one or two domains

    I have a single user in our organization that is RECEIVING WINMAIL.DAT attachments which contain PDF's from only one or two domains external to the organization.
    Let me be clear that he is not sending out WINMAIL.DAT attachments to anyone. I have tested sending him RTF emails with a PDF attachment from an external address and he is receiving them just fine. We are running two Exchange 2013 servers in
    HA configuration and this user is using Outlook 2010 for his email client. If he looks at these messages in OWA, they still have the WINMAIL.DAT attachment within OWA. I cannot find an answer for this anywhere, and this is not related to disabling TNEF on
    our exchange servers.  Does anyone have any ideas?  I would really appreciate the assistance.
    Thanks,
    Dean

    Hi
    Did you try this article -
    http://support.microsoft.com/kb/278061/en-us
    If the above article did not help then you can try the following
    1) Create an external contact for sender email address from whom the email is sent to the affected user.
    Run the below command for that sender external contact
    Set-MailContact "External Contact" -UseMapiRichTexFormat Never
    Ask the user to send email once again to that affected recipient and see if it still occurs.
    Most likely the latter should fix your problem.
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you.
    Regards,
    Sathish

  • HOW TO GET THE SELECTED VALUE IN A ROW FROM ONE VIEW TO ANOTHER VIEW?

    hi all,
    I  have a small issue.
    i have created two views.In the table of the first view i'm selecting a row and pressing the button it will move to next view.
    i am adding some fields manually in the table of the second view and pressing the save button.Here all the values should get updated corresponding to the field which i have selected in the first view.
    I want to know how to get the particular field in the selected row from one view to another view.
    Kindly help me.

    Hi,
            Any data sharing accross views can be achiveved by defining CONTEXT data in COMPONENT CONTROLLER and mapping it to the CONTEXT of all the views. Follow the below steps.
    1. Define a CONTEXT NODE in component controller
    2. Define same CONTEXT NODE in all the views where this has to be accessed & changed.
    3. Go to CONTEXT NODE of each view, right click on the node and choose DEFINE MAPPING.
    This is how you map CONTEXT NODE and same can be accessed/changed from any VIEW or even from COMPONENT CONTROLLER. Any change happens at one VIEW will be automatically available in others.
    Check the below link for more info regarding same.
    [http://help.sap.com/saphelp_nw04s/helpdata/EN/48/444941db42f423e10000000a155106/content.htm]
    Regards,
    Manne.

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    This is planned to be fixed in the next release.

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

  • Copying table rows from one table to another table form

    Hi
    I have a problem about Copying table rows from one table to another table form.On jsf pages if you enter command button go anather jsf page and it copy one row to another table row. But when i execute this process for table FORM it doesn't copy I wrote a code under "createRowFromResultSet - overridden for custom java data source support." Code block is:
    ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);
    try{
    AdfFacesContext fct = AdfFacesContext.getCurrentInstance();
    Number abc = (Number)fct.getProcessScope().get("___");
    value.setAttribute("___",abc);
    }catch(Exception ex){System.out.println(ex);  }
    return value;

    Table may be copied with the
    expdp and impdp utilities.
    http://www.oracle.com/technology/products/database/utilities/index.html

  • Call a Graphical Calc view with input Parameters from a Script Based Calc View

    Hi All.
    I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                 WITH PARAMETERS  ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
                                     'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
    START_DATE  and END_DATE are input parameters of the script based calculation view.
    Can anyone please help me with the correct syntax for accomplishing this?
    Thanks,
    Goutham

    Hi Gautham,
    One more option  what i would like you to try is the below option , here i have just changed the order of passing nothing else.
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                   ('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
                                  'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
    Regards,
    Vinoth

  • Aperture shared over a network for viewing with Front Row?

    Aperture shared over a network for viewing with Front Row? I can view iPhoto from my laptop or desk top but I cannot find a way to share Aperture over the network.

    If tested to work with other MacOs versions, this should be a main FAQ listed on Apple's Support website for Aperture and/Mac OSX.

  • I need a resultset with 10 rows from dual

    Which is the easiest SELECT I have to write, when the question is: "I need a resultset with 10 rows from dual"
    one solution is
    SELECT 'X' FROM EMP WHERE ROWNUM <= 10;
    problem: if emp has fewer than 10 rows, I have an incorrect resultset
    another problem: if I need 1000 and not 10 dummy-rows, than is emp definitely the wrong way, because the default-emp table has only 14 rows.
    Is there an easy generic solution for this problem? If I need only one row, Oracle has the workaround with the DUAL-table.

    What about this new method (dedicated by me to this great FORUM!). It is easy to use, easy to understand, and very fast:
    SQL> set echo on
    SQL> set timing on
    SQL> select rownum
      2    from all_objects
      3   where rownum <=10;
        ROWNUM
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    Elapsed: 00:00:00.00
    SQL> select COUNT(rownum)
      2    from all_objects
      3   where rownum <=1000;
    COUNT(ROWNUM)
             1000
    Elapsed: 00:00:00.00
    SQL> with r1000
      2  as (select rownum
      3        from all_objects
      4        where rownum <=1000)
      5  select count(rownum)
      6    from r1000, r1000
      7   where rownum <= 1000000;
    COUNT(ROWNUM)
          1000000
    Elapsed: 00:00:00.05 -- !for 1 million numbers!
    SQL> with r1000
      2  as (select rownum
      3        from all_objects
      4        where rownum <=1000)
      5  select count(rownum)
      6    from r1000, r1000, r1000
      7   where rownum <= 10000000;
    COUNT(ROWNUM)
         10000000
    Elapsed: 00:00:04.09  -- !for 10 millions numbers!

  • Fill a table with data coming from an RFC

    Hello everyone:
    I've followed the Weblog "How many lines of java code did i write for a simple Web Dynpro?"
    /people/durairaj.athavanraja/blog/2004/10/17/how-many-lines-of-java-code-did-i-write-for-a-simple-web-dynpro
    I've called an RFC and created a table with data coming from it (which is also a table). My question is, if in this table there's a field named "UserType" there are two possible values for this field:
    "userA"
    "userB"
    How can I get the table only show me the "userA" registers? The RFC does return all of the users, but when filling the table, can I put an if-else somewhere on my code?
    Thanks a lot
    Alejandro

    Hi Alejandro,
    Referring to the link provided "The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed."
    We would have to implement the action onFilter in the controller implementation. Ideally, we fill the data retrieved from backend into a List (java.util.List) (this could be done on init of view) and then subset the list after meeting the criteria in the action handler(say
    onActionFilterData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent).
    Having done this, you may bind the output list back to the node (shown in table)
    Regards,
    Chaitanya

  • Passing Multiple rows from one external webpart list to another

    Hi Folks,
                    I have almost spent 1 week looking into this without any success. I have an external list "List A"  (in a webpart) with one of the columns as "State".
    Another external list "List B"  (in a webpart ) has state and user as columns. In some case I want to pass 1 state and in another I want to pass multiple state.  Passing one state from List A to List B works fine. But Multiple state does
    not work because the webpart list has the property "Send First row to connected web parts when page loads".  If I disable this option then the web part does not pass anything. Is there a way to pass multiple rows from one Webpart
    external list to other?

    http://www.sharepointanalysthq.com/2010/07/bcs-external-list-limitations/
    No Lookups
    Unfortunatly the only thing that you can do a look up on in an external list is on the ID column, anything else and you are out of luck.
    http://social.technet.microsoft.com/Forums/en-US/615771a0-ba78-4e38-9e2d-ded0204173ba/external-list-referenced-as-sharepoint-lookup?forum=sharepointgeneralprevious
    Try below webpart. it should help
    http://www.sparqube.com/SharePoint-Lookup-Column/
    If this helped you resolve your issue, please mark it Answered

  • How to execute procedure returning data rows from sql plus

    Hi,
    I want to execute a stored procedure that returns data rows from sql plus. please let me know the syntax for the same.
    Thanks,
    YG

    user13065317 wrote:
    Even if i get the result set into the cursor, do i have to do normal fetch into all the coumn variables within a loop
    But suppose no of columns in my result set varies depending on a parameter to the stored procedure.
    Is there any straightforward way to retrieve all the data irrespective of no of columns in the result set.There is no such thing as a "+result set+". Oracle does not create a temporary data set in memory that contains the results of your query. What would happen if this result set is a million rows and is too large to fit into memory? Or there are a 100 clients each with a 100,000 row result set?
    This is not scalable. You will be severely limited in the number and sizes of these "+result sets+" that can be created in server memory.
    A cursor is in fact a "program" that is created by compiling the SQL source code that you provide. This source code is parsed and compiled into what Oracle calls an execution plan. This is nothing but a series of instructions that the cursor will execute in order to return the rows required.
    Thus the result set is actually the output from a cursor (a program). Likewise, bind variables are the input parameters to this program.
    All SQLs are parsed and compiled as cursors and stored in the SQL Shared Pool. Oracle gives you handle in return to use to address this cursor - bind values to it, execute it, describe the output structure returned by the cursor, and fetch the output from the cursor.
    On the client side, this handle is used in different ways. In PL/SQL alone, this cursor handle can be used as an implicit cursor (you do not even see or use the cursor handle in your PL/SQL code). Or you can use a PL/SQL cursor variable. Or a DBMS_SQL cursor variable. Or a reference cursor variable.
    Why so many different client structures for the very same SQL cursor handle returned by Oracle? Because to allow you, the programmer, all kinds of different features and flexibility.
    The ref cursor feature is the ability to pass this cursor handle around, not only between PL/SQL code, but also from PL/SQL to the actual client process (Java. VB, SQL*Plus, TOAD, etc).
    The primary thing to remember - irrespective of what the client calls this (e.g. ref cursor, SQL statement handle, etc), this all refers to the same SQL cursor in the Shared Pool. And that this SQL cursor is a program that outputs data, and not a result set in itself.

  • Customer master data updation from one system to another system

    HI  Experts,
    I have an issue with customer master data updation from one system to another system. And here only one field is not updating properly from one system to another system. and we found this is through idoc , but we don't find field in any segment.
    and the field is called ADDR1_DATA-HOME_CITY.
    and this will displayed as different city in address column.
    but as per the notes given in help , it is by program , form through only passing. but not able to trace and as per my analysis ADRC table , ADRNR  had this field HOME CITY.
    And this is for some customers updating wrong one from one system to another system , and for some customers field itself not updating in address column.
    please can you suggest any one. here are screenshot for your reference.

    that is not enough, it was enough in times before 40b release, but this was in the  last century
    Please read OSS note 384462 - Master data and addresses
    it explains what you have to do for ALE

  • Data Load into two data targest from one DataSource

    Hi,
    I want to load data into two data targest from one DataSource. I did full load, then Initialization & delta settings for that DataSource. But I want to load data into one data target using delta InfoPackage & into 2nd data target using Full Load InfoPackage. Can I schedule execution of these 2 infopackges one delta & 2nd Full load InfoPackage for the same DataSource simaltaneously?
    Regards,
    Pradip

    Hi,
    In BI, You can achieve this. As thorugh info package, you laod data till PSA only. Then it is being loaded to other data targets.
    Create two DTPs, one with FULL load and another one with Detla Load. It will work.
    In R/3 Side, As sandeep has mentioned , there might be possibility that if you run full load after delta , your delta may get corrupt. i am not sure about that , but there is a possibility.
    - Jaimin

Maybe you are looking for

  • How do i change my icloud account on my ipad when i have changed mail address

    Hello, I have been forced to change my email address and it has been de-provisioned by the ISP. I am trying to setup my ICloud access and I am being asked to verify my new Apple ID using the defunct address which no longer works! Any ideas on how I c

  • External (Time Machine) HD won't mount

    I have an external Hard Disk (CnMemory, 1.5 TB, USB 3.0), partitoned as 1TB MS-DOS-Fat, ½TB Mac OS Extended. The HD has been working for months as Time Backup for my MacBookPro, the other as Data Backup for Windows and OS/X (Maverick). Suddenly the b

  • Barcode in SAP R/3

    Dear All, My Client requires  Barcoding to enable in SAP r/3 system while doing the cash sales.Can anyone help me on this how to intergrate the barcoder with sap r/3. What are the configuration required for this. Thanks in advance. Thanks and Regards

  • Help Outgoing Payment

    Dear All Experts, I want to write a Transaction Notification that if a particular Outgoing Payment is being added by cheque (Vendor or On Account) then a field in table OVPM should not be blank. Otherwise it should be added. Plz help me to do this.

  • Fail to re-deploy an application on Oracle EPM 11.1.1.1.0

    Hi, I am just trying to verify that whether Alias Table takes effect. So I add change some aliases for testing, and then re-deploy the application to activate it. But the re-deploy job is aborted by the system with an exception as below. Have anyone