Elementary question on Logical SQL subquery

Hello.
I am a newbie using Oracle Business Intelligence Product Version 10.1.3.4.1 (Build 090414.1900).
I am trying (and failing) to get something such as this accepted by Answers -> Set SQL -
SELECT
     A.saw_1     saw_0,
     SUM(1)     saw_1
FROM
     (SELECT
          "Direct Sold-To Customer"."Sold-To Customer Account Name"     saw_0,
          "Direct Sold-To Customer"."Sold-To Postal Code"          saw_1
     FROM
          "Business Area : Global Sales Force"
     WHERE
          "Direct Sold-To Customer"."Sold-To Postal Code" LIKE '1136%') A
GROUP BY
     A.saw_1The error I receive indicates "Unresolved table".
Note that this (the nested element) works as expected -
SELECT
     "Direct Sold-To Customer"."Sold-To Customer Account Name"     saw_0,
     "Direct Sold-To Customer"."Sold-To Postal Code"          saw_1
FROM
     "Business Area : Global Sales Force"
WHERE
     "Direct Sold-To Customer"."Sold-To Postal Code" LIKE '11364%'Thank you!
-cs

CSeelig wrote:
Hello.
I am a newbie using Oracle Business Intelligence Product Version 10.1.3.4.1 (Build 090414.1900).
I am trying (and failing) to get something such as this accepted by Answers -> Set SQL -
SELECT
     A.saw_1     saw_0,
     SUM(1)     saw_1
FROM
     (SELECT
          "Direct Sold-To Customer"."Sold-To Customer Account Name"     saw_0,
          "Direct Sold-To Customer"."Sold-To Postal Code"          saw_1
     FROM
          "Business Area : Global Sales Force"
     WHERE
          "Direct Sold-To Customer"."Sold-To Postal Code" LIKE '1136%') A
GROUP BY
     A.saw_1The error I receive indicates "Unresolved table".
Note that this (the nested element) works as expected -
SELECT
     "Direct Sold-To Customer"."Sold-To Customer Account Name"     saw_0,
     "Direct Sold-To Customer"."Sold-To Postal Code"          saw_1
FROM
     "Business Area : Global Sales Force"
WHERE
     "Direct Sold-To Customer"."Sold-To Postal Code" LIKE '11364%'Thank you!
-csHi cs,
This could mean one or many different things, and the most common reason would be the security. Check to see if you have proper permissions on the subject area to run queries on the presentation folders. You can do this by opening the RPD in online/offline mode, and in the presentation layer, checking the permissions in the properties window of the Subject area / Presentation Table.

Similar Messages

  • Bind variables in custom sql subquery

    Is it possible to use bind variables in a custom sql subquery? I have a top level query built with expressions and I am using the builder.subQuery() method to execute the report query containing the custom sql.
    Thanks,
    Will

    Yes, that should be possible. Here is what to do. Make your SQL string. Where you want to bind variables, use a question mark.
    example: select empId from employee where employeeId=?
    Then you want to create a Call object. Then you can do ReportQuery rq = new ReadAllQuery (sqlCall);
    here is how to bind:
    queryParams is a Collection
    //start code
    Call sqlCall = new SQLCall();
    ((SQLCall)sqlCall).setSQLString(sqlString);
    if ((queryParams != null) && (queryParams.size() > 0)) {
         Vector sqlParameterTypes = new Vector(queryParams.size());
         Vector sqlParameters = new Vector(queryParams.size());
         Iterator iter = queryParams.iterator();
         while (iter.hasNext()) {
              Object queryParameter = iter.next();
              sqlParameterTypes.add(SQLCall.IN);
              sqlParameters.add(queryParameter);
         ((SQLCall)sqlCall).setParameterTypes(sqlParameterTypes);
         ((SQLCall)sqlCall).setParameters(sqlParameters);
    //end code
    I hope this helps. The APIe changed from 9.0.4.5 to 10.1.3 so this code is for 10.1.3. Post if you have any more questions.
    Zev.

  • Extracting Logical SQL of the adhoc reports

    Hi,
    I have an requirement, where I need to extract the logical SQL, of the adhoc reports. I tried using "Usage tracking", but that doesnt fit my requirement, as I need to write back the result set of the SQL queries in the database. I need to kind of automate the process of getting the logical queries from the user created reports and load it back to database. I canot use direct database request,as business users will not have this ability to use this request.
    Can somebody help in ways of getting the logical SQL , apart from usage tracking, log file, or manage sessions.
    Thanks
    Alakananda

    I am closing this, question, as I solved it by calling web services through a java program. Thanks

  • Logical SQL to physical SQL in datamodel.

    I am designing a report in BI publisher and for that I am creating a datamodel.
    My datamodel contains 4 dataset with 4 different logical SQLs and all use source as Oracle BIEE.
    When I generate/execute xml from datamodel I observed in nqquery.log that BI publisher is executing each logical SQL in sequence.
    That is OBIEE first send logical SQL of one of the dataset and then convert it to physical SQL. After first physical SQL is completed then only it is converting second logical SQL to physical.
    So logical to physical query is happening in sequence rather than in parallel.
    My datamodel contains huge logical SQLs and OBIEE takes almost 40 seconds each to convert it physical query. This will result in total 160 seconds for just converting 4 logical SQLs to physical SQLs.
    Does anybody know if there is any setting where I can manage to convert multiple logical to physical in parallel?

    Hi Experts,
    Please help on this.

  • How to ignore special characters in Logical SQL.

    Hi Experts,
    I am using Logical SQL generated from BI Answers in dataset of BIP Data model.
    The column name or presentation table name contains special character as “&, %’
    So when I try to create dataset using suppose following Logical SQL, I am getting prompt/error as
    “Please enter values for lexical references in SQL
    *~ description"."security name" s_9, ”
    Could you please suggest what should I do to ignore these special characters?
    SELECT
    0 s_0,
    "TEST_RPD"."Account"."As Of Date" s_1,
    "TEST_RPD"."Security Identifier & Description"."Security Name" s_9,
    "TEST_RPD"."Statistics"."Quality - S&P Rating" s_26,
    "TEST_RPD"."Statistics"."Yield To Maturity" s_27
    FROM "TEST_RPD"
    WHERE
    (("Account"."As Of Date" = date '2011-01-31') AND ("Account"."Report Account ID" = '1733'))

    Thanks..That is what we did in RPD.
    I was looking for any other approach as our RPD is shared between OBIEE and BIP.

  • Extracting the Logical sql query for the specified report  in OBIEE 11g

    Hi ,
    I want to extract the logical SQL Query for the Particular report in OBIEE 11.1.1.5.
    Any pointers related to this will be very helpful.
    Thanks,
    Sonali

    for a try please add Logical sql view to ur report it will dispaly the Logical sql for that Report..
    Hope it will helps you.

  • OBIEE 10g - Can I use logical SQL to set variable?

    I am trying to set value of a session variable in the Advanced tab Prefix box of a request.
    Assigment of absolute value like this is working good:
    SET VARIABLE MYVAR=1;
    Can I set the variable using logical SQL? Something like:
    SET VARIABLE MYVAR = (SELECT table1.col1 from catname where table1.col2=1)
    Thanks in advance.

    Hi,
    You can create a session variable or dynamic variable in the RPD and try using it in here at the Advanced Tab prefix.
    But still check yourself if you need multiple values returning in the SQL statement.
    Hope this is helpful/ useful.
    Regards
    MuRam

  • OBIEE:  logical SQL to Physical sql conversion

    Hi,
    Is there any way i can get the physical sql from logical sql ( Apart from reading log file).. I am looking something like JAVA api which does that for us.. Do we have any mapping table which stores this mapping.
    Does the OBIEE provides any Java API.
    Appreciate your help in advance.

    Hi Experts,
    Please help on this.

  • Converting logical SQL to physical

    I have a bunch of logical queries stored in my usage tracking table. What's the easiest way that I can convert these to physical SQL? I want to avoid re-running the reports and looking at the NQQuery.log.
    Let me know if there's an easy way to run my logical sql and getting the physical query from it.

    Hi,
    i) Dashboard -> Click Settings > Administration to open the Oracle BI Presentation Services Administration Window
    ii) Click the Manage Sessions link to open the Session Management window.
    iii)In the Session Management window, under Cursor Cache, click the View Log link for the last entry.
    The log displays the last query.
    iv)Locate :
    the SQL Request section. This section contains the logical SQL issued from Answers.
    the General Query Info section, just below the SQL Request section. This section identifies the repository, subject area, and presentation catalog from which the query was run.
    the Sending query to database named SH section, just below the General Query Info section. This section identifies the physical data source to which Oracle BI Server is connecting and the physical sql that was generated.
    Cheers,
    Aravind

  • Logical SQL to physical SQL taking time in datamodel.

    I am designing a report in BI publisher and for that I am creating a datamodel.
    My datamodel contains 4 dataset with 4 different logical SQLs and all use source as Oracle BIEE.
    When I generate/execute xml from datamodel I observed in nqquery.log that BI publisher is executing each logical SQL in sequence.
    That is OBIEE first send logical SQL of one of the dataset and then convert it to physical SQL. After first physical SQL is completed then only it is converting second logical SQL to physical.
    So logical to physical query is happening in sequence rather than in parallel.
    My datamodel contains huge logical SQLs and OBIEE takes almost 40 seconds each to convert it physical query. This will result in total 160 seconds for just converting 4 logical SQLs to physical SQLs.
    Does anybody know if there is any setting where I can manage to convert multiple logical to physical in parallel?

    Hi Experts,
    Please help on this.

  • Logical SQL about Expression Builder

    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
         Concat
    Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 4 for 8
         '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
         Cast
         Concat
              Substring(
                   Cast(
                       "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
                   FROM 4 for 8
              '04-01'
    AS DATE
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
         Concat(
              Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 0 for 5
         '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

    Dear Fame and all
    Hello.Thanks you for reply.
    Hi,
    You Missed END key word in the statement.Sorry,I mistake copy & paste only.
    So,The problem is still not resolved.
    The following shows, that the error has been corrected in the first message.
    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
    Concat
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
    Cast
    Concat
    Substring(
    Cast(
        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    end
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
    Concat(
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 0 for 5
    '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

  • Logical sql firing larger aggregate table instead of smaller one

    Hi
    When we process a request containing one particular column alone along with some time dimension say month or year, the logical sql is firing larger aggregare table instead of smaller aggregate table. Please, help us in resolving this issue.
    The OracleBI version we are using is 10.1.3.4.1
    Thanks.

    Hi,
    Try posting in the OLAP forum.
    OLAP
    Thanks, Mark

  • How to pass parameter in "Filter By Using " Logical SQL

    Hi
    Newbie in BI Publisher and OBIEE.
    I have the following requirement;
    Generated the Logical SQL and added as New Dataset to BI Publisher Data Model.
    The Logical SQL has statement as;
    SELECT
    0 s_0,
    AGGREGATE(FILTER("BISubjectArea"."Comparative"."ME % - Account" USING ("BISubjectArea"."Common"."RPT_Date" = date '2011-10-31')) BY "BISubjectArea"."Classifications"."Country") s_1,
    I want to parameterize the query by providing Data Model Parameters to the Filter By Statement. Example of what I want.
    SELECT
    0 s_0,
    AGGREGATE(FILTER("BISubjectArea"."Comparative"."ME % - Account" USING ("BISubjectArea"."Common"."RPT_Date" =:Prior_date)) BY "BISubjectArea"."Classifications"."Country") s_1,
    By providing this; it doesn't give any syntax error and accepts it. But when trying to run the Generate XML option, it gives out XML Tag error.
    Please help to resolve this and thanks in advance
    I am using OBIEE 11.1.1.5 version ...
    Edited by: 908476 on Jan 17, 2012 1:12 AM

    I have not worked with 11g version but I believe that if you use Answers as a datasource then you can not have parameters on the BI publisher side. Not sure if that has changed. Please let me know if this is incorrect.
    I guess you would have to use dashboard prompts and presentation variables and note that the Presentation variable MUST BE same as the parameters defined in the BI Publisher. Take a look at the following link for an example.
    http://kirti-bi-solutions.blogspot.com/2009/06/passing-parameters-from-obiee.html
    Thanks,
    Bipuser

  • New at MaxDB, elementary questions

    Dear all,
    I have some elementary questions on MaxDB running on Windows platform. I had it installed as part of a Content Server Installation. I have a lot of experience with Oracle and I am trying to relate what I know on Oracle to MaxDB
    1. I want to schedule automatic periodic data backups ( say daily at 20:00 ). Can this be done from the database Manager? If not, how is it possible on Windows
    2. I have already scheduled Autolog Backups but I am not sure what the significance of this is: Is this the equivalent of the "Archive mode" in Oracle or the equivalent of the "Archive Log backup (brarchive)" in Oracle?
    3. Why do I have to deactivate the automatic log backup in order to take a manual log backup?
    4. I do not understand the concept of the parallel medium(s). Why back up on a parallel medium ?
    Many thanks
    Andreas

    Lars,
    Brilliant, thank you very much for this! Rewarded the points
    Andreas

  • SQL subquery - Corelated substraction question

    Hi everyone,
    I have a table with 5 columns:
    1.Ticker
    2.DateText
    3.Open
    4.Close
    5.DayNumber
    I want to perform a substraction between MSFT's Close price on Day1 and MSFT's Open price on Day 4.
    so basically, it's goind to be day1 - day 4, day2 - day5, day3 - day6. Is it possible to do that in SQL?
    (not just MSFT, but for all the tickers in that table).
    Is there a way to do that using only 1 query?
    Here is a sample:
    Ticker_DateText_Open_Close_DayNumber
    MSFT_20100618_18.36_20.42_1
    MSFT_20100617_18.47_17.62_2
    MSFT_20100616_18.01_14.97_3
    MSFT_20100612_18.32_18.18_4
    IBM_20100618_8.86_7.42_1
    IBM_20100617_8.45_5.42_2
    IBM_20100616_8.13_6.31_3
    IBM_20100612_8.17_9.42_4
    Edited by: user12022313 on Jun 19, 2010 2:16 PM

    with t as (
               select 'MSFT' Ticker,'20100618' DateText,100 Open,110 Close,1 DayNumber from dual union all
               select 'MSFT','20100617',120,140,2 from dual union all
               select 'MSFT','20100616',140,105,3 from dual union all
               select 'MSFT','20100612',130,105,4 from dual union all
               select 'MSFT','20100611',180,160,5 from dual union all
               select 'MSFT','20100610',190,130,6 from dual union all
               select 'MSFT','20100609',250,125,7 from dual union all
               select 'GOOG','20100618',100,125,1 from dual union all
               select 'GOOG','20100617',150,200,2 from dual union all
               select 'GOOG','20100616',125,175,3 from dual union all
               select 'GOOG','20100612',110,145,4 from dual union all
               select 'GOOG','20100611',125,160,5 from dual union all
               select 'GOOG','20100610',130,110,6 from dual union all
               select 'GOOG','20100609',125,135,7 from dual
    select  t1.Ticker,
            t1.DateText,
            t1.Open,
            t1.Close,
            t1.DayNumber,
            t1.Close - t2.Open
      from  t t1,
            t t2
      where t2.Ticker(+) = t1.Ticker
        and t2.DayNumber(+) = t1.DayNumber + 3
      order by 1,5
    TICK DATETEXT       OPEN      CLOSE  DAYNUMBER T1.CLOSE-T2.OPEN
    GOOG 20100618        100        125          1               15
    GOOG 20100617        150        200          2               75
    GOOG 20100616        125        175          3               45
    GOOG 20100612        110        145          4               20
    GOOG 20100611        125        160          5
    GOOG 20100610        130        110          6
    GOOG 20100609        125        135          7
    MSFT 20100618        100        110          1              -20
    MSFT 20100617        120        140          2              -40
    MSFT 20100616        140        105          3              -85
    MSFT 20100612        130        105          4             -145
    TICK DATETEXT       OPEN      CLOSE  DAYNUMBER T1.CLOSE-T2.OPEN
    MSFT 20100611        180        160          5
    MSFT 20100610        190        130          6
    MSFT 20100609        250        125          7
    14 rows selected.
    SQL> SY.

Maybe you are looking for

  • Forms in tabs - not visible

    hy! i have following code: <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-nested.tld"

  • CUCMBE dtmf doesn't work via SIP Trunk to PSTN

    The dtmf events packets send by CUCMBE have incorrect UDP Length. Based on RFC 2833 a correct UDP length value for dtmf event packets is 24 (decimal), but this CUCMBE sends its events packets with UDP length set to 36 (decimal). Since the events pack

  • 10.10.2 - WiFi Issues Persisting

    My rMBP Late 13 13in Yosemite 10.10.2's Wi-Fi is still atrocious at connecting to my router, it's so horrible that it enjoys kicking itself off. Errors I keep getting in the console is related to netbiosd shutting down and it self-assigns an IP. Agai

  • HT201269 How do I get iCloud to down loaded to my new iPhone.  Do not have the old iPhone

    How do I get iCloud to download to my iPhone 5s. No longerhave the old iPhone. Thanks.

  • Is there a way to stick the column headers into the window?

    Hi everybody. Does anyone know if there's a way in BI Answers to stick the headers of the columns of a table into the page, in order to keep them visible even when I scroll down? I have huge tables, and it's easy to get lost into them.. Thanks!!