Regarding the query generated by BI Sever

Hi Friends
I am facing an issue here,in Answers I am dragging few measures from single fact and some dimension cols but the thing is 2 queries are being generated by BI Server and later there is an Inner join happening....I dont want this to happen...I want it as a single query so that all the data would be retained....Thanks in advance
With Regards
Ven

hi,
you must clear some things by reading....
**can we have a fact (single logical source table) joined to a dimension at different levels like day and month
you must join to the lowest level in order to be able to take all the possible values....(according you said that you have only 1 Datasource)
Is there a meaning of joing both??for what???
I suspect that you mean that in some cases the query must go in level of day and in others in level of month..
For this you must assign to the logical fact the appropriate 'Datasources',simpe tables which in
1.have the values in day level
2.have the values in month level
These tables Bi called(and generally) aggregate one..
Then you have to set in each Datasource the appropriate level .....
If you use (not recommended from me) , the aggregation wizard ..will show you how....
hope i helped....
http://greekoraclebi.blogspot.com/
///////////////////////////////////////

Similar Messages

  • Program name for the query generated using sq0102-03

    Hi Folks,
    How can we know the proggram  name for the query generated using sq01 and all?
    K.Kiran.

    Hi Kiran,
    U can get program name of nay transaction code by following this procedure
    after entering tcode it will direct u to the related screen then on the tool bar select system then go for status there u can find program name
    Rewards if helpfull
    Regards,
    Pavan

  • Regarding the Query Creation Date

    Dear All,
    How Can I find the creation date of querries which I have done in query designer. Is there any Infoobject keeping track of this data (SAP DEFINED). Pls post msg as soon as possible.

    Welcome on SDN!!
    In Bex analizer, open the query in modify mode, than choose properties and you will find creation date.
    Hope it helps.
    Regards
    PS: assign points if helpfull

  • Need help asap regarding the query windowing

    Dear friends,
    The database i'm using (mvdemo - mapviewer demo DB that comes along with Oracle 10g), has only data about united states. Say if i have my query window like this, -180, 0, 180 , 90 (which is the upper half of the earth), i am getting the desired result. ie., Here is that query,
    SELECT count(s.geom) FROM states s WHERE
    SDO_FILTER(s.geom,
    SDO_GEOMETRY(
         2003,
         8265,
         NULL,
         SDO_ELEM_INFO_ARRAY(1,1003,3),
         SDO_ORDINATE_ARRAY(-180, 0 , 180, 90))
    ) = 'TRUE';
    Returns 55
    I'm currently having a problem with my rectangular window query. When i query with a window value of -180, -90, 180, 90 (which covers the whole earth), the number of spatial objects (SDO_GEOM) that is returned is 0. It is not throwing any ORA error. But the expected result is as usual 55.
    SELECT count(s.geom) FROM states s WHERE
    SDO_FILTER(s.geom,
    SDO_GEOMETRY(
         2003,
         8265,
         NULL,
         SDO_ELEM_INFO_ARRAY(1,1003,3),
         SDO_ORDINATE_ARRAY(-180, 0 , 180, 90))
    ) = 'TRUE';
    Returns 0
    Could anyone please help me out with this issue??
    thank you in advance,
    Bragadeesh

    hi all,
    i found the solution to my problem.
    actually the query given here works just fine.
    wat i was doing was using the sdo_intersection(<some geom>, <query window>). The query window am using here is the whole earth. But according to spatial rule, there cant be any geometry greater than half the surface of the earth.
    Thank you all..

  • Regarding the query containing $[$28.1.0]

    Hi,
    Can someone help me with this code..
    SELECT (T0.OnHand-T0.IsCommited) FROM OITW T0 WHERE T0.ItemCode = $[$5.1.0] and  T0.WhsCode = $[$28.1.0]
    I have a document downloaded from SAP site. This query works fine when i hard code the value in place of $[$5.1.0] and $[$28.1.0]
    Could you please inform me at the earliest what does this mean.. $[$28.1.0] ? What i believe is its (item number. column number. line number) but it is giving syntax error for the $ sign. Awaiting your valuable information.
    Thanks,
    Jona

    Hi Jona,
    Your queries are ok. I suppose you are trying to store the value in a user-defined field on header level (that was the only way I could reproduce your problem)? In that case, you need to add a minus sign before the item index:
    SELECT (T0.OnHand-T0.IsCommited) FROM OITW T0 WHERE T0.ItemCode = $[$-5.1.0] and T0.WhsCode = $[$-28.1.0]
    Henry

  • Regarding the query about BI tools

    hi,
    I'm going to learn BI tool.could u please suggest me about BI tools and its scope for next 2 years in marketing level.
    thanks

    Hello,
    Maybe this help you.
    http://www.rittmanmead.com/2011/06/what-skills-does-an-oracle-bi-developer-need-in-2011/
    Regards,
    Luko

  • Must specift the table to select from error in query generator.

    SELECT OPCH.CardCode,OPCH.CardName, DateName(month,OPCH.TaxDate) + '-' + DateName(year,OPCH.TaxDate) As [Year],OPCH.TransId as [JE Ref],'IN' As [DocType]
    ,OPCH.DocEntry As [Base DocEntry],OPCH.WTSUM As [Recieved Amount],((OPCH.WTSUM/110.3) * 100 ) As [Invoice Amount],((OPCH.WTSUM/110.3) * 100 * 0.1) As [Service Tax]
    ,((OPCH.WTSUM/110.3) * 100 * 0.002) As [Edu.Cess],((OPCH.WTSUM/110.3) * 100 * 0.001) As [S.H.Cess]
    ,((OPCH.WTSUM/110.3) * 100 * 0.1) + ((OPCH.WTSUM/110.3) * 100 * 0.002) + ((OPCH.WTSUM/110.3) * 100 * 0.001) As [Total Service Tax]
    FROM OPCH,PCH1
    WHERE OPCH.DocEntry = PCH1.DocEntry
    AND OPCH.WTSUM > 0
    And PCH1.TargetType <> '19'
    AND OPCH.DocDate >= [%0]
    AND OPCH.DocDate <= [%1]
    When i try to run this query in query generator system gives me error msg  as "Must specify table to select from" if i remove the last two lines
    " AND OPCH.DocDate >= [%0]
    AND OPCH.DocDate <= [%1] "
    it works fine in the query generator.
    can any one help in this regards,
    thanks,
    praveen

    Hai Praveen!
    This problem is because of [%0] in query.
    Declare @FromDate as datetime
    Declare @ToDate as datetime
    set @FromDate = (select min(opch.docdate) from opch where opch.docdate >= '[%0]')
    set @ToDate = (select max(opch.docdate) from opch where opch.docdate <= '[%1]')
    Use this query in first lines of ur query and write your query.
    SELECT OPCH.CardCode,OPCH.CardName, DateName(month,OPCH.TaxDate) + '-' + DateName(year,OPCH.TaxDate) As Year,OPCH.TransId as JE Ref,'IN' As DocType
    ,OPCH.DocEntry As Base DocEntry,OPCH.WTSUM As Recieved Amount,((OPCH.WTSUM/110.3) * 100 ) As Invoice Amount,((OPCH.WTSUM/110.3) * 100 * 0.1) As Service Tax
    ,((OPCH.WTSUM/110.3) * 100 * 0.002) As http://Edu.Cess,((OPCH.WTSUM/110.3) * 100 * 0.001) As http://S.H.Cess
    ,((OPCH.WTSUM/110.3) * 100 * 0.1) + ((OPCH.WTSUM/110.3) * 100 * 0.002) + ((OPCH.WTSUM/110.3) * 100 * 0.001) As Total Service Tax
    FROM OPCH,PCH1
    WHERE OPCH.DocEntry = PCH1.DocEntry
    AND OPCH.WTSUM > 0
    And PCH1.TargetType '19'
    AND OPCH.DocDate >= @FromDate
    AND OPCH.DocDate <= @ToDate
    Regards,
    Thanga Raj.K

  • Difference in Query generated by OBIEE for same report

    Hi,
    I am using a a report(X) in a filter condition.
    I am seeing a peculiar issue with OBIEE server. When i am running a report(X) alone, the query generated is different. But when i am using the same report in filter condition of other report(Y), the same report is generating some other query. The first report(X) is running fine but the second(Y) is not running at all.
    Case 1(Report X) Query: The report is breaking into 3 parts for different fact tables and combining the data to give result.
    Case 2(Report Y): A single query is being formed and within it is fecthing the data from different fact tables using subqueries.
    Case2 is creating a lot of problem as the performance is totally poor.
    Any suggesstions??
    Thanks
    Tataji

    Hi, we haven't debugged the application or traced the query against the production server (it's in our customer's office) buy I think there's no difference since the query itself has been tested using sqldeveloper against both servers (XE 11.2 and Enterprise 11.1) and the behavior is consistent. By consistent I mean:
    - The query executed via sqldeveloper against Oracle XE 11.2 runs ok and so does the application.
    - The query executed via sqldeveloper against Oracle Enterprise 11.1 fails with an ORA-01790 error, and so does the application (exceptions are being logged in the Event Log).
    To sum up: the same query runs ok in Oracle XE 11.2 and fails in Oracle Enterprise 11.1.
    Additional information: we have tried explicit casting the NULL literals to the corresponding data types (in the UNION ALLs) and the query works fine in both versions. ¿Is there an option in ODAC to tell the query generator to write this explicit castings?
    Regarding the DB schema and the LINQ query, I'll be sending them asap.
    Regards,
    Ernesto.

  • Error in Query generator

    Dear all,
    I face an issue in Query generator.
    When i execute the query in query generator, the error is like this
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
    'Service Contracts' (OCTR)
    My query is like this
    Declare @StartYear as char(4)
    Declare @EndYear as char(4)
    Declare @Dept as char(3)
    Declare @UnitBusiness as char(3)
    Begin
    set @StartYear = (Select   YEAR(T0.[RefDate]) from JDT1 T0 where T0.[RefDate] = [%0] )
    set @EndYear =  (Select YEAR(T1.[RefDate]) from JDT1 T1 where T1.[RefDate] = [%1])
    set @Dept =  (Select T2.[Name] from OASC T2 where T2.[Name] = [%2])
    set @UnitBusiness = (Select   distinct SUBSTRING(T3.[Segment_0],10,2)  from OACT T3 where ( T3.[Segment_0] = [%3] OR ( 1 = (CASE WHEN [%3]  = 'All'  THEN 1 ELSE 2 END) ) ))
    Exec NEC_RPT_FinanceReport @StartYear,@EndYear,@Dept,@UnitBusiness
    End
    The problem is i can not show the input screen after i execute the query generator.
    If i remove the the Variable @Dept and replace with the value it runs well.
    Does any one know where is the problem ?
    Thanks in advance
    Regards
    Bodhi86

    HI Neetu, i have change the query without using store procedure
    my query is like this
    Declare @StartYear as char(4)
    Declare @EndYear as char(4)
    Declare @Dept as char(3)
    Declare @UnitBusiness as char(3)
    Begin
    set @StartYear = (Select   YEAR(T0.[RefDate]) from JDT1 T0 where T0.[RefDate] = [%0] )
    set @EndYear =  (Select YEAR(T1.[RefDate]) from JDT1 T1 where T1.[RefDate] = [%1])
    set @Dept =  (Select T2.[Name] from OASC T2 where T2.[Name] = [%2])
    set @UnitBusiness = (Select   distinct SUBSTRING(T3.[Segment_0],10,2)  from OACT T3 where ( T3.[Segment_0] = [%3] OR ( 1 = (CASE WHEN [%3]  = 'All'  THEN 1 ELSE 2 END) ) ))
    Select @StartYear,@EndYear,@Dept,@UnitBusiness
    The error is like this
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'User-Defined Values' (CSHS) (s) could not be prepared.
    Can you help me
    Thanks in advance

  • Copy and Paste from SQL server to Query Generator eliminate spaces

    Hi:
    My query is run perfectly on SQL server.
    However, when I copied it to Query Generator in SAP B1, it can not be run. When I look closely I see that some spaces have been truncated for example between the fieldname and key words like FROM, LEFT OUTER JOIN. I have to then going through the Query Generator in SAP B1 to put in the spaces in appropriate places. This process took long time and require very close attention and did not make any sense to me, since my query already work in SQL server query manager.
    Is there any way that we can make Query Generator in SAP B1 keeping the same format (ie. not eliminate the spaces) as in SQL server Query Manager?
    Best Regards,
    Phong Nguyen.

    Here is what I mean:
    SELECT YEAR(T1.DocDate) YEAR_NO, DATEPART(wk,T1.DocDate) WEEK_NO,SUM(T1.LineTotal) TotalShrinkage_Sales, (SUM(T1.LineTotal)/SUM(T1.Total_Sales)) Percent_Shrinkage, SUM(T1.Total_Sales) Total_Sales,COUNT(DISTINCT T1.Shrinkage_No) Shrinkage_Volume, SUM(T1.TotalCost) TotalShrinkage_CostFROM (SELECT V0.ITEMCODE, V0.DocEntry Shrinkage_No, V0.DocDate, V0.LineTotal, 0 Total_Sales,  V0.TotalCostFROM dbo.V_SHRINKAGE_TOTAL V0 WHERE V0.TransType='Shrinkage'UNION ALLSELECT V1.ITEMCODE, null Shrinkage_No, V1.DocDate, 0 LineTotal, V1.LineTotal Total_Sales, 0 TotalCostFROM dbo.V_Sales_Invoice V1UNION ALLSELECT V2.ITEMCODE, null Shrinkage_No, V2.DocDate,0 LineTotal, V2.LineTotal Total_Sales, 0 TotalCost FROM dbo.V_Credit_Note V2) T1WHERE DATEDIFF(wk,T1.DocDate,getdate())<=12GROUP BY YEAR(T1.DocDate), DATEPART(wk,T1.DocDate)ORDER BY YEAR(T1.DocDate) ASC,DATEPART(wk,T1.DocDate) ASC
    You can see the the third line (top down) the space between the field TotalShrinkage_Cost and FROM has been eliminated.
    Also you can see that on the 4th line (top down) the space between the field  V0.TotalCost and FROM has been eliminated.
    Also in the 5th line (top down) you can see: V0.TransType='Shrinkage'UNION ALLSELECT --- spaces have been eliminated between 'Shrinkage" and UNION and ALL and SELECT
    The list can go on.
    Can you help there?
    Thanks,
    Phong Nguyen.

  • Qyery problem in query generator

    Hi friends,
    I have one problem regarding query generator.
    I want to take the field value from the active form for query generator. I got in the demo that u have to use $[table.field]. But still I got the error.
    Query which I tried.
    SELECT 'TRUE' FROM OCRD T0 WHERE $[OCRD.CardCode] = '[%0]'
    any one who take the value from active form as a parameter and pass to the query in the query generator please send my the sample query.
    Thanks in advance.

    hi,
    Thanks for your reply.
    When I try to execute the first query from the query generator I got the error.
    Error :-
    Incorrect syntax near $4.0.0
    statement 'Received Alerts' could not be prepared.
    When I try to execute the second query from the query generator I got the error.
    Error :-
    Incorrect syntax near 'Ocrd.cardcode'
    Statement 'Search function (CSHS)' could not bne prepared.
    What would be the reason.
    Please help me in solving this problem.

  • Query generator and query wizard

    with the help of query generator and query wizard, we create queries.
    one of the application of generating query is that we can use it in formated search.
    can plz anyone tell me what are the other possible application of queries created by guery generator and query wizard.
    I am peruing training of SAP B1, so if any mistake is done from my side, I am sorry for that.
    Thanks in advance.
    Punam

    Hi Punam.......
    Query Generator is purely used for reporting as it uses SQL which is a strong tool of reporting. Moreover you can use the query generator for Formatted Searches as well as its SQL queries may useful in creating SP Transactions Notifications, Stored Procedures, Functions, Triggers etc.....
    For More details you can check this link.....
    http://www.youtube.com/watch?v=-LriSLVv5VA
    http://www.sbonotes.com/content/creating-custom-queries-sap-business-one
    Regards,
    Rahul

  • Using Variables in Query generator

    I'm using the following query to pull a report together later to be used in a query print layout. When i specify the specific part number and customer code it returns what i expect but as soon as i add a variable it says "Must specify table"!
    SELECT T0.U_ACI_CAPT, T0.U_ACI_VDS1, T0.U_ACI_VDE1, T0.U_ACI_VSS1, T0.U_ACI_VSE1, T0.U_ACI_VDS2, T0.U_ACI_VDE2, T0.U_ACI_VSS2, T0.U_ACI_VSE2, T0.U_ACI_KWT1, T0.U_ACI_KWT2, T0.U_ACI_SPD1, T0.U_ACI_SPD2, T0.U_ACI_RNC1, T0.U_ACI_RNC2, T0.U_ACI_RNC3, T0.U_ACI_RNC4, T1.ItemCode, T1.Substitute, T0.U_ACI_VDS3, T0.U_ACI_VDE3, T0.U_ACI_VSS3, T0.U_ACI_VSE3, T0.U_ACI_KWT3, T0.U_ACI_SPD3, T0.U_ACI_RNC5, T0.U_ACI_RNC6, T0.U_ACI_ACDC, T0.U_ACI_PHSE, T0.U_ACI_50HZ, T0.U_ACI_60HZ, T0.U_ACI_OFRQ
    FROM   ((OSCN T1 INNER JOIN ITT1 T2 ON T1.ItemCode = T2.Father) INNER JOIN ITT1 T3 ON T2.Code = T3.Father) INNER JOIN "@ACI_MRBK" T0 ON T3.Code = T0.U_ItemCode
    WHERE T1.ItemCode = '[%0]' AND T1.CardCode = '[%1]'
    Anyone know how to get these things working?

    Hi,
    if your problem is similar with this symptom :
    Using SAP Business One Survey Variables (parameters) in a 'Set' SQL Statement can give an error in the Query Generator.
    here the solution I've got from SAP notes:
    In such cases you need to put in an SQL remark statement a reference field in the DB for the Survey Variable (any field).
    For Example: (to make the above query work)
    Declare @Num as numeric(2)
    Set @Num = /* T0.DocNum */ [%0]
    Select T0.DocNum
    From ORDR T0
    Where docnum = @Num
    Good luck
    Rgds,,

  • Wildcard empty variable query generator

    Hi all,
    I am using the typical [%1] variables in the query generator.  However, my latest query needs to have many different variable parameters and I would like to leave some of them blank.
    For example, the parameters are:
    Warehouse Code [%0]
    Item Group [%1]
    Unit (UDF) [%2]
    Row (UDF) [%3]
    Column (UDF) [%4]
    Problem is... I want to be able to leave some of the parameters blank and I don't want the system to filter by that parameter at all.
    SO if I just want to put warehouse code in, then all the other parameters should be *.  Or if i want to use item group and row, then all the others will be *.  Right now I have to enter exactly what i want from all parameters, so it doesn't work very well.  I figured this wouldn't be so difficult.
    Any suggestions?
    M

    Thanks guys, my final code was kind of a mish mash.  Works where if you don't enter any variables you will see the entire list of serialized items unfiltered, if you want to sort by location (unit, column, row, warehouse) then you can enter them as needed.
    SELECT
    T0.[IntrSerial],
    T1.[ItemCode],
    T1.[ItemName],
    T2.[ItmsGrpNam] as 'Item Group Name',
    T1.[ItmsGrpCod] as 'Item Group Code',
    T1.[U_Unit],
    T1.[U_Row],
    T1.[U_Col],
    T3.[WhsName],
    T0.[WhsCode]
    FROM OSRI T0 
    INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN OITB T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
    INNER JOIN OWHS T3 ON T0.WhsCode = T3.WhsCode
    WHERE
    ((T3.[WhsName] ='[%0]') OR ('[%0]'=''))
    AND
    ((T2.[ItmsGrpNam] ='[%1]') OR ('[%1]'=''))
    AND
    ((T1.[U_Unit] ='[%2]') OR ('[%2]' IS NULL) OR ('[%2]'=''))
    AND
    ((T1.[U_Row] ='[%3]') OR ('[%3]' IS NULL) OR ('[%3]'=''))
    AND
    ((T1.[U_Col] ='[%4]') OR ('[%4]' IS NULL) OR ('[%4]'=''))
    ORDER BY
    T1.[ItmsGrpCod],
    T1.[ItemCode]
    The where clauses allow you to leave the variable blank if you want, which is very handy!  I know I will use this code again.

  • Restrict permission to write Update  query in query generator

    Hai,
    I would like to restrict the users from using the update command in the query generator, as SAP B1 allows professional users to update database using SQL commands like Update,Delete,Insert.
    so how can i prevent the users from using the above commands except the "select" command.kindly help me.
    By
    Prasanna.s

    Prasanna,
    The only thing you could do is prevent the users from using the Query Generator.  It would not be possible to just restrict Update and allow select.
    It is either everything or nothing.
    If the users are professional users then there should be some rules in the company.   If someone wants to Vandalise they can do it anyways.
    Suda

Maybe you are looking for