Dynmaic sql for PreparedStatement

I'm attempting to dynamically generate the where clause of a sql query.
My code looks something like:
public void myMethod (String fieldA, Map params) throws SQLException{
String sql = "select * from tableA a, tableB b where a.field = b.field and a.field = ?"
Connection con = PoolManager.getConnection();
Iterator it = params.keySet().iterator();
while(it.hasNext()){
String fieldName = (String) it.next();
sql +="and "+fieldName+" = ? ";
PreparedStatement pStmt = conn.prepareStatement(sql);
pStmt.setString(1,fieldA);
Iterator it2 = params.keySet().iterator();
for(int i=2;it2.hasNext();i++){
String fieldName = (String) it2.next();
Object value = params.get(fieldName);
if(value instanceof String){
pStmt.setString(i,(String)value);
} else if(value instanceof Integer){
pStmt.setInt(i,((Integer)value).intValue());
} else if(value instanceof java.sql.Date){
pStmt.setDate(i, (java.sql.Date)value);
ResultSet rs = pStmt.executeQuery();
I'm using resource pooling to get a connection, so that's not my problem.
The params Map has a keyset of column names paired with values which are objects of various types, for example an entry could be ("a.entryDate",java.sql.Date(2002,1,2));
If I print out my sql following my while loop, the sql looks good. If I step through the code in a debugger, I set all of the values in the preparedStatement as I expect, it bombs when the executeQuery step is performed.
The sql exception I get states an incorrect syntax near '?'
Again, the sql looks fine and ran correctly BEFORE I tried to dynamically build the where query. This is puzzling because if I print out sql statment in either case, they are identical.
Any help would really be appreciated.
ddwb

try the following:
replace
sql +="and "+fieldName+" = ? ";with
sql +=" and "+fieldName+" = ? ";note: there is an additional space at the beginning of the string.

Similar Messages

  • Exception: Call of execute(String) is not allowed for PreparedStatement

    Hi all,
    This query was run fine on SapDB 7.4 from Jave code using prepareStatement()  method:
    declare id11216053819634 cursor for select sc.name, measuredobjectid id from serviceconditions sc, measuredobjects mo where sc.collectionid = mo.collectionid and sc.name like 'DWindowsSLA/%,%,%,%' for reuse
    declare id21216053819634 cursor for select min(sampletime), max(sampletime), name, id11216053819634.id from id11216053819634, d_slastore ss where id11216053819634.id = ss.measuredobjectid and ss.sampletime between '2008-07-14 00:00:00' and '2008-07-14 12:43:35'  group by name, id11216053819634.id for reuse
    select ss.status, ss.statuschange, ss.sampletime, id21216053819634.name from d_slastore ss, id21216053819634 where ss.measuredobjectid = id21216053819634.id and ss.sampletime between '2008-07-14 00:00:00' and '2008-07-14 12:43:35'  and (statuschange != 0 or ss.sampletime = id21216053819634.expression1 or ss.sampletime = id21216053819634.expression2) order by name, sampletime
    We recently upgrade our old SapDb to the latest MaxDB. An now this query produces the error:
    com.sap.dbtech.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Call of execute(String) is not allowed for PreparedStatement.
    Does anyone know how to fix this?
    Thank you very much,
    Irina

    Hi Irina,
    First, welcome to SDN!
    Well, PreparedStatement represents a precompiled SQL statement, so you should be using the no-arg execute() method rather than execute(String).
    HTH!
    \-- Vladimir

  • ORA-01489 Received Generating SQL for Report Region

    I am new to Apex and I am running into an issue with an report region I am puzzled by. Just a foreword, I'm sure this hack solution will get a good share of facepalms and chuckles from those with far more experience. I welcome suggestions and criticism that are helpful and edifying!
    I am on Apex 4.0.2.00.07 running on 10g, I believe R2.
    A little background, my customer has asked an Excel spreadsheet be converted into a database application. As part of the transition they would like an export from the database that is in the same format as the current spreadsheet. Because the column count in this export is dynmic based on the number of records in a specific table, I decided to create a temporary table for the export. The column names in this temp table are based on a "name" column from the same data table so I end up with columns named 'REC_NAME A', 'REC_NAME B', etc. (e.g. Alpha Record, Papa Record, Echo Record, X-Ray Record). The column count is currently ~350 for the spreadsheet version.
    Because the column count is so large and the column names are dynamic I've run into a host of challenges and errors creating this export. I am a contractor in a corporate environmentm, so making changes to the apex environment or installation is beyond my influence and really beyond what could be justified by this single requirement for this project. I have tried procedures and apex plug-ins for generating the file however the UTL_FILE package is not available to me. I am currently generating the SQL for the query in a function and returning it to the report region in a single column (the user will be doing a text-to-column conversion later). The data is successfully being generated, however, the sql for the headers is where I am stumped.
    At first I thought it was because I returned both queries as one and they were joined with a 'union all'. However, after looking closer, the SQL being returned for the headers is about +10K+ characters long. The SQL being returned for the data is about +14k+. As mentioned above, the data is being generated and exported, however when I generate the SQL for the headers I am receiving a report error with "ORA-01489: result of string concatenation is too long" in the file. I am puzzled why a shorter string is generating this message. I took the function from both pages and ran them in a SQL command prompt and both return their string values without errors.
    I'm hopeful that it's something obvious and noobish that I'm overlooking.
    here is the code:
    data SQL function:
    declare
      l_tbl varchar2(20);
      l_ret varchar2(32767);
      l_c number := 0;
      l_dlim varchar2(3) := '''|''';
    begin
      l_tbl := 'EXPORT_STEP';
      l_ret := 'select ';
      for rec in (select column_name from user_tab_columns where table_name = l_tbl order by column_id)
      loop
        if l_c = 1 then
            l_ret := l_ret || '||' || l_dlim || '|| to_char("'||rec.column_name||'")';
        else
            l_c := 1;
            l_ret := l_ret || ' to_char("' || rec.column_name || '")';
        end if;
      end loop;
        l_ret := l_ret || ' from ' || l_tbl;
      dbms_output.put_line(l_ret);
    end;header sql function:
    declare
      l_tbl varchar2(20);
      l_ret varchar2(32767);
      l_c number := 0;
      l_dlim varchar2(3) := '''|''';
    begin
      l_tbl := 'EXPORT_STEP';
      for rec in (select column_name from user_tab_columns where table_name = l_tbl order by column_id)
      loop
        if l_c = 1 then
            l_ret := l_ret || '||' || l_dlim || '||'''||rec.column_name||'''';
        else
            l_c := 1;
            l_ret := l_ret || '''' || rec.column_name || '''';
        end if;
      end loop;
        l_ret := l_ret || ' from dual';
      dbms_output.put_line(l_ret);
    end;-------
    EDIT: just a comment on the complexity of this export, each record in the back-end table adds 12 columns to my export table. Those 12 columns are coming from 5 different tables and are the product of a set of functions calculating or looking up their values. This is export is really a pivot table based on the records in another table.
    Edited by: nimda xinu on Mar 8, 2013 1:28 PM

    Thank you, Denes, for looking into my issue. I appreciate your time!
    It is unfortunately a business requirement. My customer has required that the data we are migrating to this app from a spreadsheet be exported in the same format, albeit temporarily. I still must meet the requirement. I'm working around the 350 columns by dumping everything into a single column, which is working for the data, however, the headers export is throwing the 01489 error. I did run into the error you posted in your reply. I attempted to work around it with the clob type but eneded up running into my string concatentation error again.
    I'm open to any suggestions at this point given that I have the data. I'm so close because the data is exporting, but because the columns are dynamic, the export does me little good without the headers to go along with it.

  • Looking For Free Good Tutorial To Learn SQL For 8i

    Hello all,
    I am looking for a free good tutorial to learn SQL for Oracle 8i.
    If anyone got any links or resources, kindly suggest.
    Thanks in advance.

    I am looking for a free good tutorial to learn SQL for Oracle 8i.8i has been unsupported for years. If you're just starting out, you might as well learn the latest.

  • What is a efficient SQL for this query ?

    Hi,
    I am using 9.2 database. Suppose I am having following 2 tables
    Table p having only one column i.e. 'a'. Values in this column are
    a1
    b1
    c1
    d1
    Table Q having three columns a, b, c
    a1, 1, 100
    a1, 2, 50
    b1, 1, 30
    b1, 2, 40
    d1, 2, 90
    Table Q can be joined only using column a.
    Table Q can have multiple or no records for column a in table p. Based on above sample data, I want following output
    a1, 100, 50
    b1, 30, 40
    c1
    d1, 90
    Kindly tell be how can I achive this in most efiicient way !!!
    thanks & regards
    PJP

    I only have you two tracks about how do it.
    If you want all the columns from p with or wihout q you have to do:
    11:35:58 SQL> l
    1 select p.*, q.*
    2 from p,q
    3* where p.a = q.a (+)
    11:37:27 SQL> /
    For change the order of the colums for rows you can see the url, the are more examples like that only need to search "columns for rows" in this forums.
    Anyway:
    with rt as
    select 'a1' a, 1 b, 100 c from dual union
    select 'a1', 2, 50 from dual union
    select 'b1', 1, 30 from dual union
    select 'b1', 2, 40 from dual union
    select 'd1', 2, 90 from dual)
    --select * from rt
    select a, decode('1','0','0',rtrim(xmlagg(xmlelement(b, b || ',')).extract('//text()'),',')) b
    , decode('1','0','0',rtrim(xmlagg(xmlelement(c, c || ',')).extract('//text()'),','))
    from rt
    group by a
    Message was edited by:
    cth
    Other way:
    select a, ltrim(b,',') as b, ltrim(c,',') as c
    from (
    select row_number() over (partition by a order by length(b) desc) as rn, a, b,c
    from (select a, sys_connect_by_path(b, ',') as b,
              sys_connect_by_path(c, ',') as c
    from (
    select row_number() over (partition by a order by b) as rn, a, b,c
    from rt) y
    connect by rn = prior rn + 1 and prior a = a
    start with rn = 1
    where rn = 1
    Message was edited by:
    cth

  • BREAK not working in SQL+ for windows. Works in SQL+ in DOS

    I'm writing a simple query in SQL+
    SELECT table_name, column_name
    FROM user_tab_columns
    WHERE table_name like 'MYTAB%'I first set BREAK ON table_name
    then I run my query.
    I expect the table name to be shown once, per table, not once per column.
    If I run this query in SQL+ in a DOS window, that's exactly what happens.
    If I run the same thing in SQL+ for Windows (version 10 on an 11g db) the break command appears to be ignored.
    Any ideas ??
    Thanks folks.

    Not sure but maybe try the NODUPLICATES option.
    break on table_name noduplicates

  • Need help with SQL for Pie Chart

    I am trying to create a pie charge which would have 3 slices.
    Following sql gives me the expected values when I run the sql command:
    select
    round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) "OD Engagements",
    round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) "Talent Engagements",
    round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) "Other Engagements"
    from OTD_PROJECT
    where STATUS in ('Open','Hold')
    I get 3 columns labeled: OD Engagements, Talent Engagements and Other Engagements with the correct averages based on the the data.
    I have tried several ways to try to get this to work in the SQL for a pie chart, but keep getting the invalid sql message and it won't save. I also tried saving without validation, but no data is shown on the chart at all.
    I want to have a pie, with 3 slices, one labeled OD Engagements with a value of 27, one labeled Talent Engagements with a value of 43 and one labeled Other Engagements with a value of 30. Then I want to be able to click on each pie slice to drill down to a secondary pie chart that shows the breakdown based on the categories included in that type.
    Since I am not grouping based on an existing field I an unsure what the link and label values should be in the chart sql.

    You'll need something like the below. I have no idea what the URL for the drilldown needs to be. It should create an appropriate link in your app for the particular slice. Mainly the code below breaks the SQL results into three rows rather than three columns. It may well have a syntax error since I can't test.
    select linkval  AS LINK,
           title    AS LABEL,
           calc_val AS VALUE
    FROM   (SELECT 'OD Engagements' AS title,
                   round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Talent Engagements' AS title,
                   round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Other Engagements' AS title,
                   round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
           );

  • Could we use embedded SQL for XML in .pc ?

    Hi,
    Can we use embedded SQL for XML in .pc ?
    <1> assume we have run SQL statements in Oracle9i:
    SQL>create table MY_XML_TABLE
    (Key1 NUMBER,
    Xml_Column SYS.XMLTYPE);
    SQL>insert into MY_XML_TABLE(key1, Xml_Column) values
    (1, SYS.XMLTYPE.CREATEXML
    ('<book>
    <chapter num="1">
    <text>This is the my text</text>
    </chapter>
    <book>')
    <2> Could we directly translate it in .pc as usually:
    <outlined, not exactly)
    int emp_number = 1;
    XML_Data emprec; /* ?????? */
    EXEC SQL SELECT M.Xml_Column.GETCLOBVAL() as XML_Data
    INTO :emprec INDICATOR :emprec_ind
    FROM MY_XML_TABLE M
    WHERE Key1 = :emp_number;
    Thanks
    MJ

    reply by myself.
    No problem!!
    ===============================
    int emp_number = 1;
    struct emprec{
    char feature[1280]
    EXEC SQL SELECT M.Xml_Column.GETCLOBVAL() as XML_Data
    INTO :emprec INDICATOR :emprec_ind
    FROM MY_XML_TABLE M
    WHERE Key1 = :emp_number;

  • Trying to find out the sql for the below 3 values

    HI Experts,
    I am trying to find the sql that can give me the values for the below three values. can some one Help me out getting these ?
    Free buffer waits (%)
    Local write wait (%)
    Latch: cache buffer chains (%)
    Actually these are the metrics which are available in OEM for the DB releases up to 9i. Post 9i releases , these metrics are obsoleted.
    So, trying to find the sql for these and use them as an UDM for the 10g and 11g DB's
    Thanks in Advance.
    Thanks,
    Naveen kumar.

    And is there any why to find using what sql the metrci is formed ?

  • Equivalent of pl/sql for a tsql

    Can somebody post me the the equivalent of pl/sql for the below Tsql (Microsoft SQl Server)
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    SET ANSI_PADDING OFF
    GO
    CREATE TABLE [Localizations] (
    [pk] int NOT NULL IDENTITY(1, 1),
    [ResourceId] nvarchar(512) NOT NULL,
    [Value] ntext NOT NULL,
    [LocaleId] varchar(5) NOT NULL,
    [ResourceSet] nvarchar(512) NOT NULL,
    [Type] nvarchar(255) NOT NULL,
    [BinFile] image NULL,
    [TextFile] ntext NULL,
    [Filename] nvarchar(128) NOT NULL
    ON [PRIMARY]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [PK_Localizations]
    PRIMARY KEY
    ([pk])
    ON [PRIMARY]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_ControlId]
    DEFAULT ('') FOR [ResourceId]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_Filename]
    DEFAULT ('') FOR [Filename]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_LocaleId]
    DEFAULT ('') FOR [LocaleId]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_PageId]
    DEFAULT ('') FOR [ResourceSet]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_Text]
    DEFAULT ('') FOR [Value]
    GO
    ALTER TABLE [Localizations]
    ADD
    CONSTRAINT [DF_Localizations_Type]
    DEFAULT ('') FOR [Type]
    GO
    Edited by: user7722364 on Oct 19, 2009 8:18 AM

    The "default '' "(or null) constraints are not required.
    You need
    - a sequence instead of the identity column
    - a trigger to populate the sequence if it's not in the code
    then it's pretty similar
    - create table statement
    - create pk (which you could do as part of the create table statement if you wish)
    Whether you need NVARCHAR2 depends on your character set.

  • Dynamic PL/SQL for Deletion of Records

    Dear all,
    I am using Dynamic PL/SQL for Deletion of Records,In that PL/SQL, i have to get the no.of records deleted and send a report with the no.of rows deleted.
    Please help me on this..
    Thanks,
    Murugesan

    Hi,
    Try this:
    SQL> SELECT * FROM T;
    DT              CODE
    14-FEB-07          1
    14-FEB-07          1
    14-FEB-07          1
    14-FEB-07          2
    14-FEB-07          2
    SQL>
    SQL> ed
    Wrote file afiedt.buf
      1  BEGIN
      2    EXECUTE IMMEDIATE  ' DELETE FROM T WHERE CODE = 1';
      3    DBMS_OUTPUT.PUT_LINE(' Total Deleted Rows :'||SQL%ROWCOUNT);
      4* END;
    SQL> /
    Total Deleted Rows :3
    PL/SQL procedure successfully completed.
    SQL> Regards
    Avinash

  • How to start checking the bottle necks in PL/SQL for benchmarking?

    How to start checking the bottle necks in PL/SQL for benchmarking? Can anbody post me the instructions to start tuning the Oracle PL/SQL code..
    Thanks & Regards,
    VJ

    you can use DBMS_PROFILER to do this. This built in package is very well documented:
    http://www.oracle.com/pls/db102/ranked?word=dbms_profiler&remark=federated_search
    Depending on your IDE, you could get a visual representation of the profile. Something like:
    http://technology.amis.nl/blog/2327/dbms_profiler-report-for-sql-developer

  • Can any one convert my SQL for Discoverer?

    This is a SQL you can run on the server but I was wondering if someone could convert the SQL for Discoverer?
    SQL:
    SELECT po.profile_option_name "NAME",
    po.USER_PROFILE_OPTION_NAME,
    decode(to_char(pov.level_id),
    ‘10001', ‘SITE’,
    ‘10002', ‘APP’,
    ‘10003', ‘RESP’,
    ‘10005', ‘SERVER’,
    ‘10006', ‘ORG’,
    ‘10004', ‘USER’, ‘???’) "LEV",
    decode(to_char(pov.level_id),
    ‘10001', ”,
    ‘10002', app.application_short_name,
    ‘10003', rsp.responsibility_key,
    ‘10005', svr.node_name,
    ‘10006', org.name,
    ‘10004', usr.user_name,
    ‘???’) "CONTEXT",
    pov.profile_option_value "VALUE"
    FROM FND_PROFILE_OPTIONS_VL po,
    FND_PROFILE_OPTION_VALUES pov,
    fnd_user usr,
    fnd_application app,
    fnd_responsibility rsp,
    fnd_nodes svr,
    hr_operating_units org
    WHERE po.profile_option_name LIKE ‘%&&profile%’
    AND pov.application_id = po.application_id
    AND pov.profile_option_id = po.profile_option_id
    AND usr.user_id (+) = pov.level_value
    AND rsp.application_id (+) = pov.level_value_application_id
    AND rsp.responsibility_id (+) = pov.level_value
    AND app.application_id (+) = pov.level_value
    AND svr.node_id (+) = pov.level_value
    AND org.organization_id (+) = pov.level_value
    AND decode(to_char(pov.level_id),
    ‘10001', ”,
    ‘10002', app.application_short_name,
    ‘10003', rsp.responsibility_key,
    ‘10005', svr.node_name,
    ‘10006', org.name,
    ‘10004', usr.user_name,
    ‘???’) LIKE ‘%&&username%’
    ORDER BY "NAME", pov.level_id, "VALUE";

    Hi,
    You can create a custom folder on using the administrator using the code,
    The only change is that you need the take off the conditions over the parameters and create those in the worksheet and not in the SQL.
    so you need to create the custom folder using:
    SELECT Po.Profile_Option_Name "NAME"
    *,Po.User_Profile_Option_Name*
    *,Decode(To_Char(Pov.Level_Id)*
    *,'10001'*
    *,'SITE'*
    *,'10002'*
    *,'APP'*
    *,'10003'*
    *,'RESP'*
    *,'10005'*
    *,'SERVER'*
    *,'10006'*
    *,'ORG'*
    *,'10004'*
    *,'USER'*
    *,'???') "LEV"*
    *,Decode(To_Char(Pov.Level_Id)*
    *,'10001'*
    *,'10002'*
    *,App.Application_Short_Name*
    *,'10003'*
    *,Rsp.Responsibility_Key*
    *,'10005'*
    *,Svr.Node_Name*
    *,'10006'*
    *,Org.NAME*
    *,'10004'*
    *,Usr.User_Name*
    *,'???') "CONTEXT"*
    *,Pov.Profile_Option_Value "VALUE"*
    FROM   Fnd_Profile_Options_Vl    Po
    *,Fnd_Profile_Option_Values Pov*
    *,Fnd_User Usr*
    *,Fnd_Application App*
    *,Fnd_Responsibility Rsp*
    *,Fnd_Nodes Svr*
    *,Hr_Operating_Units Org*
    WHERE  Pov.Application_Id = Po.Application_Id AND
    Pov.Profile_Option_Id = Po.Profile_Option_Id AND
    Usr.User_Id(+) = Pov.Level_Value AND
    Rsp.Application_Id(+) = Pov.Level_Value_Application_Id AND
    Rsp.Responsibility_Id(+) = Pov.Level_Value AND
    App.Application_Id(+) = Pov.Level_Value AND
    Svr.Node_Id(+) = Pov.Level_Value AND
    Org.Organization_Id(+) = Pov.Level_Value
    ORDER  BY "NAME"
    *,Pov.Level_Id*
    *,"VALUE";*
    Tamir

  • Help with Sql for Annual Report per month

    Hi, I have been given the task to create an annual report by month that would show company's profits per month and totals in the last column to show which branch had the hightest income.
    Branch||January||February||March||April||May||June....||Total||     
    ABC ||$0.00 ||$0.00 ||$0.00||$0.00||$0.00||$0.00||Total Amt||
    DEF ||$18.01 ||$3.88 ||$18.01||$4.12||$18.01||$3.97||Total Amt||
    Can anyone please help me in giving an idea of how to write sql for this report..? I am building sub-queries for everymonth by giving the dates for Jan/Feb/March..but I think this is not the right way to do this....
    SELECT
    sum(a.commission) December,
    sum(b.commission) November
    FROM
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-DEC-2009' and '31-DEC-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) a,
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-NOV-2009' and '30-NOV-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) b
    I always have hight hope from this forum. So please help. Thanks in advance.
    Edited by: Aditi_Seth on Jan 26, 2010 2:29 PM

    You may try a group report on one simple query like:
    Select
    c.account_id, c.officer, to_char(c.protection_effective, 'MM') month
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.status='APPROVED' and .....
    Group by
    c.account_id
    c.officer,
    to_char(c.protection_effective, 'MM')
    break/gropu on account_id, c.officer, to_char(c.protection_effective, 'MM') and total will be automatically calculated by Reports.

  • Edit SQL for Infoprovider report

    Hi,
    i have a small question, since i never interfaced the BO XI 3.1 with SAP BW. Can we edit the SQL for the webi report created on the SAP Infoprovider (say for example : InfoCube - cube1).
    Regards,
    Siva

    Hi Siva,
    No you can not!
    When you create a webi report based on a SAP BW cube there is no SQL generated, but an MDX statement. Currently it is not even possible to view the MDX statement on the BO side. You need to put a trace on it on the SAP BW side.
    Regards,
    Harry

Maybe you are looking for

  • Can't open mac app store after osx mavericks install

    i just finished the install of OSX Mavericks, but for some reason i cannot open the mac app store, i tried restarting the computer several times and nothing, try to open it from the dock, applications folder, even terminal, and NOTHING, it jumps once

  • How to save an output job into external directory in Workspace 11.1.2.1 ?

    Hi All, I am using Workspace 11.1.2.1.600 and I'm trying to set an external directory from an ouput job, but I'm not getting to set it. I click on Navigate --> Schedule --> Batch Schedule and choose my batch file. Then I right click on it and choose

  • BOM Product Structure

    Hi Gurus,              I have multi-level assembly ,in which some of the BOM components are text items. In tcode CSMB- BOM product structutre display the text items are not shown. I tried to change the layout,but could not figure it out. Is there is

  • Photoshop CS2/Elements 4 install problems!

    This has been bugging me since I got both programs; whenever I attempt to install them, when it tries to install "shared items", it says a "required file is missing", and then tells me to restart the installation. I have no idea what this "required"

  • Unable to find a WSDL

    Hi ; I deployed a process. It was run correctly, but now i get this error: Unable to find a WSDL that has a definition for service {http://xmlns.oracle.com/bpmn/bpmnProcess/MainProcess}MainProcess.service and port MainProcessPort. Please make sure th