XPATH Database Query Syntax in an Assign

Trying to get an XPATH Database query to work by assigning the Input variable value in a simple BPEL Process to my query condition. I keep getting invalid XPATH errors. I cannot seem to figure out how get write it out.
Here is what I have:
<from expression="orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')"/>
Here is my error:
Error(30): [Error ORABPEL-10039]: invalid xpath expression [Description]: in line 30 of "C:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELws\ReadDB\ReadDB.bpel", xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" specified in <from> is not valid, because XPath query syntax error. Syntax error while parsing xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')", at position "80" the exception is Expected: ). Please verify the xpath query "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" which is defined in BPEL process. . [Potential fix]: Please make sure the expression is valid.
Any help?
Thanks!!!

Ok. I have figured out how to place the condition (variable value) inside a concatentated string. So my final result is the actual XPATH Query-Database statement. But the problem is it is being returned as a String. How can I turn that final string into the XPATH expression I need? I suspect another <COPY> block could pull this off but I am not sure how to do it.
Here is my code:
<process name="QueryBuild" targetNamespace="http://xmlns.oracle.com/QueryBuild" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:client="http://xmlns.oracle.com/QueryBuild" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<partnerLinks>
<partnerLink name="client" partnerLinkType="client:QueryBuild" myRole="QueryBuildProvider"/>
</partnerLinks>
<variables>
<variable name="inputVariable" messageType="client:QueryBuildRequestMessage"/>
<variable name="outputVariable" messageType="client:QueryBuildResponseMessage"/>
<variable name="QueryText" type="ns1:string"/>
</variables>
<sequence name="main">
<receive name="receiveInput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="inputVariable" createInstance="yes"/><!-- Generate reply to synchronous request -->
<assign name="Assign_1">
<copy>
<from expression="concat(&quot;orcl:query-database('select ename from emp where empno = &quot;, bpws:getVariableData('inputVariable','payload','/client:QueryBuildProcessRequest/client:input'), &quot;,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL)'&quot;)"/>
<to variable="QueryText"/>
</copy>
<copy>
<from variable="QueryText"/>
<to variable="outputVariable" part="payload" query="/client:QueryBuildProcessResponse/client:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="outputVariable"/>
</sequence>
</process>

Similar Messages

  • Servlet database query syntax

    Hi,
    I'm trying to add a search function to a servlet.
    I am able to retreive the value of cof_name with the getParameter() method. However when I try to query the database for that value (cof_name) it doesnt work. Can anyone tell me what is wrong with my sql syntax?
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.sql.*;
    import java.sql.*;
    import java.util.*;
    public class Search extends HttpServlet{
       public void doPost(HttpServletRequest request, HttpServletResponse response)
                                       throws ServletException,IOException{
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          System.out.println("MySQL Connect Example.");
          Connection conn = null;
          String url = "jdbc:mysql://localhost:3306/aubrey?";
          String driver = "com.mysql.jdbc.Driver";
          String userName = "Dude1";
          String password = "supersecret";
          Statement st;
          try {
            Class.forName(driver).newInstance();
            conn = DriverManager.getConnection(url,userName,password);
            System.out.println("Connected to the database");
            String  cof_name  = request.getParameter("cof_name");
            String  sup_id  = request.getParameter("sup_id");
            String  price  = request.getParameter("price");
            String query = "select  COF_NAME from COFFEES where COF_NAME like 'cof_name'";
            System.out.println("query " + query);
            st = conn.createStatement();
            ResultSet  rs = st.executeQuery(query);
          out.print("<html><head>");
             out.print("</head><body>");
             out.print("<code><pre>");
             out.print("<font color=green>COF_NAME\tSUP_ID ");
             out.println("\t\tPRICE\tSALES\tTOTAL\n</font>");
         while(rs.next()){
            out.print(rs.getObject("COF_NAME").toString()+"\t");
            out.print(rs.getObject("SUP_ID").toString()+"\t\t");
         out.print(rs.getObject("PRICE").toString()+"\t");
         out.print(rs.getObject("SALES").toString()+"\t");
         out.println(rs.getObject("TOTAL").toString());
            conn.close();
            System.out.println("Disconnected from database");
          } catch (Exception e) {
          e.printStackTrace();
    }Regards
    Aubrey.

    1. Don't put business logic in your servlet. A servlet should just be a dispatcher to a business logic layer that has no idea that it's running in a servlet context.
    2. "Doesn't work" means nothing. You have to provide more details.
    3. You're doing select  COF_NAME from COFFEES where COF_NAME like 'cof_name' Note that 'cof_name' is inside your string literal, so Java will not expand that variable. You'd have to do it as "select  COF_NAME from COFFEES where COF_NAME like '" + cof_name+ "'"4. But even that's not the right way. The right way is to use a PreparedStatement.
    String sql = "select  COF_NAME from COFFEES where COF_NAME like ?";
    PreparedStatement ps = con.prepareStatement(sql);
    ps.setString(1, cof_name);
    ResultSet rs = ps.executeQuery();

  • Simple database query syntax question

    Hi experts,
    I am just stucked here...
    e.g.
    String Name = "John Doe";
    String query =
    "select * from table where NameCol = "+Name;
    ResultSet rs =stmt.executeQuery(query);
    while (rs.next()) {
    System.out.println(rs.getString(NameCol);
    The complier complains that "Syntax error !" at
    " NameCol = ....." ?!?!
    Why this is happening ? What is the correct syntax ?
    Thanks in advance !
    Philip

    finally figured it out. thanks...

  • How can we see previleges assigned to all users using database query

    I am using the follwoing query to see previleges assigned to all users , but the suprising thing is that it shows GP_APP_ID as null for a large number of user , even though in discoverer administrator I can see the previleges assigned to those users. I do not understand why it does that. Can someone please help so that I can see the previleges of all users
    select unique EU_USERNAME, decode (GP_APP_ID ,1000, 'Desktop / Plus Privilege (U)',
    1001, 'Create / Edit Query (U)',
    1002, 'Item Drill (U)',
    1003, 'Drill Out (U)',
    1004, 'Grant Workbook (aka Sharing) (U)',
    1005, 'Collect Query Statistics (U)',
    1006 ,'Admin Privilege (A)',
    1007, 'Set Privilege (A)',
    1008, 'Create / Edit Business Area (A)',
    1009, 'Format Business Area (A)',
    1010, 'Create / Edit Summaries (A)',
    1011, 'Not used as far as can be determined',
    1012, 'Schedule (U)',
    1013, 'User is never required to schedule workbooks (U)',
    1014, 'Save workbooks to database (U)',
    1015, 'Managed scheduled workbooks (A)',
    1016, 'to 1017 Not used as far as can be determined',
    1018, 'Change Password',
    1019, 'to 1023 Not used as far as can be determined',
    1024, 'Create Link (U))') from
    EUL5_ACCESS_PRIVS A,
    EUL5_EUL_USERS U
    where A.AP_EU_ID=U.EU_ID
    order by EU_USERNAME
    thanks

    Hi,
    This is probably because the business area security is stored in the same table. So you will probably find that where GP_APP_ID is null then GBA_BA_ID holds the value of the business area. You should change your query to just select where GP_APP_ID IS NOT NULL.
    Rod West

  • Syntax for Database query on a simple java appl?

    Connection con;
    private boolean conFree = true;
    private String dbName = "java:comp/env/jdbc/gene";
    public geneDB () throws Exception {
    try{
         Context ic = new InitialContext();
         DataSource ds = (DataSource) ic.lookup(dbName);
    con = ds.getConnection();
    catch (Exception ex){
    throw new Exception("Couldn't open connection to database: " + ex.getMessage());
    String insertStatement =     "insert into gene (cds,status) values(" + cds + "," + status + ")";
    PreparedStatement prepStmt = con.prepareStatement(insertStatement);
    prepStmt.setString(1, cds);
    prepStmt.setString(2, status);
    prepStmt.executeUpdate();
    prepStmt.close();
    Any comments??? This is what i have done, pls comment....

    actually i m having some kind of trouble and i would like to confirm about the code design suggestion regarding about the database query using pointbase through a java web service.

  • Ora-01704 string literal too long error  on long query syntax

    I have a query with more than 4000 characters. I can't seem to get ociparse to accept it. The bind variables are not an issue as I am not concatenating any strings to the query syntax. It is just that my query will all the columns and unions etc exceeds 4000 characters. Any way around this short of hiding it in a view ( which I have already done for other long queries ).
    System:
    PHP 4.3.10
    OCI driver
    Oracle 9i Release 2
    Thanks,
    Bryan

    Misread your post, sorry. Oracle limits literal strings to 4,000 chars. According to the documentation it's required that you use bind variables where possible to shorten literal strings below 4,000. You could also try a pl/sql block.
    The error you're getting is being returned by Oracle, not PHP. I've seen it pop up on bugtraq a couple of times for PHP, but the answer is always the same. I'm more of a programmer than a database expert, so forgive me for not having a better answer. You may want to try posting this to one of the more specific oracle forums where someone will probably have a better answer for you.
    http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96525/toc.htm

  • Another Error Executing Database Query.

    I am getting this error.
    12:40:54.054 - Database Exception - in
    C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
    26
    Error Executing Database Query.
    i have added extra fields in the mdb and added extra code to
    the form page and the action page.
    i am getting this error still.
    this is how i broke it down.
    If I run my 2 files EmployeeAddForm.cfm and
    EmployeeAddAction.cfm
    I get this error:
    NOTE: if i take out the comments from the code and ignore the
    new fields added to the db it works fine!!!!!
    The web site you are accessing has experienced an unexpected
    error.
    Please contact the website administrator.
    The following information is meant for the website developer
    for debugging purposes.
    Error Occurred While Processing Request
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    INSERT INTO statement.
    Resources:
    Enable Robust Exception Information to provide greater detail
    about the source of errors. In the Administrator, click Debugging
    & Logging > Debugging Settings, and select the Robust
    Exception Information option.
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
    SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    Date/Time 06-Jun-07 12:40 PM
    NOTE: if i take out the comments from the code and ignore the
    new fields added to the db it works fine!!!!!

    Try using '###CreateODBCDate(Form.DateOfBirth)###'. Access is
    strange on
    handling dates. It has a been a while since I have used
    Access so it could
    be as simple as wrapping it single quotes as well. I am
    assuming the
    "<!-----------" wasn't intended, but I could be wrong.
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "Coldfusionstudent" <[email protected]>
    wrote in message
    news:[email protected]...
    >I am getting this error.
    > 12:40:54.054 - Database Exception - in
    >
    C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
    26
    > Error Executing Database Query.
    >
    > i have added extra fields in the mdb and added extra
    code to the form page
    > and
    > the action page.
    > i am getting this error still.
    > this is how i broke it down.
    >
    > If I run my 2 files EmployeeAddForm.cfm and
    EmployeeAddAction.cfm
    > I get this error:
    >
    > The web site you are accessing has experienced an
    unexpected error.
    > Please contact the website administrator.
    >
    > The following information is meant for the website
    developer for debugging
    > purposes.
    >
    > Error Occurred While Processing Request
    > Error Executing Database Query.
    > [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft
    > Access Driver] Syntax error in INSERT INTO statement.
    >
    >
    > Resources:
    > Enable Robust Exception Information to provide greater
    detail about the
    > source
    > of errors. In the Administrator, click Debugging &
    Logging > Debugging
    > Settings, and select the Robust Exception Information
    option.
    > Check the ColdFusion documentation to verify that you
    are using the
    > correct
    > syntax.
    > Search the Knowledge Base to find a solution to your
    problem.
    >
    >
    > Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
    5.1; SV1; .NET CLR
    > 1.1.4322; .NET CLR 2.0.50727)
    > Remote Address 127.0.0.1
    > Referrer
    http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    > Date/Time 06-Jun-07 12:40 PM
    >
    >
    >
    > EmployeeAddForm.cfm
    >
    > <cfquery name="GetCompanies"
    > datasource="#Request.MainDSN#">
    > SELECT
    > CompanyID,
    > CompanyName
    > FROM
    > Company
    > ORDER BY
    > CompanyName
    > </cfquery>
    >
    > <html>
    > <head>
    > <title>ColdFusion MX Bible</title>
    > <link rel="stylesheet" href="styles.css">
    > </head>
    >
    > <body>
    >
    > <h1> </h1>
    >
    > <table>
    > <cfform action="EmployeeAddAction.cfm"
    method="POST">
    >
    > <tr>
    > <td>Company</td>
    > <td>
    > <cfselect name="CompanyID"
    > size="1"
    > query="GetCompanies"
    > value="CompanyID"
    > display="CompanyName"
    > required="Yes"
    > message="Please select a Company."></cfselect>
    > </td>
    > </tr>
    >
    > <tr>
    > <td>SSN</td>
    > <td>
    > <cfinput type="Text"
    > name="SSN"
    > message="Please enter the employee's Social Security
    Number."
    > validate="social_security_number"
    > required="Yes"
    > size="12"
    > maxlength="11">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>First Name</td>
    > <td>
    > <cfinput type="Text"
    > name="Firstname"
    > message="Please enter the employee's first name."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>Last Name</td>
    > <td>
    > <cfinput type="Text"
    > name="Lastname"
    > message="Please enter the employee's last name."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>Salary</td>
    > <td>
    > <cfinput type="Text"
    > name="Salary"
    > message="Please enter a valid salary."
    > validate="float"
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>DOB</td>
    > <td>
    > <cfinput type="Text"
    > name="DateOfBirth"
    > message="Please enter a valid date of birth in the
    format mm/dd/yyyy"
    > validate="date"
    > required="Yes"
    > size="11"
    > maxlength="10">
    > </td>
    > </tr><!-------------
    > <tr>
    > <td>device_typ</td>
    > <td>
    > <cfinput type="Text"
    > name="device_typ"
    > message="Please enter the employee's device_typ."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>device_Email</td>
    > <td>
    > <cfinput type="Text"
    > name="device_Email"
    > message="Please enter the employee's device_Email."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>Work_email</td>
    > <td>
    > <cfinput type="Text"
    > name="Work_email"
    > message="Please enter the employee's Work_email."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>Pin_Number</td>
    > <td>
    > <cfinput type="Text"
    > name="Pin_Number"
    > message="Please enter the employee's Pin_Number."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>------------------>
    > <tr>
    > <td> </td>
    > <td>
    > <input type="submit" value="Add to Database">
    > </td>
    > </tr>
    >
    > </cfform>
    > </table>
    >
    > </body>
    > </html>
    > ---------------------------
    > EmployeeAddAction.cfm
    >
    > <cfquery name="InsertEmployee"
    > datasource="#Request.MainDSN#">
    > INSERT INTO Employee(
    > SSN,
    > CompanyID,
    > Firstname,
    > Lastname,
    > Salary,
    > DateOfBirth<!----------,
    > device_typ,
    > device_Email,
    > Work_email,
    > Pin_Number-------------->
    >
    > )
    > VALUES (
    > '#Trim(Form.SSN)#',
    > #Val(Form.CompanyID)#,
    > '#Trim(Form.Firstname)#',
    > '#Trim(Form.Lastname)#',
    > #Val(Form.Salary)#,
    > #CreateODBCDate(Form.DateOfBirth)#<!-----------,
    > '#Trim(Form.device_typ)#',
    > '#Trim(Form.device_Email)#',
    > '#Trim(Form.Work_email)#',
    > '#Trim(Form.Pin_Number)#'------------------>
    > )
    > </cfquery>
    >
    > <cfmail
    to="#Form.Firstname#.#Form.Lastname#@somewhere.com"
    > from="[email protected]"
    > subject="Welcome to your new company!">
    > Welcome to your new company, #Form.Firstname#
    #Form.Lastname#!
    > </cfmail>
    > <!----
    > <cflocation url="EmployeeList.cfm">----->
    >

  • Generate an xml file from Database query results

    Hi, can anyone help me out with this problem I'm having. What are the steps in creating an xml file directly from the results of a database query. I currently have a very simply process that queries a database via a partner link. The query returns the data but it's from this point that I am stuck. I need to create an xml file with the data along with the xml tags. I've looked at dozens of tutorials with no luck.
    I would greatly appreciate help with this.
    bpel rookie

    Should be quite simple.
    Create another partnerlink, configure it to use the file adapter, and write to an XML file. In this case you need to create an XML Schema (.xsd) of the file you want to create.
    Before you write to the file, either add assign steps to copy individual attributes or use a transform activity to convert from the database format to the file (xml) format.

  • Error Executing Database Query (Encountered [nullstring])

    The attached code gives the following error message. I did
    have nullstrings being submitted as the "notes" and "internal
    notes," but I removed them in an (unsuccessful) attempt to solve
    this problem. Can this be fixed? Thanks!
    quote:
    Error Executing Database Query.
    Syntax error: Encountered "" at line 9, column 43.
    The error occurred in
    C:\ColdFusion8\wwwroot\Example\init.cfm: line 6
    4 : </head>
    5 : <body>
    6 : <CFQUERY NAME="init" DATASOURCE="Example">
    7 : CREATE TABLE programs(
    8 : ID int,
    SQLSTATE 42X01
    SQL CREATE TABLE programs( ID int, program_ID int, name
    varchar(20), long_name varchar(50), creator_email varchar(50),
    notes varchar(50), internal_notes varchar(50), is_public bool );
    INSERT INTO programs( ID, program_ID, name, long_name,
    creator_email, is_public ) VALUES( 0, 1, "Basic", "Basic
    (pre-selected)", "[email protected]", true ); SELECT * FROM
    programs;
    VENDORERRORCODE 30000
    DATASOURCE Example
    Resources:
    * Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    * Search the Knowledge Base to find a solution to your
    problem.
    Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
    rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    Remote Address 127.0.0.1
    Referrer
    Date/Time 20-Feb-08 11:53 PM
    Stack Trace
    at
    cfinit2ecfm949254281.runPage(C:\ColdFusion8\wwwroot\Example\init.cfm:6)
    at
    cfinit2ecfm949254281.runPage(C:\ColdFusion8\wwwroot\Example\init.cfm:6)
    [ginormous Java stacktrace omitted]

    I whittled my SQL down to the first query and added the
    transaction block, but the error remains. Thanks for your time!
    quote:
    Error Executing Database Query.
    Syntax error: Encountered "" at line 9, column 51.
    The error occurred in
    C:\ColdFusion8\wwwroot\Example\init.cfm: line 7
    5 : <body>
    6 : <CFTRANSACTION>
    7 : <CFQUERY NAME="init" DATASOURCE="Example">
    8 : CREATE TABLE programs(
    9 : ID int,
    SQLSTATE 42X01
    SQL CREATE TABLE programs( ID int, program_ID int, name
    varchar(20), long_name varchar(50), creator_email varchar(50),
    notes varchar(50), internal_notes varchar(50), is_public bool );
    VENDORERRORCODE 20000
    DATASOURCE Example
    Resources:
    * Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    * Search the Knowledge Base to find a solution to your
    problem.
    Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
    rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    Remote Address 127.0.0.1
    Referrer
    Date/Time 22-Feb-08 10:02 AM
    Stack Trace
    at
    cfinit2ecfm949254281.runPage(C:\ColdFusion8\wwwroot\Example\init.cfm:7)
    at
    cfinit2ecfm949254281.runPage(C:\ColdFusion8\wwwroot\Example\init.cfm:7)

  • Error Executing Database Query - Help!

    I have a cfquery code that looks like this:
        <CFQUERY DATASOURCE="mydatabase" USERNAME="myuser" PASSWORD="mypassword" NAME="codelist" CACHEDWITHIN="#CreateTimeSpan(0,1,0,0)#">
        SELECT *
        FROM systemcode
        WHERE (LEN(TRIM(systemcode)) = 2 OR LEN(TRIM(systemcode)) = 4)
        <CFSWITCH EXPRESSION="#CAT#">
        <CFCASE VALUE="1">AND (MID(systemcode,1,2) BETWEEN '01' AND '05')</CFCASE>
        <CFCASE VALUE="2">AND (MID(systemcode,1,2) BETWEEN '06' AND '15')</CFCASE>
        <CFCASE VALUE="3">AND (MID(systemcode,1,2) BETWEEN '16' AND '24')</CFCASE>
        <CFCASE VALUE="4">AND (MID(systemcode,1,2) BETWEEN '25' AND '27')</CFCASE>
        <CFCASE VALUE="5">AND (MID(systemcode,1,2) BETWEEN '28' AND '38')</CFCASE>
        <CFCASE VALUE="6">AND (MID(systemcode,1,2) BETWEEN '39' AND '40')</CFCASE>
        <CFCASE VALUE="7">AND (MID(systemcode,1,2) BETWEEN '41' AND '43')</CFCASE>
        <CFCASE VALUE="8">AND (MID(systemcode,1,2) BETWEEN '44' AND '49')</CFCASE>
        <CFCASE VALUE="9">AND (MID(systemcode,1,2) BETWEEN '50' AND '63')</CFCASE>
        <CFCASE VALUE="10">AND (MID(systemcode,1,2) BETWEEN '64' AND '67')</CFCASE>
        <CFCASE VALUE="11">AND (MID(systemcode,1,2) BETWEEN '68' AND '71')</CFCASE>
        <CFCASE VALUE="12">AND (MID(systemcode,1,2) BETWEEN '72' AND '83')</CFCASE>
        <CFCASE VALUE="13">AND (MID(systemcode,1,2) BETWEEN '84' AND '85')</CFCASE>
        <CFCASE VALUE="14">AND (MID(systemcode,1,2) BETWEEN '86' AND '89')</CFCASE>
        <CFCASE VALUE="15">AND (MID(systemcode,1,2) BETWEEN '90' AND '97')</CFCASE>
        <CFCASE VALUE="16">AND (MID(systemcode,1,2) BETWEEN '98' AND '99')</CFCASE>
        <CFDEFAULTCASE><CFLOCATION URL="somewhere.htm"></CFDEFAULTCASE>
        </CFSWITCH>
        ORDER BY systemcode
        </CFQUERY>
    This works perfectly in CF 5.  However, when running in CF 8 I am getting the error message:
    Error Executing Database Query.FUNCTION mydatabase.LEN does not exist The specific sequence of files included or processed is: /home/httpd/vhosts/somedomain.com/httpdocs/reference/systemcode.cfm, line: 24
    (that refers to the above cfquery)
    "mydatabase" is the name of the database and LEN is a function.    It's checking for the length of systemcode to be 2 or 4, if they are then check if the value of #CAT# is 1 and that the first 2 characters is between 01 and 05 then select the row.  I don't know why it works with CF5 but not CF8?  It's driving me nuts.  Any help is appreciated.

    I just don't see why
    all of a sudden it doesn't work with CF8 and MySQL,
    If you changed databases, that is the source of the problem, not upgrading CF.  MySQL will not understand MS Access specific functions and vice versa. Do not expect queries written for one database type to automatically work with another.  While there are sql standards, every database is different. It is quite common for database vendors to have totally different function names, data types and even syntax. You will need to throrougly review your database queries and convert any Access specific syntax, data types, etcetera to the MySQL equivalents.
    Are there MySQL equivalent for these two functions (TRIM and
    LEN)?
    Yes. See the string functions section in the online mySQL docs.
    http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
    I don't konw there was a TRIM and LEN in MS Access
    database.  I guess I was mixing them.
    Yes. It is a little confusing because both CF and MS Access have those functions.  In this specific case you were using the Access functions, not CF.
            http://www.techonthenet.com/access/functions/index_alpha.php
    >> Yes, I did put a
    CFLOCATION inside the cfquery.  Never encounter that
    scenario so I didn't know if it works.
    Well if you are using the code, it should be something you have tested. So you know how it behaves. But CFLOCATION really does not belong inside a database query.
    `

  • Error after upgrade  "Error Executing Database Query.  "

    I have set up a new server with CF MX 6.1. I have moved code
    from a CF 5 server. Now I am getting a lot of errors like this one.
    They all vary somewhat but seem to be related to two things. The
    problems seem to occur with CFINSERT to an access database. I have
    been trying to fix this for some time now and would appreciate any
    input. I have installed both the cf 'service pack' and a hot fix
    that I thought was related directly to this.
    Error Occurred While Processing Request
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    INSERT INTO statement.
    The error occurred in
    C:\Inetpub\vhosts\mysite.com\httpdocs\Ezedit\act_insert.cfm: line
    14
    Called from
    C:\Inetpub\vhosts\mysite.com\httpdocs\Ezedit\index.cfm: line 53
    Called from
    C:\Inetpub\vhosts\mysite.com\httpdocs\Ezedit\act_insert.cfm: line
    14
    Called from
    C:\Inetpub\vhosts\mysite.com\httpdocs\Ezedit\index.cfm: line 53
    12 : <CFELSEIF #ProductScan.Recordcount# IS 0>
    13 :
    14 : <CFINSERT DATASOURCE="mysite" TABLENAME="#Table#"
    username="admin" password="">
    15 :
    16 : <CFQUERY datasource="mysite">
    SQL insert into Products
    (WIDTH,HOTBUY,RETAIL1,REPEAT,HEIGHT,PRODUCTTITLE,JOIN,AJOIN,MATERIAL,OBJECTGROUP_ID,BOOKN AME,OBJECTGROUP_ID2,VJOIN,PRODUCTDESCRIPTION1,LENGTH,SAMPLE,MANUFACTURERPARTNO)
    values ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5)
    , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) ,
    (param 11) , (param 12) , (param 13) , (param 14) , (param 15) ,
    (param 16) , (param 17) )
    DATASOURCE mysite
    VENDORERRORCODE -3502
    SQLSTATE 42000
    Please try the following:

    <CFINSERT DATASOURCE="mysite" TABLENAME="#Table#">
    Probably an error. The tag assumes implicitly that a form has
    been submitted. In fact, one of its attributes is "formfields".
    Since you leave out the attribute, Coldfusion assumes it has to
    insert all the fields of a submitted form. You should put the tag
    within the block
    <cfif isDefined("form.someFormField")>
    </cfif>

  • Error executing database query, invalid use of:

    I have a problem ColdfusionMX tutorial when I get to add tags
    on top of the code view. And I write the same thing as the
    tutorial.
    I get an error message that says:
    Error executing database query.
    error occurred while processing request.
    Invalid use of ", ", () in query expression
    I need help desperatly,
    Geordeslys,

    The web site you are accessing has experienced an unexpected
    error.
    Please contact the website administrator.
    The following information is meant for the website developer
    for debugging purposes.
    Error Occurred While Processing Request
    Error Executing Database Query.
    Invalid use of '.', '!', or '()'. in query expression
    'ARTISTS.ARTISTID = ART.ARTISTID AND ART.MEDIAID = MEDIA. MEDIAID'.
    The error occurred in
    C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutorial\TMPhy0vtntf3u.cfm:
    line 1
    1 : <cfquery name="artwork" datasource="cftutorial">
    2 : SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE,
    LARGEIMAGE, ISSOLD, MEDIATYPE
    3 : FROM ARTISTS, ART, MEDIA
    Dear CF_dev2,
    Is that what you mean by complete CF code?
    Georgeslys,
    SQL SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE,
    LARGEIMAGE, ISSOLD, MEDIATYPE FROM ARTISTS, ART, MEDIA WHERE
    ARTISTS.ARTISTID = ART.ARTISTID AND ART.MEDIAID = MEDIA. MEDIAID
    DATASOURCE cftutorial
    VENDORERRORCODE 3092
    SQLSTATE  
    Resources:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
    .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; IEMB3;
    IEMB3)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 03-Sep-07 07:11 PM
    Stack Trace (click to expand)
    at
    cfTMPhy0vtntf3u2ecfm1461475070.runPage(C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1)
    at
    cfTMPhy0vtntf3u2ecfm1461475070.runPage(C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1)
    com.inzoom.adojni.ComException: Invalid use of
    &apos;.&apos;, &apos;!&apos;, or
    &apos;()&apos;. in query expression
    &apos;ARTISTS.ARTISTID = ART.ARTISTID
    AND ART.MEDIAID = MEDIA. MEDIAID&apos;. in Microsoft JET
    Database Engine code=3092 Type=1
    at com.inzoom.ado.Command.jniExecute(Native Method)
    at com.inzoom.ado.Command.execute(Command.java:40)
    at com.inzoom.jdbcado.Statement.exec(Statement.java:34)
    at com.inzoom.jdbcado.Statement.execute(Statement.java:107)
    at
    coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:212)
    at coldfusion.sql.Executive.executeQuery(Executive.java:753)
    at coldfusion.sql.Executive.executeQuery(Executive.java:675)
    at coldfusion.sql.Executive.executeQuery(Executive.java:636)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
    at
    coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
    at
    cfTMPhy0vtntf3u2ecfm1461475070.runPage(C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at
    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at
    coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
    at coldfusion.CfmServlet.service(CfmServlet.java:107)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Synchronizing database query with update notifications via AQ

    I am building a financial system and want to keep all my reference data in the database.
    If one user updates a piece of data, I need all users that use that data to be notified of the change.
    I know I can do this using triggers and publish-subscribe, but I have a synchronization problem:
    A client comes up, queries initial value via select, then (or before) subscribe to updates.
    Since the AQ channel is seperate from the regulal DB connection, I do not know if I missed an update notification that happened just after I queried, but before my subscription came into effect, or I might even get an update that is older then my query.
    I know I can add sequance numbers to all updates, and force an initial update each time a new client connects, but that is both slow and complex.
    Can anybody think of a simple way to have a database query synchronized with updates?

    A query with different syntax would result in a different hash value.
    Stored outlines work based on hash value.
    Your question is probably answered now.
    Sybrand Bakker
    Senior Oracle DBA

  • How to find database query

    Hi all,
    how to find physical query from report here m checking like Administrator->manage session--> report-->view log
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- SQL Request:
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- General Query Info:
    Repository: Star, Subject Area: AAA, Presentation: AAA
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- Cache Hit on query:
    Matching Query:     Created by:     Administrator
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- Query Status: Successful Completion
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- Physical Query Summary Stats: Number of physical queries 1, Cumulative time 0, DB-connect time 0 (seconds)
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- Rows returned to Client 6
    +++Administrator:3220000:3220011:----2011/01/03 02:51:43
    -------------------- Logical Query Summary Stats: Elapsed time 0, Response time 0, Compilation time 0 (seconds)
    but here m not able to find database query..how to find that query plz help
    Edited by: Sonal on Jan 3, 2011 5:29 AM
    Edited by: Sonal on Jan 3, 2011 5:30 AM
    Edited by: Sonal on Jan 3, 2011 5:30 AM

    Hi,
    as Daan said, set the variable in Advanced tab but not on loglevel..
    because, our problem is to bypass the bi-server cache.
    Do this:
    1. Go to Advanced tab.
    2. In Prefix field(scroll down to see this field) , enter this:
    SET DISABLE_CACHE_HIT = 1;
    Note: Make sure that you're ended up above statement with semicolon and do not click on Set SQL option...
    3. Save report, then run it..
    4. After you see the query, i recommend you to take take out that prefix tag then save it again..

  • 11g SQL query syntax/results differ from 10g

    Hello,
    A bit of an odd situation.  We have a report in 10g that is working as expected and when we run the same report in 11g we slightly different results.  The same physical tables and columns are being used between each report and the number of records (17) returned to OBI are the same.  Both queries are pulling from the same database with the same user id.  As there are differences in how 10g runs queries vs 11g, are there any odd behaviors that I should keep an eye out for in how 11g assembles the data that's returned from the db prior to presenting it on the Analysis?  
    10g Results (correct):
    Region...............Actuals (Prior Qtr).....Up...........Plan Amount....................% of Plan
    AP...........................10,489..............8,965..............................................................
    Americas................114,208...........110,779..................6...........................1969411% 
    EMEA.....................26,799..............23,976..............................................................
    UNASSIGNED....................................................149,957...........................0%
    Grand Total.............151,496...........143,721..........149,962.........................96%
    11g Results (incorrect):
    Region...............Actuals (Prior Qtr).....Up...........Plan Amount....................% of Plan
    AP...........................10,180..............8,965............................................................
    Americas.................90,878...........110,779............................................................ 
    EMEA.....................24,978.............23,976............................................................
    UNASSIGNED....................................................149,957...........................0%
    Grand Total.............126,037..........143,721..........149,957.........................96%
    Thank you!
    Mike
    -------------------- 10g query--------------------------
    -------------------- Sending query to database named EBS Rapid Data Store (id: <<5087545>>):
    WITH
    SAWITH0 AS (select T28761.PERIOD_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH1 AS (select Case when case SAWITH0.c5 when 1 then SAWITH0.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH0.c5 when 1 then SAWITH0.c3 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH0.c2 as c2,
         SAWITH0.c4 as c3
    from
         SAWITH0),
    SAWITH2 AS (select min(SAWITH1.c1) over (partition by SAWITH1.c3)  as c1,
         SAWITH1.c2 as c2
    from
         SAWITH1),
    SAWITH3 AS (select distinct SAWITH2.c1 + 1 as c1,
         SAWITH2.c2 as c2
    from
         SAWITH2),
    SAWITH4 AS (select T28761.QUARTER_RANK as c2,
         T28761.QUARTER_YEAR_NAME as c3,
         T28761.PERIOD_START_DATE as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH5 AS (select Case when case SAWITH4.c5 when 1 then SAWITH4.c4 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH4.c5 when 1 then SAWITH4.c4 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH4.c2 as c2,
         SAWITH4.c3 as c3
    from
         SAWITH4),
    SAWITH6 AS (select distinct min(SAWITH5.c1) over (partition by SAWITH5.c2)  as c1,
         SAWITH5.c2 as c2,
         SAWITH5.c3 as c3
    from
         SAWITH5),
    SAWITH7 AS (select D1.c1 as c1,
         D1.c2 as c2,
         D1.c3 as c3,
         D1.c4 as c4,
         D1.c5 as c5,
         D1.c6 as c6
    from
         (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
                   SAWITH6.c3 as c2,
                   T41894.ICN_GROUP as c3,
                   SAWITH6.c2 as c4,
                   T41894.ICN_GROUP_CODE as c5,
                   T30728.PARENT_REGION as c6,
                   ROW_NUMBER() OVER (PARTITION BY T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, SAWITH6.c2 ORDER BY T30728.PARENT_REGION ASC, T41894.ICN_GROUP_CODE ASC, SAWITH6.c2 ASC) as c7
              from
                   SAWITH3 left outer join (
                                  XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
                                  XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T37838.SHIP_TO_COUNTRY_CODE2) left outer join
                             XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T37838.OVERRIDE_ICN = T41894.ICN_CODE) On SAWITH3.c2 = T37838.PERIOD_NAME,
                   SAWITH6
              where  ( SAWITH6.c1 = SAWITH3.c1 and SAWITH6.c3 = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') )
              group by T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP, SAWITH6.c2, SAWITH6.c3
         ) D1
    where  ( D1.c7 = 1 ) ),
    SAWITH8 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
         sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c2,
         T30728.PARENT_REGION as c3,
         T28761.QUARTER_YEAR_NAME as c6,
         T41894.ICN_GROUP as c7,
         T28761.QUARTER_RANK as c8,
         T41894.ICN_GROUP_CODE as c9
    from
                        XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
                        XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T37838.PERIOD_NAME) left outer join
                   XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T37838.SHIP_TO_COUNTRY_CODE2) left outer join
              XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T37838.OVERRIDE_ICN = T41894.ICN_CODE
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK, T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP),
    SAWITH9 AS (select D1.c1 as c1,
         D1.c2 as c2,
         D1.c3 as c3,
         D1.c4 as c4,
         D1.c5 as c5,
         D1.c6 as c6,
         D1.c7 as c7,
         D1.c8 as c8,
         D1.c9 as c9
    from
         (select sum(SAWITH8.c1) over (partition by SAWITH8.c3)  as c1,
                   sum(SAWITH8.c2) over (partition by SAWITH8.c3)  as c2,
                   SAWITH8.c3 as c3,
                   sum(SAWITH8.c1) over (partition by SAWITH8.c8, SAWITH8.c9, SAWITH8.c3)  as c4,
                   sum(SAWITH8.c2) over (partition by SAWITH8.c8, SAWITH8.c9, SAWITH8.c3)  as c5,
                   SAWITH8.c6 as c6,
                   SAWITH8.c7 as c7,
                   SAWITH8.c8 as c8,
                   SAWITH8.c9 as c9,
                   ROW_NUMBER() OVER (PARTITION BY SAWITH8.c3, SAWITH8.c8, SAWITH8.c9 ORDER BY SAWITH8.c3 ASC, SAWITH8.c8 ASC, SAWITH8.c9 ASC) as c10
              from
                   SAWITH8
         ) D1
    where  ( D1.c10 = 1 ) ),
    SAWITH10 AS (select sum(T34877.AMOUNT) as c1,
         T28761.QUARTER_YEAR_NAME as c3,
         T30728.PARENT_REGION as c4,
         T41894.ICN_GROUP as c5,
         T28761.QUARTER_RANK as c6,
         T41894.ICN_GROUP_CODE as c7
    from
                        XXFI.XXFI_REVENUE_BUDGET_ACCUM T34877 /* Fact_Revenue_Budgets */  left outer join
                        XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T34877.PERIOD_NAME) left outer join
                   XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T34877.SHIP_TO_COUNTRY_CODE2) left outer join
              XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T34877.OVERRIDE_ICN = T41894.ICN_CODE
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK, T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP),
    SAWITH11 AS (select D1.c1 as c1,
         D1.c2 as c2,
         D1.c3 as c3,
         D1.c4 as c4,
         D1.c5 as c5,
         D1.c6 as c6,
         D1.c7 as c7
    from
         (select sum(SAWITH10.c1) over (partition by SAWITH10.c4)  as c1,
                   sum(SAWITH10.c1) over (partition by SAWITH10.c6, SAWITH10.c7, SAWITH10.c4)  as c2,
                   SAWITH10.c3 as c3,
                   SAWITH10.c4 as c4,
                   SAWITH10.c5 as c5,
                   SAWITH10.c6 as c6,
                   SAWITH10.c7 as c7,
                   ROW_NUMBER() OVER (PARTITION BY SAWITH10.c4, SAWITH10.c6, SAWITH10.c7 ORDER BY SAWITH10.c4 ASC, SAWITH10.c6 ASC, SAWITH10.c7 ASC) as c8
              from
                   SAWITH10
         ) D1
    where  ( D1.c8 = 1 ) ),
    SAWITH12 AS (select T28761.PERIOD_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH13 AS (select Case when case SAWITH12.c5 when 1 then SAWITH12.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH12.c5 when 1 then SAWITH12.c3 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH12.c2 as c2,
         SAWITH12.c4 as c3
    from
         SAWITH12),
    SAWITH14 AS (select min(SAWITH13.c1) over (partition by SAWITH13.c3)  as c1,
         SAWITH13.c2 as c2
    from
         SAWITH13),
    SAWITH15 AS (select distinct SAWITH14.c1 + 1 as c1,
         SAWITH14.c2 as c2
    from
         SAWITH14),
    SAWITH16 AS (select T28761.QUARTER_YEAR_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH17 AS (select Case when case SAWITH16.c5 when 1 then SAWITH16.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH16.c5 when 1 then SAWITH16.c3 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH16.c2 as c2,
         SAWITH16.c4 as c3
    from
         SAWITH16),
    SAWITH18 AS (select distinct min(SAWITH17.c1) over (partition by SAWITH17.c3)  as c1,
         SAWITH17.c2 as c2
    from
         SAWITH17),
    SAWITH19 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
         T30728.PARENT_REGION as c2
    from
         SAWITH15 left outer join (
                   XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
                   XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T37838.SHIP_TO_COUNTRY_CODE2) On SAWITH15.c2 = T37838.PERIOD_NAME,
         SAWITH18
    where  ( SAWITH18.c1 = SAWITH15.c1 and SAWITH18.c2 = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') )
    group by T30728.PARENT_REGION),
    SAWITH20 AS (select T28761.PERIOD_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH21 AS (select Case when case SAWITH20.c5 when 1 then SAWITH20.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH20.c5 when 1 then SAWITH20.c3 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH20.c2 as c2,
         SAWITH20.c4 as c3
    from
         SAWITH20),
    SAWITH22 AS (select min(SAWITH21.c1) over (partition by SAWITH21.c3)  as c1,
         SAWITH21.c2 as c2
    from
         SAWITH21),
    SAWITH23 AS (select distinct SAWITH22.c1 + 1 as c1,
         SAWITH22.c2 as c2
    from
         SAWITH22),
    SAWITH24 AS (select T28761.QUARTER_YEAR_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH25 AS (select Case when case SAWITH24.c5 when 1 then SAWITH24.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case SAWITH24.c5 when 1 then SAWITH24.c3 else NULL end  ASC NULLS LAST ) end as c1,
         SAWITH24.c2 as c2,
         SAWITH24.c4 as c3
    from
         SAWITH24),
    SAWITH26 AS (select distinct min(SAWITH25.c1) over (partition by SAWITH25.c3)  as c1,
         SAWITH25.c2 as c2
    from
         SAWITH25),
    SAWITH27 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1
    from
         SAWITH23 left outer join XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  On SAWITH23.c2 = T37838.PERIOD_NAME,
         SAWITH26
    where  ( SAWITH26.c1 = SAWITH23.c1 and SAWITH26.c2 = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') ) ),
    SAWITH28 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
         sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c2
    from
              XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
              XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T37838.PERIOD_NAME
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') ) ),
    SAWITH29 AS (select sum(T34877.AMOUNT) as c1
    from
              XXFI.XXFI_REVENUE_BUDGET_ACCUM T34877 /* Fact_Revenue_Budgets */  left outer join
              XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T34877.PERIOD_NAME
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' ) )
    select case  when SAWITH7.c2 is not null then SAWITH7.c2 when SAWITH9.c6 is not null then SAWITH9.c6 when SAWITH11.c3 is not null then SAWITH11.c3 end  as c1,
         case  when SAWITH9.c3 is not null then SAWITH9.c3 when SAWITH19.c2 is not null then SAWITH19.c2 when SAWITH7.c6 is not null then SAWITH7.c6 when SAWITH11.c4 is not null then SAWITH11.c4 end  as c2,
         case  when SAWITH7.c3 is not null then SAWITH7.c3 when SAWITH9.c7 is not null then SAWITH9.c7 when SAWITH11.c5 is not null then SAWITH11.c5 end  as c3,
         SAWITH9.c5 / nullif( 1000, 0) as c4,
         SAWITH7.c1 / nullif( 1000, 0) as c5,
         SAWITH11.c2 / nullif( 1000, 0) as c6,
         nvl(SAWITH9.c4 , 0) / nullif( nvl(SAWITH11.c2 , 0), 0) * 100 as c7,
         case  when SAWITH7.c4 is not null then SAWITH7.c4 when SAWITH9.c8 is not null then SAWITH9.c8 when SAWITH11.c6 is not null then SAWITH11.c6 end  as c16,
         case  when SAWITH11.c7 is not null then SAWITH11.c7 when SAWITH9.c9 is not null then SAWITH9.c9 when SAWITH7.c5 is not null then SAWITH7.c5 end  as c17,
         SAWITH27.c1 as c19,
         SAWITH28.c2 as c20,
         SAWITH29.c1 as c21,
         SAWITH28.c1 as c22,
         SAWITH19.c1 as c23,
         SAWITH9.c2 as c24,
         SAWITH11.c1 as c25,
         SAWITH9.c1 as c26
    from
                   SAWITH7 full outer join SAWITH9 On SAWITH7.c5 = SAWITH9.c9 and nvl(SAWITH7.c4 , 88.0) = nvl(SAWITH9.c8 , 88.0) and nvl(SAWITH7.c4 , 99.0) = nvl(SAWITH9.c8 , 99.0) and nvl(SAWITH7.c6 , 'q') = nvl(SAWITH9.c3 , 'q') and nvl(SAWITH7.c6 , 'z') = nvl(SAWITH9.c3 , 'z')) full outer join SAWITH11 On SAWITH11.c7 = case  when SAWITH7.c5 is not null then SAWITH7.c5 when SAWITH9.c9 is not null then SAWITH9.c9 end  and nvl(SAWITH11.c4 , 'q') = nvl(case  when SAWITH7.c6 is not null then SAWITH7.c6 when SAWITH9.c3 is not null then SAWITH9.c3 end  , 'q') and nvl(SAWITH11.c4 , 'z') = nvl(case  when SAWITH7.c6 is not null then SAWITH7.c6 when SAWITH9.c3 is not null then SAWITH9.c3 end  , 'z') and nvl(SAWITH11.c6 , 88.0) = nvl(case  when SAWITH7.c4 is not null then SAWITH7.c4 when SAWITH9.c8 is not null then SAWITH9.c8 end  , 88.0) and nvl(SAWITH11.c6 , 99.0) = nvl(case  when SAWITH7.c4 is not null then SAWITH7.c4 when SAWITH9.c8 is not null then SAWITH9.c8 end  , 99.0)) full outer join SAWITH19 On nvl(SAWITH19.c2 , 'q') = nvl(case  when SAWITH7.c6 is not null then SAWITH7.c6 when SAWITH9.c3 is not null then SAWITH9.c3 when SAWITH11.c4 is not null then SAWITH11.c4 end  , 'q') and nvl(SAWITH19.c2 , 'z') = nvl(case  when SAWITH7.c6 is not null then SAWITH7.c6 when SAWITH9.c3 is not null then SAWITH9.c3 when SAWITH11.c4 is not null then SAWITH11.c4 end  , 'z'),
         SAWITH27,
         SAWITH28,
         SAWITH29
    order by c2
    +++:cfa20000:cfa20015:----2013/08/14 10:31:12
    -------------------- Query Status: Successful Completion
    +++:cfa20000:cfa20015:----2013/08/14 10:31:12
    -------------------- Rows 21, bytes 34272 retrieved from database query id: <<5087545>>
    +++:cfa20000:cfa20015:----2013/08/14 10:31:12
    -------------------- Physical query response time 27 (seconds), id <<5087545>>
    +++:cfa20000:cfa20015:----2013/08/14 10:31:12
    -------------------- Physical Query Summary Stats: Number of physical queries 1, Cumulative time 27, DB-connect time 0 (seconds)
    +++:cfa20000:cfa20015:----2013/08/14 10:31:12
    -------------------- Rows returned to Client 17
    ---------------------------------------------  11g Query ----------------------------------------------------------
    Sending query to database named EBS Rapid Data Store (id: <<2779207>>), connection pool named EBS XXFI Connection Pool, logical request hash 1334563, physical request hash 292e1532: [[
    WITH
    OBICOMMON0 AS (select T28761.PERIOD_NAME as c2,
         T28761.PERIOD_START_DATE as c3,
         T28761.QUARTER_RANK as c4,
         ROW_NUMBER() OVER (PARTITION BY T28761.QUARTER_RANK ORDER BY T28761.QUARTER_RANK DESC) as c5,
         T28761.QUARTER_YEAR_NAME as c6
    from
         XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ),
    SAWITH0 AS (select Case when case D1.c5 when 1 then D1.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case D1.c5 when 1 then D1.c3 else NULL end  ASC NULLS LAST ) end as c1,
         D1.c2 as c2,
         D1.c4 as c3
    from
         OBICOMMON0 D1),
    SAWITH1 AS (select min(D1.c1) over (partition by D1.c3)  as c1,
         D1.c2 as c2
    from
         SAWITH0 D1),
    SAWITH2 AS (select distinct D1.c1 + 1 as c1,
         D1.c2 as c2
    from
         SAWITH1 D1),
    SAWITH3 AS (select Case when case D1.c5 when 1 then D1.c3 else NULL end  is not null then Rank() OVER ( ORDER BY case D1.c5 when 1 then D1.c3 else NULL end  ASC NULLS LAST ) end as c1,
         D1.c6 as c2,
         D1.c4 as c3
    from
         OBICOMMON0 D1),
    SAWITH4 AS (select distinct min(D1.c1) over (partition by D1.c3)  as c1,
         D1.c2 as c2,
         D1.c3 as c3
    from
         SAWITH3 D1),
    SAWITH5 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
         D4.c2 as c2,
         T41894.ICN_GROUP as c3,
         T30728.PARENT_REGION as c4,
         D4.c3 as c5,
         T41894.ICN_GROUP_CODE as c6
    from
         SAWITH2 D6 left outer join (
                        XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
                        XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T37838.SHIP_TO_COUNTRY_CODE2) left outer join
                   XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T37838.OVERRIDE_ICN = T41894.ICN_CODE) On D6.c2 = T37838.PERIOD_NAME,
         SAWITH4 D4
    where  ( D4.c1 = D6.c1 and D4.c2 = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') )
    group by T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP, D4.c2, D4.c3),
    SAWITH6 AS (select sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 50 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c1,
         sum(case  when T37838.POL_VERSION_FLAG = 'C' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 then nvl(T37838.AMOUNT , 0) when T37838.PERIOD_NAME <> 'March-13' and T37838.FORECAST_PROBABILITY_PERCENT >= 75 and T37838.POL_VERSION_FLAG is null then nvl(T37838.AMOUNT , 0) else 0 end ) as c2,
         T28761.QUARTER_YEAR_NAME as c3,
         T41894.ICN_GROUP as c4,
         T30728.PARENT_REGION as c5,
         T28761.QUARTER_RANK as c6,
         T41894.ICN_GROUP_CODE as c7
    from
                        XXFI.XXFI_REVFCST_POL_REPORTING_V T37838 /* Fact_POL_Snapshot */  left outer join
                        XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T37838.PERIOD_NAME) left outer join
                   XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T37838.SHIP_TO_COUNTRY_CODE2) left outer join
              XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T37838.OVERRIDE_ICN = T41894.ICN_CODE
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' and (T37838.PROSPECT_NUMBER is null or T37838.PROSPECT_NUMBER not like '%Budget%') )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK, T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP),
    SAWITH7 AS (select sum(T34877.AMOUNT) as c1,
         T28761.QUARTER_YEAR_NAME as c2,
         T41894.ICN_GROUP as c3,
         T30728.PARENT_REGION as c4,
         T28761.QUARTER_RANK as c5,
         T41894.ICN_GROUP_CODE as c6
    from
                        XXFI.XXFI_REVENUE_BUDGET_ACCUM T34877 /* Fact_Revenue_Budgets */  left outer join
                        XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */  On T28761.PERIOD_NAME = T34877.PERIOD_NAME) left outer join
                   XXFI.XXFI_GEO_REGION_ACCUM T30728 /* Dim_Regions */  On T30728.COUNTRY_CODE = T34877.SHIP_TO_COUNTRY_CODE2) left outer join
              XXFI.XXFI_ICN_OWNERS_V T41894 /* Dim_ICN_Override */  On T34877.OVERRIDE_ICN = T41894.ICN_CODE
    where  ( T28761.QUARTER_YEAR_NAME = '2010-Q2' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK, T30728.PARENT_REGION, T41894.ICN_GROUP_CODE, T41894.ICN_GROUP),
    SAWITH8 AS (select D1.c1 as c1,
         D1.c2 as c2,
         D1.c3 as c3,
         D1.c4 as c4,
         D1.c5 as c5,
         D1.c6 as c6,
         D1.c7 as c7,
         D1.c8 as c8,
         D1.c9 as c9,
         D1.c18 as c18,
         D1.c19 as c19,
         D1.c20 as c20,
         D1.c21 as c21,
         D1.c22 as c22
    from
         (select 0 as c1,
                   case  when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 when D3.c2 is not null then D3.c2 end  as c2,
                   case  when D1.c3 is not null then D1.c3 when D2.c4 is not null then D2.c4 when D3.c3 is not null then D3.c3 end  as c3,
                   case  when D1.c4 is not null then D1.c4 when D2.c5 is not null then D2.c5 when D3.c4 is not null then D3.c4 end  as c4,
                   case  when D1.c5 is not null then D1.c5 when D2.c6 is not null then D2.c6 when D3.c5 is not null then D3.c5 end  as c5,
                   nvl(D2.c2 , 0) / nullif( nvl(D3.c1 , 0), 0) * 100 as c6,
                   D3.c1 / 1000 as c7,
                   D1.c1 / 1000 as c8,
                   D2.c1 / 1000 as c9,
                   case  when D1.c6 is not null then D1.c6 when D2.c7 is not null then D2.c7 when D3.c6 is not null then D3.c6 end  as c18,
                   D2.c2 as c19,
                   D3.c1 as c20,
                   D1.c1 as c21,
                   D2.c1 as c22,
                   ROW_NUMBER() OVER (PARTITION BY case  when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 when D3.c2 is not null then D3.c2 end , case  when D1.c3 is not null then D1.c3 when D2.c4 is not null then D2.c4 when D3.c3 is not null then D3.c3 end , case  when D1.c4 is not null then D1.c4 when D2.c5 is not null then D2.c5 when D3.c4 is not null then D3.c4 end , case  when D1.c5 is not null then D1.c5 when D2.c6 is not null then D2.c6 when D3.c5 is not null then D3.c5 end , case  when D1.c6 is not null then D1.c6 when D2.c7 is not null then D2.c7 when D3.c6 is not null then D3.c6 end  ORDER BY case  when D1.c2 is not null then D1.c2 when D2.c3 is not null then D2.c3 when D3.c2 is not null then D3.c2 end  ASC, case  when D1.c3 is not null then D1.c3 when D2.c4 is not null then D2.c4 when D3.c3 is not null then D3.c3 end  ASC, case  when D1.c4 is not null then D1.c4 when D2.c5 is not null then D2.c5 when D3.c4 is not null then D3.c4 end  ASC, case  when D1.c5 is not null then D1.c5 when D2.c6 is not null then D2.c6 when D3.c5 is not null then D3.c5 end  ASC, case  when D1.c6 is not null then D1.c6 when D2.c7 is not null then D2.c7 when D3.c6 is not null then D3.c6 end  ASC) as c23
              from
                        SAWITH5 D1 full outer join SAWITH6 D2 On D1.c6 = D2.c7 and  SYS_OP_MAP_NONNULL(D1.c4) = SYS_OP_MAP_NONNULL(D2.c5)  and  SYS_OP_MAP_NONNULL(D1.c5) = SYS_OP_MAP_NONNULL(D2.c6) ) full outer join SAWITH7 D3 On D3.c6 = case  when D1.c6 is not null then D1.c6 when D2.c7 is not null then D2.c7 end  and  SYS_OP_MAP_NONNULL(D3.c4) = SYS_OP_MAP_NONNULL(case  when D1.c4 is not null then D1.c4 when D2.c5 is not null then D2.c5 end )  and  SYS_OP_MAP_NONNULL(D3.c5) = SYS_OP_MAP_NONNULL(case  when D1.c5 is not null then D1.c5 when D2.c6 is not null then D2.c6 end )
         ) D1
    where  ( D1.c23 = 1 ) )
    select D1.c1 as c1,
         D1.c2 as c2,
         D1.c3 as c3,
         D1.c4 as c4,
         D1.c5 as c5,
         D1.c6 as c6,
         D1.c7 as c7,
         D1.c8 as c8,
         D1.c9 as c9,
         D1.c18 as c19,
         D1.c19 as c21,
         D1.c20 as c22,
         D1.c21 as c23,
         D1.c22 as c24
    from
         SAWITH8 D1
    order by c4, c2, c5, c19, c3
    [2013-08-14T10:38:15.000-05:00] [OracleBIServerComponent] [TRACE:2] [USER-34] [] [ecid: 54a0696aeaefab88:-d74da91:1406506ef2a:-8000-00000000000151e6,0:1:9:6:1] [tid: a093e700] [requestid: cc480014] [sessionid: cc480000] [username: ] -------------------- Query Status: Successful Completion [[
    [2013-08-14T10:38:15.000-05:00] [OracleBIServerComponent] [TRACE:2] [USER-26] [] [ecid: 54a0696aeaefab88:-d74da91:1406506ef2a:-8000-00000000000151e6,0:1:9:6:1] [tid: a093e700] [requestid: cc480014] [sessionid: cc480000] [username: ] -------------------- Rows 17, bytes 27200 retrieved from database query id: <<2779207>>

    check the report for the columns which has incorrect values for any calculation, null handling.
    also check whether there is a difference in logical SQL between 10g and 11g.
    also check whether they are pointing to same db.
    check for null handling or default value not being set in 11g.
    try rebuilding the same report, to check the metrics individually verify they match with 10g.

Maybe you are looking for

  • Can send but can't receive faxes on HP Laserjet, on Mac 10.9 Mavericks with TAM answering machine

    I have an iMac running OS 10.9 (Mavericks) and an HP Laserjet Professional M1212nf MFP all-in-one print/scan/fax machine connected by USB.  I have a telephone system with answering machine connected. I can send out faxes from the HP and from the Mac

  • Can I use Applescript for Scriptinh in Bridge?

    I use all of the CS2, but am new to scripting. From reading the Photoshop and InDesign Scripting guides I can see that I can use either Applescript or Javascript. But I cannot find any reference that indicates that Applescript can be used by Bridge.

  • Preview fails to quit

    I have run MacOSX 10.2.8 (Jaguar) on my iBook successfully for years. Suddenly, Preview has developed an intractable fault. Preview will not open any files yet fails to quit. Finder won't force quit Preview either. In the Force Quit window Preview ap

  • SAP Cloud for Customer : Code list mapping question

    Hi All. I have a basic question. When we do code list mapping for our own defined mapping group and have to choose Data Type name what should be used as Namespace. I usually see two entries but not sure of their purposes. What is the difference betwe

  • Pls do the needful

    hi i have threee input parametres parametesr: p_matnr LIKE mara-matnr OBLIGATORY ,                p_charg LIKE mchb-charg OBLIGATORY,                p_werks LIKE marc-werks OBLIGATORY, in input selection i am entering the values. say  matnr  qm002