Inner join with data also from non having join column

I have an Dim table which has to be joined with Fact Table using inner join, but also display the Dimension value " MasterGroup " inspite of data present or not in the fact table.
My Query:  .. This is an part of my stored procedure with more tables
SELECT a.SalesAmount, b.HeaderGroup ,c.CityName
FROM dbo.FactItem a
inner join dbo.[DimHeader] b
on a.sid = b.sid
left join dbo.DimCity c
on a.cityid = c.id
My DimHeader Table will have data like
MasterGroup
ChildGroup
etc...
which is an attribute.
There might not be any relevent fact data, but still i want the dimension data to display the "MasterGroup"
ShanmugaRaj

hello ,
usually this is not possible when the column you want to display when the matches not found from a table having a distinct values which are hard to declared static..
you can incorporate something like this if you cant change the join type ..
select distinct HeaderGroup from dbo.[DimHeader] tbl_outerleft join (SELECT a.sid,a.SalesAmount, b.HeaderGroup ,c.CityName
FROM dbo.FactItem a
inner join dbo.[DimHeader] b
on a.sid = b.sid
left join dbo.DimCity c
on a.cityid = c.id) tbl_Main on tbl_Main.sid =tbl_outer.sid
Dilip Patil..

Similar Messages

  • 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

  • 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

  • Data extraction from Non-Unicode ECC6 to Unicode SAP BI system

    Hi,
    We have an existing non-unicode ECC6 system. Currently we are installing SAP BI unicode system. Can anyone tell me are there any issues in data extraction for SAP BI from a non-unicode ECC6 system to an Unicode SAP BI system ?
    Please also note that our data consists of Asian (korean, Japanese & Chinese) fonts.
    Regards,
    Anirban

    Hi Des Gallagher,
    Thank you for your reply.
    I have gone through the notes suggested by you, but they suggest issues related to BW 3.x versions. We are currently on SAP_BW 700 - SP16. Also, among other notes i found note 510882 which might be helpful for custom developments.
    But i am still wondering whether we are going to face major issues related to data extraction from non-unicode ECC6 system to unicode SAP_BW 700 system.
    Incase you have any further details, please let me know.
    Thanks in advance.
    Regards,
    Anirban Kundu

  • On deleting an item "Name" column of recycle bin is updating with data in one of the custom column instead of title field in SP 2013 Custom list

       On deleting an item, "Name" column of recycle bin is updating with data in one of the custom column instead of title field in SP 2013 Custom list.
    Thanks, Chinnu

    Hi,
    According to your post, my understanding is that you want to update title field in recycle bin with other field value of the item.
    We can use the ItemDeleting Event Receiver to achieve it.
    While item is deleting, replace title field value with other field value using ItemDeleting event receiver, then in the recycle bin, the title value will replace with other field value.
    However, there is an issue while restore the item from the recycle bin, the item title would be replaced.
    As an workaround, we can create a helper field in the list to store the title field value while deleting, then replace back while restoring using
    ItemAdded Event Receiver.
    I have made a simple code demo below to achieve this scenario, it works like a charm(the
    Test2 field is the helper field, you can hide it in the list), you can refer to it.
    public override void ItemDeleting(SPItemEventProperties properties)
    properties.ListItem["Test2"]=properties.ListItem["Title"];
    properties.ListItem["Title"]=properties.ListItem["Test1"];
    properties.ListItem.Update();
    base.ItemDeleting(properties);
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    base.ItemAdded(properties);
    properties.ListItem["Title"] = properties.ListItem["Test2"];
    properties.ListItem.Update();
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Join With Date Dimension

    Hi,
    I have one Dimension called Caseheader and Date Dimension. In Date dimension I have date key  yyyymmdd format. I have fact table in which i am getting CaseCreationDate from Caseheader Dimension. in case creationdate it contains time as well because
    there is a requirement to do some reports based on timing.
    When I join case creationdate to date column in a data source view with date dimension i do not get any thing  and get error in cube processing as well because it does not match with case creationdate because of time. What is the best possible approach
    to resolve this issue? Do I need to add time dimension? or have a time field in date dimension?
    Could anyone suggest please?
    MH

    Thanks Christian, I have separated date and time and kept the original field with datetime as well in case if somebody wants it for reporting purpose. Thank you so much for all your help suggestions. Much appreciated. Used this code
    convert(date,ch.CaseCreationDate)asCaseCreationDate
    ,convert(varchar(8),convert(time,ch.CaseCreationDate))as[CaseCreationTime]
    Regards,
    Mustafa
    MH

  • How to populate DataGird with data returned from php page?

    Hi, I'm new in Flex, I try to populate DataGrid with data from PHP, My code is
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false" method="POST" showBusyCursor="true" resultFormat="e4x">
    </ mx:HTTPService>
    <mx:DataGrid 
    id="searchResult" dataProvider="{???what to paste here???}" y="30">
    </mx:DataGrid>
    private  
    function getPerson(evt:ResultEvent):void { var res:XMLList = evt.result..dane as XMLList;searchResults =
    new XMLListCollection(res); 
    output from PHP
    <person>
    <dane>
    <name>ABC</name>
    <street>XLXXLX</street>
    </dane>
    <dane>
    <name>DEF</name>
    <street>YAYAYAY</street>
    </dane>
    </person>
    If I set the dataProvider as "searchResults" it doesn't work. I probably have to set as dataprovider any ArrayCollection , but I don't know how to convert my XMLListCollection to it.
    Could anyone help me populate Datagrid with
    name | streer
    ABC, XLXXLX
    DEF, YAYAYAY
    Best Regards,
    Mariusz

    Thanks for your reply, but I'm afraid it doesn't work :-( Could you browse my code and check what I'm doing wrong???
    full mxml code:
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="personRequest.send()">
    <mx:Script><![CDATA[
         import mx.rpc.events.ResultEvent; 
         [Bindable]
         public var searchResultsXML:XML;  
         private  function getPerson(evt:ResultEvent):void 
          {          searchResultsXML = (evt.result
    as XML);
              trace(searchResultsXML);     }
    ]]></mx:Script>  
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false"
    method="POST" showBusyCursor="true" resultFormat="e4x"></mx:HTTPService>
    <mx:DataGrid  id="searchResult" dataProvider="{searchResultsXML.dane}"></mx:DataGrid>
     </mx:Application> 
    trace statement returns:
    <person>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Nowogródzka</ulica>
    <dom>7B</dom>
    <lokal>25</lokal>
    </dane>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Sybiraków</ulica>
    <dom>15</dom>
    <lokal>27</lokal>
    </dane>
    </person>

  • Issue with Data Extraction from OAGIS 9 User Area Tags ...

    We are working on displaying the data coming from OAGIS9 into Excel sheet. We created a custom Schema for the Excel sheet and are able to display all the data in OAGIS9 except for the ones in UserArea. We are facing issue in extracting data from tags present in UserArea of OAGIS 9 schema and transforming it into our Custom built schema.
    Can you please suggest us some way in which we extract data from userArea?
    Thanks in advance ~

    Here is the example with instructions, we have just done it and working
    1.You need to have the custom schema that is coming with in the <UserArea>/<any>
    For example this custom schema is like this one shown below and you are using this CutomerPartyMaster of OAGIS
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns="http://www.userarea.com/mdm/oagisextensions" elementFormDefault="qualified" targetNamespace="http://www.userarea.com/mdm/oagisextensions" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Customer" type="CustomerType" />
    <xs:complexType name="CustomerType">
    <xs:sequence>
    <xs:element minOccurs="0" name="Gender" type="xs:string" />
    <xs:element minOccurs="0" name="DOB" type="xs:date" />
    <xs:element minOccurs="0" name="SSN" type="xs:string" />
    <xs:element minOccurs="0" name="PAN" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    and the Input data snippet will be like this inside CustomerPartyMaster
    <tnsa:UserArea>
         <tnso:Customer>
              <tnso:Gender>string</tnso:Gender>
              <tnso:DOB>1980-10-13</tnso:DOB>
              <tnso:SSN>string</tnso:SSN>
              <tnso:PAN>string</tnso:PAN>
         </tnso:Customer>
    </tnsa:UserArea>
    where xmlns:tnsa="http://www.openapplications.org/oagis/9" and xmlns:tnso="http://www.userarea.com/mdm/oagisextensions"
    Lets assume your Target Schema is like this where only DOB is coming from userarea
    <CreateRequest>
    <record>
    <firstname></firstname>
    <lastname></lastname>
    <dob></dob>
    </record>
    </CreateRequest>
    2.declare the name space of incoming userarea custom schema in your xsl file like this
    xmlns:nsext="http://www.userarea.com/mdm/oagisextensions"
    3.here is xsl code that copies element from CustomerPartyMaster/UserArea
    <xsl:template match="/">
    <imp1:CreateRequest>
    <xsl:for-each select="/inp1:ESBProcessCustomerRequest/body/ns4:ProcessCustomerPartyMaster/ns4:DataArea/ns4:CustomerPartyMaster">
         <imp1:record>
    <xsl:for-each select="ns4:UserArea/nsext:Customer/nsext:DOB">
              <imp1:dob>
              <xsl:value-of select="."/>
              </imp1:dob>
         <imp1:record>
    </xsl:for-each>     
    where imp1 is target schema namespace
         ns4 is OAGIS standard namespace.
    *****************

  • Populating a matrix cell with data selected from a picker

    Dear All,
    I am new to SAP Bussiness one, please let me know how to get the selected data from a picker in to a matrix cell. I have warehouse code and warehouse name in the picker. I want the user selected warehouse code in the matrix cell
    Below is my code But I am not getting the selected code in the matrix cell
    I am adding the datasource as below
    oUserDataSource = oForm.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
    Then I am adding the choose  list  as below
    Private Sub AddChooseFromList()
            Try
                Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                Dim oCons As SAPbouiCOM.Conditions
                Dim oCon As SAPbouiCOM.Condition
                oCFLs = oForm.ChooseFromLists
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                ' Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "64"
                oCFLCreationParams.UniqueID = "CFL1"
                oCFL = oCFLs.Add(oCFLCreationParams)                
            Catch
                MsgBox(Err.Description)
            End Try
        End Sub
    *Then I am binding the data as below to the matrix column*
    oColumn = oColumns.Item("colToWhs")
            oColumn.DataBind.SetBound(True, "", "UDCFL")
            oColumn.ChooseFromListUID = "CFL1"
    Then in the event i have added the  below code.
                        Dim oDataTable As SAPbouiCOM.DataTable
                        oDataTable = oCFLEvento.SelectedObjects
                        Dim val As String
                        Try
                            val = oDataTable.GetValue(0, 0)
                        Catch ex As Exception
                        End Try
                        oForm.DataSources.UserDataSources.Item("UDCFL").Value = val
                       End If
    But the code is not getting populated in the matrix cell. Please let me know at the earliest
    Thanx in Advance

    sOLVED

  • Trouble with "data transfer" from old computer. Cannot open documents. Please help! Thank you.

    Apple did a "data transfer" from our old computer onto our new iMac, and we cannot open any of our old documents that were "transfered." When I open them in "TextEdit," all I get is a lot of random letters and symbols. I've tried everything, please help. Thank you!

    What old documents, you need to be much more specific. The info we are loooking for is what app created them, what the file extension is etc...

  • Left outer join with NVL as part of the join criteria

    Hi,
    I have query like this:
    Select
    Main.X_ID,
    NVL(Option1.Y_ID, Option2.Y_ID),
    Main.Z_ID
    from TableMain Main
    left join (Select X_ID, Y_ID from TableOption where type_cd = 'Type1') Option1
    on Main.X_ID = Option1.X_ID
    left join (Select X_ID, Y_ID from TableOption where type_cd = 'Type2') Option2
    on Main.X_ID = Option2.X_ID
    left join TableSub Sub
    on Main.Z_ID = Sub.Z_ID
    and Sub.Y_ID = NVL(Option1.Y_ID, Option2.Y_ID)
    where Sub.Z_ID is null and Sub.Y_ID is null
    Basically i want to show all in Z_IDs TableMain that are not in TableSub where the joining Y_ID is Type1 and if there is not a Y_ID for Type1, then use the Y_ID for Type2.
    The query works if Type1 exists but doesnt if Type1 doesnt and Type2 does.
    Is NVL the correct function to use in the join? Or is there a better way to write such a query?
    Any help would be greatly appreciated. Thanks!!
    FYI all IDs are NUMBERs.

    Hopefully this is easier to understand :)
    Im using 11g.
    DDL and data:
    create table tablemain (
      x_id number (20),
      z_id number (20),
      amount number(20)
    insert into tablemain values (1, 1000, 6767.45);
    insert into tablemain values (1, 1001, 767.45);
    insert into tablemain values (1, 1002, 67.85);
    insert into tablemain values (1, 1003, 997.85);
    insert into tablemain values (2, 1002, 1997.85);
    insert into tablemain values (2, 1004, 197.85);
    insert into tablemain values (2, 1005, 7.85);
    insert into tablemain values (3, 1000, 7.44);
    insert into tablemain values (3, 1006, 447.88);
    create table tableoption (
      y_id number (20),
      x_id number (20),
      type_cd varchar2(20)
    insert into tableoption values (800, 1, 'Type1');
    insert into tableoption values (800, 3, 'Type2');
    insert into tableoption values (801, 1, 'Type2');
    insert into tableoption values (802, 2, 'Type1');
    create table tablesub (
      y_id number (20),
      z_id number (20)
    insert into tablesub values (800, 1000);
    insert into tablesub values (800, 1001);
    insert into tablesub values (800, 1004);
    insert into tablesub values (800, 1006);
    insert into tablesub values (801, 1001);
    insert into tablesub values (801, 1002);
    insert into tablesub values (801, 1005);
    insert into tablesub values (801, 1006);
    insert into tablesub values (802, 1005);
    insert into tablesub values (802, 1004);Query:
    SELECT Nvl(option1.y_id, option2.y_id) as y_id,
           Nvl(option1.x_id, option2.x_id) as x_id,
           mains.z_id,
           mains.amount
    FROM   tablemain mains
           left join (SELECT x_id,
                             y_id
                      FROM   tableoption
                      WHERE  type_cd = 'Type1') option1
             ON mains.x_id = option1.x_id
           left join (SELECT x_id,
                             y_id
                      FROM   tableoption
                      WHERE  type_cd = 'Type2') option2
             ON mains.x_id = option2.x_id
           left join tablesub sub
             ON mains.z_id = sub.z_id
                AND sub.y_id = Nvl(option1.y_id, option2.y_id)
    WHERE  sub.z_id IS NULL
           AND sub.y_id IS NULL What the output should be:
    y_id ---- x_id ---- z_id ---- amount
    800 ---- 1 ---- 1002 ---- 67.85
    800 ---- 1 ---- 1003 ---- 997.85
    801 ---- 1 ---- 1000 ---- 6767.45
    801 ---- 1 ---- 1003 ---- 997.85
    802 ---- 2 ---- 1002 ---- 1997.85
    Currently the output of the query is:
    800 ---- 1 ---- 1002 ---- 67.85
    800 ---- 1 ---- 1003 ---- 997.85
    802 ---- 2 ---- 1002 ---- 1997.85
    It is missing where 801 is type2 only in the tableoption:
    801 ---- 1 ---- 1000 ---- 6767.45
    801 ---- 1 ---- 1003 ---- 997.85
    Edited by: Hazy on Feb 22, 2012 3:25 PM

  • Solution for Data transfer from Non-network location

    If i  needed 10 non-networked locations around Australia to submit data (say text files ranging from 20 - 100 mb each) each day to my server, and the data loaded and manipulated into a database in a secure environment, would you be able to describe the key points and a possible solution to this problem ?

    Hi Amar,
    FTP [File Transfer Protocol] alone isnu2019t a viable option to give the insight, security, performance, and, ultimately, the risk mitigation necessary to responsibly conduct business.One of the solution to protecting and transferring sensitive or mission-critical data securely is Managed File Transfer (MFT). Managed File Transfer solutions provide a greater level of security, meet strict regulatory compliance standards and give you the reliability you need in a data transfer solution.
    Points to look for in a solution:
    a.  Providing file transfer transparency throughout your entire organization.
    b. Solution should support the most modern security standards and methodology including SSL encryption, X.509 certificates and proxy certificates.
    c. The solution should streamline the audit process while also being able to access that audit information from a central point, saving you time and money.
    d. Solution should include functionality that allows data to be pre-and post-processed.
    e.  Solutions should ensure that all interrupted file transfers resume where they left off after a connection failure without manual intervention.
    f. Should tightly integrate with your existing job scheduling solution to issue alerts if connections are not re-established after an acceptable time interval.
    g. Should adhere to current security and audit requirements including SOX, GLBA and HIPAA.
    Hope this helps.
    Regards,
    Jimmy

  • Help with data merge from Excel

    I think it's easiest to first explain the project...
    I am working on a print project that has an excel file containing specific data per person. The data gives FirstName, LastName, Picture, About, Phone, etc. per person (over 100 people) I am making a 3 page InDesign template to generate each persons info.
    The problem is the About column of data. The about column contains 2-3 paragraphs of text per cell. These paragraphs need to be formatted as separate paragraphs so that I do not have 1 continuous line of text. When I import the csv or txt (doesn't matter which way I save out the file) InDesign is not reading those paragraph breaks properly and all data after the first cell of About data is missing when I preview. If I remove the spaces in the About cell data it works perfectly.
    I know large spaces in comma delimited data often cause problems (I work in prepress) and we usually remove all extra spaces from cells, but in this instance I need these spaces AND I need them to format properly in my InDesign template. Any ideas or suggestions would be greatly appreciated, and will likely save me a great deal of work.
    I am using CS2.
    Thanks,
    Patty

    I did get your email, and as I posted above, I think Ken's suggestion to use the Rorohiko plugin will be more satisfactory than trying to completely rework your data file (though I don't have a complete picture of the file structure based on the PDF).
    In order to get threaded text you must either flow it in as threaded text, or combine the separate frames. Since the plugin will do the latter in a matter of moments, and preparing the text file for autoflow if it needs major revision or is of any great length could take considerably longer (plus you will then need to run multiple find/change operations to re-format the specially prepared text), I didn't pursue asking for a sample of the data file.
    Should you decide you want to modify the data, you will need to do something like move it into Excel, then most likely concatenate all of the fields that need to remain on a single line (using a special separation character (~, %, ! or other symbol that doesn't otherwise appear anywhere in your data that you can later change to a tab), leaving yourself with only cells for each individual line, and save as tab delimited text. This should give you a text file that looks like:
    Line1 (tab) line2 (tab) line3 (tab) line4
    Line1 (tab) line2 (tab) line3 (tab) line4
    Line1 (tab) line2 (tab) line3 (tab) line4
    Line1 (tab) line2 (tab) line3 (tab) line4
    Place the text file, then run a find change to convert tabs to forced line breaks (not end of paragraph), another to convert forced line breaks immediately followed by paragraph ends (or blank space if that's how it comes in -- I haven't tested to see what an empty cell looks like) to just paragraph ends to eliminate blank lines (I suppose you might also have blank lines in the middle, which would mean running a find change for consecutive forced line breaks with nothing between), and finally one to change your special joiner character to a tab.
    This structure will allow you to use a nested paragraph style to format the different pieces of the directory in one operation, but as you can see it's fairly complicated to execute.
    Peter

  • 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.

  • Report Bursting with data fetch from database

    Hi,
    i have a report which needs to be published in the below mentioned way and the report is scheduled daily.
    1. Fetch the details from the database with the Client id, language preference, delivery mechanism(Email,FTP,Fax), delivery location(Email -ID,FTP Location,FAx number).
    2. The client id needs to be passed as a parameter and the report has to be generated in the preferred language and deliver the generated report as per the preference.
    3. The delivery also needs to be tracked accordingly.
    Could you kinldy post your suggestions on the same.
    Thanks,
    Vijay

    The data table is created by me. I am positive that every field in the table has a value for every single record.

Maybe you are looking for

  • Report data ( value ... tag) missing in the Webi report retrieved through RestFul Webservice

    I am trying the below URL to get the WEBi report from SAP BO using the Rest Webservice support that is now available. http://{serverIP:serverPort}/biprws/raylight/v1/documents/{documentId} I am able to get the report but as I compare the same report

  • HANA, Aggregations and calculating percentages

    I have a table containing user-role assignments, e.g. the table contains tuples of the form (userA, roleA), (userA, roleB). Now, I would like to get an overview on how the distribution of users across roles. I would like to get the following overview

  • The adobe flash plugin has failed and none of the solutions have helped

    the adobe flash plugin has failed and none of the solutions listed in the help section works! I've tried all the solutions listed but none seems to work. == This happened == Every time Firefox opened == it started a week ago

  • Default error comes when i Open Opportunity quick create

    Dear all, When i open quick create of opportunity via account. We get an error message. Is there something i am missing in scoping? Error Message : Please enter a party with role Sales Unit. Regards, Dhruvin

  • Regarding Hindi Font

    Hi All,           I want to use Hindi Font in my Blackberry Application ,So please guide me how can I see the content in BrowserField.Do I need to add any jar for hindi font.? "Thanks In Advance." Thanks With Best Regards Ashutosh Srivatava