Custom SQL Help Documentation

I would like to use Custom SQL in the SQL Viewer. However, I cannot find any documentation in regards to the Syntax and Language features. Is there any documentation I can read to learn how to write Custom SQL?

Hi Jamie,
Please review following links :
http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_webi_qry_en.pdf
http://www.scribd.com/doc/88111434/Instructions-for-Custom-SQL-Objects
Instructions for Custom SQL Objects
Official Product Tutorials – SAP BusinessObjects Web Intelligence 4.x
Regards,
Veer S.

Similar Messages

  • Issue with creation of custom layouts using SAP Help Documentation

    Hi Experts,
    My requirement is to create a home custom page layout (using web dynpro) in Composite Environment. The default options available in CE are not useful for me. I set out to make a custom layout using the following this SAP Help Documentation: [          Creating a Web Dynpro Page Layout (SAP Library - Using the Portal as a Frontend)|https://cw.sdn.sap.com/cw/docs/DOC-102846]
    I have followed the instructions and followed all the steps, yet I fail to see the application in CE. The custom page layout is not displayed neither in options and is not available any where.
    Please let me know if anybody followed these steps and have got any success.
    Thanks in advance
    Srikant

    Hi
    Can somebody let me know if they have implemented a customised solution of creation of page layouts using Web Dynpro - as per the steps suggested by SAP.
    Thanks in advance
    Srikant

  • Search Help documentation for SQL

    If you know where is the Help documentation for commands on SQL (PL-SQL), please, tell me where.
    (Description of SELECT INSERT TO_DATE ROWNUM ...)
    Tanks.

    http://tahiti.oracle.com has all the Oracle documentation.
    Justin

  • Batch Reading with Custom SQL

    Hello,
    Queries
    1. Is it possible to use Batch Reading in conjunction with Custom Stored Procs/ SQL?
    2. Is it possible to map an attribute to a SQL expression (like in Hibernate we have formula columns mapped using the formula* property)?
    Background
    1. We use Toplink 11g (11.1.1.0.1) (not EclipseLink) in our application and are controlling mapping using XML files (not annotations).
    2. We are migrating a legacy application with most of its data retreival logic present in stored procedures to Java.
    3. I am effectively a newbie to Toplink.
    Scenario
    1. We have a deep class heirarchy with ClassA+ at the following having a one-to-many relation with ClassB+ and ClassB+ having a one-to-many relation with ClassC+ and so on and so forth.
    2. For each of these classes the data retreival logic is present in stored procedures (coming from the legacy application) containing not so simple queries.
    3. Also there are a quite a few attributes that actually represent computed values (computed and returned from the stored procedure). Also the logic for computing the values are not simple either.
    4. So to make things easy we configured toplink to use the stored procedures to retreive data for objects of ClassA+, ClassB+ and ClassC+.
    5. But since the class heirarchy was deep, we ended up firing too many stored procedure calls to the database.
    6. We thought we could use the Batch Reading feature to help with this, but I have come across documentation that says that it wont work if you override toplink's queries with stored procedures.
    7. I wrote some sample code to determine this and for the heirarchy shown above it uses the speicifed Custom procedure (I also tried replacing the stored procs with custom SQL, but the behavior is the same) for ClassA+ and ClassB+, but for ClassC+ and below it resorts to its own generated SQL.
    8. This is a problem because the generated SQL contains the names of the computed columns which is not present in the underlying source tables.
    Thanks
    Arvind

    Batch reading is not supported with custom SQL or stored procedures.
    Join fetching is though, so you may wish to investigate that (you need to ensure you return the correct data from the stored procedure).
    James : http://www.eclipselink.org

  • How can I use the Rownum/Customized SQL query in a Mapping?

    Hi,
    * I need to use a Rownum for populating one of the target field? How to create a mapping with Rownum?
    * How can I use an Dual table in OWB mapping?
    * Can I write Customized SQL query in OWB? How can I achieve this in a Mapping?
    Thanks in Advance
    Kishan

    Hi Niels,
    As I'm sure you know, the conundrum is that Reports doesn't know how many total pages there will be in the report until it is all done formatting, which is too late for your needs. So, one classical solution to this problem is to run the report twice, storing the total number of pages in the database using a format trigger, and throwing away the output from the first run when you don't know the total number of pages.
    Alternatively, you could define a report layout so that the number of pages in the output is completely predictable based upon, say, the number of rows in the main query. E.g., set a limit of one, two, ... rows per page, and then you'll know how many pages there will be simply because you can count the rows in a separate query.
    Hope this helps...
    regards,
    Stewart

  • Error  While Polling Database changes using Custom SQL

    Hi,
    I am using Oralce SOA Suite 11g DbAdapter for polling Database changes.
    My source database is DB2,I am using custom query for polling the changes in source database.
    I am using "Update an External Sequencing Table on a Different Database" polling Strategy
    Query section of the Mapping file is as follows.
    <querying xsi:type="query-policy">
    <queries>
    <query name="ReceiveF554102TXEDataSelect" xsi:type="read-all-query">
    <call xsi:type="sql-call">
    <sql><![CDATA[SELECT FILE_NAME, LIBRARY_NAME,
                   USER_NAME, SEQUENCE_NUM,
                   JOURNAL_CODE, ENTRY_TYPE, TIME_STAMP, JOB_NAME, JOB_USER,
                   JOB_NUMBER, PROGRAM_NAME, ARM_NUMBER, ADDRESS_FAMILY, RMT_ADDRESS,
                   REMOTE_PORT, SYSTEM_NAME, REL_RECORD, OTRCLN, IBMCU, IBITM, IBLITM,
                   IBAITM, IBY55ETAFR, IBY55ETATH, IBY55NUM01, IBY55NUM02, IBY55NUM03,
                   IBY55NUM04, IBY55NUM05, IBY55NUM06, IBY55NUM07, IBY55NUM08,
                   IBY55NUM09, IBY55NUM10, IBELM01, IBELM02, IBELM03, IBELM04, IBELM05, IBY55STR01,
                   IBY55STR02, IBY55STR03, IBY55STR04, IBY55STR05, IBY55CHA01,
                   IBY55CHA02, IBY55CHA03, IBY55CHA04, IBY55CHA05, IBY55DAT01, IBY55DAT02,
                   IBY55DAT03, IBY55DAT04, IBY55DAT05, IBUSER, IBPID, IBJOBN, IBUPMT,
                   IBUPMJ FROM PY_JRNMON.F554102T WHERE ((TIME_STAMP > (SELECT LAST_READ_DATE FROM SOALIB.SOASEQHDR WHERE (TABLE_NAME = 'F554102T'))) AND (TIME_STAMP < SYSDATE)) ORDER BY TIME_STAMP ASC]]> </sql>
    </call>
    <reference-class>ReceiveF554102TXEData.F554102T</reference-class>
    <lock-mode>none</lock-mode>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    </queries>
    <delete-query xsi:type="delete-object-query">
    <call xsi:type="sql-call">
    <sql>UPDATE SOALIB.SOASEQHDR SET LAST_READ_DATE = #LAST_READ_DATE WHERE (TABLE_NAME = 'F554102T')</sql>
    </call>
    </delete-query>
    </querying>
    I am getting following Error after defining the custom SQL in my mapping.xml file. (After executing the Created Process)
    Caused by: BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake. This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
         at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:653)
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:619)
         at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:291)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:883)
         at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:375)
         at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:266)
         at oracle.tip.adapter.db.InboundWork.init(InboundWork.java:322)
         at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:526)
         ... 4 more
    Caused by: BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
         at oracle.tip.adapter.db.exceptions.DBResourceException.queryNotFoundException(DBResourceException.java:694)
         at oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer.initializeQuery(TopLinkXMLProjectInitializer.java:1238)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:728)
         ... 8 more
    Help required to fit custom SQL in mapping.xml file for complex queries.
    Thanks,
    Arun Jadhav.

    "Execuite Custom SQL" in DB adapter and you'l get it.
    But in this case you'll have to implement your own polling strategy (if you need one).
    If you want to use one of the predefined polling strategy you should use "Poll for New or Changed records" and import all the tables you use and connect them in wizard.

  • Using information from ItResource for executing custom sql in OIM 11g

    I need executing a custom sql query using a connection of a ItResource. How can I get the instance of connection for to execute the sql query ? Someone have a idea of how i make this ? Help me ...
    Tks

    HashMap itAttribute = new HashMap();
    itAttribute.put("IT Resources.Name","IT-DB01");
    tcITResourceInstanceOperationsIntf itResource=null;
    tcResultSet resItResKey;
    resItResKey = itResource.findITResourceInstances(itAttribute);
    long iTesourceKey = resItResKey.getLongValue("IT Resource.Key");
    tcResultSet resItRes = itResource.getITResourceInstanceParameters(iTesourceKey);
    Append following lines:-
              HashMap<String, String> hashMap = new HashMap<String, String>();
              int countResultGetITResourceInstanceParameters = resItRes .getRowCount();
              for(int i = 0; i < countResultGetITResourceInstanceParameters; i++) {
                   resultGetITResourceInstanceParameters.goToRow(i);
                   hashMap.put(
                             resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_NAME),
                             resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_VALUE)
              return hashMap;

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Unable to use custom SQL query in report

    Hi all,
    I am newbie to OBIEE
    I try to write a customized sql in one of the report in OBIEE answers.
    No error is thrown when I click on "Set SQL" button.
    But, when I try to click on "Result" tab, I get the below error message,
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
    The same query I try running in Toad and it is not throwing any error, but running successfuly.
    Kindly help me on this.
    Regards,
    Shivakumar A

    Thank you very much for your time.
    Below is the query I used,
    SELECT saw_0."1", saw_0."2", saw_0."3"
    FROM (SELECT COUNT (c.status_code) "1", COUNT (a.status) "2",
    COUNT (c.accept_flag) "3"
    FROM table1 c,
    table2 g,
    table3 f,
    as_leads a
    WHERE f.sales_group_id = g.sales_group_id
    AND a.lead_id = c.sales_lead_id
    AND a.customer_id = f.customer_id) saw_0
    Result I get when run in Toad,
    Col1 Col2 Col3
    1234 43534 6787
    But, the same when I put in advanced sql tab, I get the below error message,
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
    Please do help me on this.
    Hope the above information is enough for getting an idea what I am stuck up with.
    Edited by: 961805 on 17 Oct, 2012 3:56 AM

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

  • Custom SQL CASE Statement

    Hello All,
    I have a query similar to the one below. I have to use a Custom SQL DB adapter to achieve this. When i create a variable I get four variables in the input payload (two for Param1 and two for Input). I was wondering if we can avoid this, because this is like duplicity and we have to populate the values twice each (I know this can be achieved by a Procedure, but we have a restriction).
    SELECT CASE
    WHEN #param1 = 'P1'
    THEN (SELECT col1
    FROM table1
    WHERE col2 = #input)
    END column1,
    CASE
    WHEN #param1 = 'P2'
    THEN (SELECT col1
    FROM table2
    WHERE col2 = #input)
    END column2,
    FROM DUAL;
    The input collection is as shown below.
    <xs:complexType name="compiste_queryInput">
    <xs:sequence>
    <xs:element name="param1" type="xs:string" nillable="true"/>
    <xs:element name="input" type="xs:string" nillable="true"/>
    <xs:element name="param1" type="xs:string" nillable="true"/>
    <xs:element name="input" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    Any help is much appreciated.
    Thanks
    Krishna

    Hi Krishna,
    I think this is a limitation. Actually it creates an element in xsd for each bind parameter and won't allow having 2 elements with the same name inside the xsd.
    The one given by you also will report a compile time error as it is using #param1 and #input twice.
    You need to change them to param1, param2 etc. and copy the same values to each.
    Appreciate if anyone can post a workaround for the same.
    Regards,
    Neeraj Sehgal

  • F1 Help documentation

    Hi,
    I have a checkbox using parameters statement on selection screen.I need to create Help documentation on F1.
    Can anyone tell me how to do that.I read one of the thread and tried the goto->doc->data elem doc. on screen painter.but since the screen is not custom screen I get a warning as
    "Selection Screen:Report generation makes changes ineffective". So I am not sure if i can do the documentation on the screen painter.Let me know the other way of doing.
    Thanks
    Suganya

    Hi Suganya,
    Do it like this.
    data:
    it_ef  type standard table of TABLE_LINE,
    it_hl  type standard table of tline,
    ws_help_infos type help_info.
    Parameters:  p_help    as   checkbox.
    at selection-screen on help-request for p_help.
    Append:
    'text Line 1 for help' to it_hl,
    'test line 2 for help' to it_hl.
    Call Function 'HELP_DOCULINES_SHOW'
        exporting
      CUCOL                   = 10
      CUROW                   = 3
          help_infos              =  ws_help_infos
      LINENR                  = 1
      NOT_HELP                = ' '
      OVERLAY_HEADER          = ' '
      SUPPRESS_VIEWER         = ' '
      CLASSIC_SAPSCRIPT       = ' '
    IMPORTING
      HELP_POPUP_CANCEL       =
        tables
          excludefun              = it_ef
          helplines               = it_hl
    It will work...
    Cheers!!!
    Lokesh

  • Execute custom SQL query in OIM11g

    Hi,
    Can you please provide me some java code snippet to execute a custom sql query and also to get db connection to execute this query in OIM 11g. I am going to run this query in an adapter.
    Thanks a lot for ur help.
    Mike

    Hey Mike,
    Use the below sample code to get db connection and then to execute a query in OIM11g.
    String query = "SELECT UD_ADUSER_EMAIL FROM UD_ADUSER WHERE upper(UD_ADUSER_UID) like '%TESTU%'";
    Connection con = Platform.getOperationalDS().getConnection();
    PreparedStatement preparedStatement = con.prepareStatement(query);
    ResultSet resultSet = preparedStatement.executeQuery();
    while(resultSet.next())
    System.out.println("Output:"+resultSet.getString(1));
    }

  • Conditions and Custom SQL in Webi SDK

    I'm porting an application written using REBean in BusinessObjects 3.1 to use the new Webi RESTful SDK.  I'm currently working with BI 4.1 SP4. There are two things that I could do in easily REBean that I am having a hard time figuring out in the new SDK.
    View condition information on a data provider -- In REBean you could use the ConditionContainer object to navigate the condition tree on a query and see all of the query's conditions, including the object name and operator.  This information doesn't seem to be included in the Data Provider Details web service so I'm not sure where to find it.  Am I missing something?  Is the Query Specification the only place where this information is available?
    Identify whether a query is using custom SQL -- As far as I know, this is different than Freehand SQL data providers which are supported in the new SDK.  In REBean you could use SQLDataProvider.isCustomSQL() to discover if a particular query had the Custom SQL radio button selected in the universe query panel.  Again, this information doesn't seem to be included on the Data Provider Details web service.  How can I tell if a query is using Custom SQL in the new Web Services SDK?
    Thanks,
    Ryan

    Hi Ryan,
    Both of your questions are possible.
    1. you can get the queriesTree and conditions, including names and operators, from the specification of the dataprovider with the following request  (text/xml)
    GET  /raylight/v1/documents/<docId>/dataproviders/<dataproviderId>/specification
    2. you can identify custom SQL by returning the queryPlan of the dataprovider (application/xml)
    GET  /raylight/v1/documents/<docId>/dataproviders/<dataproviderId>/queryplan
    Response:
          <queryplan editable="true" custom="true">
             <statement index="1">
                 your customized SQL
             </statement>
          </queryplan>
    I hope this helps,
    Dan

  • Null Pointer Exception when working with Custom Sql

    I viewed the video on adding Custom Sql and everything seemed to work fine with regards to adding it to my report. However, I get a null pointer exception when I add a field from the Custom Sql table to the report and try to run the report including if I try to View Sql. There doesn't seem to be a stacktrace that I can show.
    BTW... this was a work around for not being able to use Stored Procedures... I have killed 2 days now working on different ways to work around the Stored Procedure thing
    Thanks,
    Steve

    Hi,
    I'm trying to use a custom sql in my report. I could successfully create a custom SQL and add it to my report in the designer. But I'm getting NullPointer exception when I try to see the results in Preview. Can someone please help me resolve this issue.
    Thanks!

Maybe you are looking for

  • How do i delete an apple id for a minor from a family account?

    I have a family sharing account and i want to delete an account for a minor. I don't see the "remove" option.

  • How can I get my exchange calendar to appear in Outlook 2011?

    I have had this issue multiple times. I even have a new Macbook Pro because I couldn't solve this on the previous machine. Now I can's solve it on this machine. My exchange account works fine on a PC, my iPhone 4, and OWA. There are 2 other Macbook P

  • Get-ChildItem Issue With Variable

    I hope some very clever person out there can resolve this without even thinking, however my brain seems to be blocked. $FileVersion = (Get-ChildItem C:\Windows\System32\drivers\somedriver.SYS).VersionInfo | Select-Object FileVersion If ($FileVersion

  • Increasing font size / captions of pictures in slideshow view

    Hello, Is there any way to make the caption / font, that appears below the pictures while viewing the individual pictures in a slideshow, larger? I can change the font size using the inspector on the static iWeb page, but when I publish to the websit

  • How can I spool file in SQL*Plus using sysdate as filename?

    Dear Oracle Experts, Would you help me to solve following problem? I want spool a file in SQL*Plus but using sysdate as filename. e.g. today is 30-Nov-1999 then the filename is 19991130.lst tommorrow is 1-Dec-1999 then the filename is 19991201.lst My