OBIEE 10g Getting wrong results when adding calculated columns to a report

Hi,
I'm experiencing a possible misbehaviour with OBIEE 10g (10.1.3.4.1).
I have a simple report with a table. Columns are simply selected from dimensions and facts. In this case the generated query is:
WITH
SAWITH0 AS (select sum(T30604.TOTAL_TIME) as c1,
sum(T30604.MATERIALS_QTT_COST) as c2,
sum(T30604.AMNT) as c3,
sum(T30604.QNTY) as c4,
T30622.BRANCH_CODE as c5,
T25064.SRP1_CODE as c6,
T25064.SRP1_DESC as c7,
T25064.SRP2_CODE as c8
from
THK_BRANCHES T30622,
THK_ITEMS T25064,
THK_INVENTORY_TRANSACTIONS T30604
where ( T25064.ITEM_ID = T30604.ITEM_ID and T30604.BRANCH_ID = T30622.BRANCH_ID )
group by T25064.SRP1_CODE, T25064.SRP1_DESC, T25064.SRP2_CODE, T30622.BRANCH_CODE)
select distinct SAWITH0.c5 as c1,
SAWITH0.c6 as c2,
SAWITH0.c7 as c3,
SAWITH0.c8 as c4,
SAWITH0.c4 as c5,
SAWITH0.c3 as c6,
SAWITH0.c2 as c7,
SAWITH0.c1 as c8,
SAWITH0.c4 as c9,
SAWITH0.c3 as c10,
SAWITH0.c2 as c11,
SAWITH0.c1 as c12,
SAWITH0.c4 as c13,
SAWITH0.c3 as c14,
SAWITH0.c2 as c15,
SAWITH0.c1 as c16,
SAWITH0.c4 as c17,
SAWITH0.c3 as c18,
SAWITH0.c2 as c19,
SAWITH0.c1 as c20
from
SAWITH0
Results of this report / query are correct.
I then add a simple calculation (subtraction between two fields). The generated query is:
WITH
SAWITH0 AS (select sum(T30604.MATERIALS_QTT_COST) as c1,
sum(T30604.AMNT) as c2,
T30622.BRANCH_CODE as c3,
T25064.SRP1_CODE as c6,
T25064.SRP1_DESC as c7,
sum(T30604.TOTAL_TIME) as c8,
sum(T30604.QNTY) as c11,
T25064.SRP2_CODE as c12
from
THK_BRANCHES T30622,
THK_ITEMS T25064,
THK_INVENTORY_TRANSACTIONS T30604
where ( T25064.ITEM_ID = T30604.ITEM_ID and T30604.BRANCH_ID = T30622.BRANCH_ID )
group by T25064.SRP1_CODE, T25064.SRP1_DESC, T25064.SRP2_CODE, T30622.BRANCH_CODE),
SAWITH1 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.c10 as c10,
D1.c11 as c11,
D1.c12 as c12
from
(select sum(SAWITH0.c1) over (partition by SAWITH0.c3) as c1,
sum(SAWITH0.c2) over (partition by SAWITH0.c3) as c2,
SAWITH0.c3 as c3,
sum(SAWITH0.c1) over (partition by SAWITH0.c6, SAWITH0.c3) as c4,
sum(SAWITH0.c2) over (partition by SAWITH0.c6, SAWITH0.c3) as c5,
SAWITH0.c6 as c6,
SAWITH0.c7 as c7,
sum(SAWITH0.c8) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c8,
sum(SAWITH0.c1) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c9,
sum(SAWITH0.c2) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c10,
sum(SAWITH0.c11) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c11,
SAWITH0.c12 as c12,
ROW_NUMBER() OVER (PARTITION BY SAWITH0.c3, SAWITH0.c12 ORDER BY SAWITH0.c3 ASC, SAWITH0.c12 ASC) as c13
from
SAWITH0
) D1
where ( D1.c13 = 1 ) ),
SAWITH2 AS (select sum(T30604.MATERIALS_QTT_COST) as c1,
sum(T30604.AMNT) as c2
from
THK_INVENTORY_TRANSACTIONS T30604)
select SAWITH1.c3 as c1,
SAWITH1.c6 as c2,
SAWITH1.c7 as c3,
SAWITH1.c12 as c4,
SAWITH1.c11 as c5,
SAWITH1.c10 as c6,
SAWITH1.c9 as c7,
SAWITH1.c8 as c8,
SAWITH1.c10 - SAWITH1.c9 as c9,
SAWITH1.c11 as c10,
SAWITH1.c10 as c11,
SAWITH1.c9 as c12,
SAWITH1.c8 as c13,
SAWITH1.c11 as c15,
SAWITH1.c10 as c16,
SAWITH1.c9 as c17,
SAWITH1.c8 as c18,
SAWITH1.c11 as c20,
SAWITH1.c10 as c21,
SAWITH1.c9 as c22,
SAWITH1.c8 as c23,
SAWITH1.c5 as c26,
SAWITH1.c4 as c27,
SAWITH1.c2 as c28,
SAWITH1.c1 as c29,
SAWITH2.c2 as c30,
SAWITH2.c1 as c31
from
SAWITH1,
SAWITH2
Results of this report / query are wrong: it seems as if some rows "disappear".
If I delete the filter in SAWITH1 query above ( D1.c13 = 1 ) results are correct.
Anyone experiencing the same problem? The strange thing is that I have a number of similar reports (on other subject areas) and everyting is working fine.
Please also note that I don't want to add this kind of calculated items in the RPD (they can be simple calculations that are made on-the-fly).
Any help would be greatly appreciated.
Thanks a lot and regards,
Cristina

I have the same issue, everything OBIEE server generate query using ROW_NUMBER() over () function, it will hardcode Dx.cx = 1, this will cause issue if you have rows of the same distinct value, thus causing missing rows and the final results will be wrong.
I have open a SR with Oracle Support since March 2011, but till today, they have not resolve the issue yet.
Hope they solve the issue soon.
Best Regards
KT

Similar Messages

  • ORA-00904 - invalid identifier when adding new column to the report query

    Hi,
    I am trying to add a new field to an existing bespoke report query. When I click on ok, I get the following error
    message: "ORA-00904: <field name> : invalid identifier ==> <field_name>
    Any ideas what is causing this problem? Version of the report builder is : 6.0.8 and is connected to a 10.2 db.
    Any help appreciated.
    Many Thanks,
    Praveen
    Edited by: praveenrn on May 21, 2009 2:38 PM

    What is the field name ? Maybe a reserved word ? Change to "my_new_variable" to check...
    Cheers,
    Jens Rettig

  • I get different result when I paste with mouse and shift+ins

    Sometimes I get different result when I paste the clipboard content with mouse and shift+insert key combination. Why? What can I do to stop this annoyance?

    Just to add a little to the above, there really is no universally applied standard (not even close) for how the primary, secondary, and clipboard buffers should be used.  Any X program can use them however they wish.  But there are some common patterns: selected text should be placed in the primary buffer, and X pastes from the primary buffer with either middle click or shift-ins by default.
    This default can (and unfortunately often is) overriden by clipboard managers - I don't know why they don't stay true to their name and just manage the clipboard buffer, but they often don't.
    <mini rant>with no clipboard tools installed, selected text in any program I have is in the primary selection, and shift+ins or middle click paste from this primary selection.  Ctrl-C/Ctrl-V post to/from the clipboard buffer.  No need for extra tools.  If I install any clipboard manager, this default sanity of X11 goes strait to s(&*Y.  I don't like clipboard managers </mini rant>  <mini praise> X11 is great without any of that cruft added </mini praise>
    Last edited by Trilby (2013-06-15 03:12:39)

  • Bug 2679062 - Wrong results possible from multi-column INLIST - though stat

    Hi,
    The following test case is supplied in the metalink in bug no. 2871341, the base bug for this bug is 2679062.
    REPRODUCIBILITY:
    Reproduces constantly with simple test case below:
    TEST CASE:
    DROP TABLE A1
    CREATE TABLE A1 (X1 VARCHAR2(10), X2 VARCHAR2(10))
    REM *********** Create the second table: ***************
    DROP TABLE A2
    CREATE TABLE A2 (X1 VARCHAR2(10), X2 VARCHAR2(10))
    INSERT INTO A1 VALUES ('1','2');
    INSERT INTO A2 VALUES ('3','4');
    COMMIT;
    CREATE INDEX A1_X1 ON A1(X1 );
    CREATE INDEX A1_X2 ON A1(X2);
    CREATE INDEX A2_X1 ON A2(X1);
    CREATE INDEX A2_X2 ON A2(X2);
    CREATE OR REPLACE VIEW A_ALL AS SELECT * FROM A1 UNION ALL SELECT * FROM A2;
    ANALYZE TABLE A1 COMPUTE STATISTICS;
    ANALYZE TABLE A2 COMPUTE STATISTICS;
    SELECT * FROM A_ALL;
    SELECT * FROM A_ALL WHERE (X1='1' AND X2='2') ;
    SELECT * FROM A_ALL WHERE ((X1='1' AND X2='2') OR (X1='3' AND X2='4'));
    The 2nd query returns answer while the second is not !
    The following is published in the 9.2.0.4 fixed bug list:
    " 9204 - 2679062 - Wrong results possible from multi-column INLIST "
    I have installed 9.2.0.4 patch set on a win 2000 machine Oracle and saw that the above case is actually solved but our application which has a very similar case doesn't.
    After investigating I found the following test case that fails, it reproduces only when you have index on all columns (covering index):
    drop table t1_1;
    drop table t1_2;
    create table t1_1(c1 number, c2 number, c3 number);
    create table t1_2(c1 number, c2 number, c3 number);
    create index t1_1_ix on t1_1(c1, c2, c3);
    create index t1_2_ix on t1_2(c1, c2, c3);
    create or replace view t1 as select * from t1_1 union all select * from t1_2;
    insert into t1_1 values(1, 2, 100);
    insert into t1_2 values(1, 2, 200);
    commit;
    analyze table t1_1 compute statistics;
    analyze table t1_2 compute statistics;
    prompt
    prompt #######################################
    prompt try 1 - works fine
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    ( (c2=2) and (c3=100)
    prompt
    prompt #######################################
    prompt try 2 - works fine
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    (c2=2) and (c3=200)
    prompt
    prompt #######################################
    prompt try 3 - try 1 OR try 2 does not work !
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    ( ( (c2=2) and (c3=100) )
    or
    ( (c2=2) and (c3=200) )
    opened a TAR and wanted to share with you.
    Tal Olier ([email protected]).

    Hi,
    The following test case is supplied in the metalink in bug no. 2871341, the base bug for this bug is 2679062.
    REPRODUCIBILITY:
    Reproduces constantly with simple test case below:
    TEST CASE:
    DROP TABLE A1
    CREATE TABLE A1 (X1 VARCHAR2(10), X2 VARCHAR2(10))
    REM *********** Create the second table: ***************
    DROP TABLE A2
    CREATE TABLE A2 (X1 VARCHAR2(10), X2 VARCHAR2(10))
    INSERT INTO A1 VALUES ('1','2');
    INSERT INTO A2 VALUES ('3','4');
    COMMIT;
    CREATE INDEX A1_X1 ON A1(X1 );
    CREATE INDEX A1_X2 ON A1(X2);
    CREATE INDEX A2_X1 ON A2(X1);
    CREATE INDEX A2_X2 ON A2(X2);
    CREATE OR REPLACE VIEW A_ALL AS SELECT * FROM A1 UNION ALL SELECT * FROM A2;
    ANALYZE TABLE A1 COMPUTE STATISTICS;
    ANALYZE TABLE A2 COMPUTE STATISTICS;
    SELECT * FROM A_ALL;
    SELECT * FROM A_ALL WHERE (X1='1' AND X2='2') ;
    SELECT * FROM A_ALL WHERE ((X1='1' AND X2='2') OR (X1='3' AND X2='4'));
    The 2nd query returns answer while the second is not !
    The following is published in the 9.2.0.4 fixed bug list:
    " 9204 - 2679062 - Wrong results possible from multi-column INLIST "
    I have installed 9.2.0.4 patch set on a win 2000 machine Oracle and saw that the above case is actually solved but our application which has a very similar case doesn't.
    After investigating I found the following test case that fails, it reproduces only when you have index on all columns (covering index):
    drop table t1_1;
    drop table t1_2;
    create table t1_1(c1 number, c2 number, c3 number);
    create table t1_2(c1 number, c2 number, c3 number);
    create index t1_1_ix on t1_1(c1, c2, c3);
    create index t1_2_ix on t1_2(c1, c2, c3);
    create or replace view t1 as select * from t1_1 union all select * from t1_2;
    insert into t1_1 values(1, 2, 100);
    insert into t1_2 values(1, 2, 200);
    commit;
    analyze table t1_1 compute statistics;
    analyze table t1_2 compute statistics;
    prompt
    prompt #######################################
    prompt try 1 - works fine
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    ( (c2=2) and (c3=100)
    prompt
    prompt #######################################
    prompt try 2 - works fine
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    (c2=2) and (c3=200)
    prompt
    prompt #######################################
    prompt try 3 - try 1 OR try 2 does not work !
    prompt #######################################
    prompt
    select * from t1
    where
    (c1=1)
    and
    ( ( (c2=2) and (c3=100) )
    or
    ( (c2=2) and (c3=200) )
    opened a TAR and wanted to share with you.
    Tal Olier ([email protected]).

  • How can I get (using API) the current sort column for some report

    hello,
    How can I get (using API) the current sort column for some report ? For example something like "fsp_sort_1_desc" - if the user sorts by the first column ?
    I cannot use the :REQUEST for this, sometimes the current sort column is not in the :REQUEST, but it is still active.
    I thought it was posssible by using
    APEX_UTIL.GET_PREFERENCE (
    p_preference IN VARCHAR2 DEFAULT NULL,
    p_user IN VARCHAR2 DEFAULT V('USER'))
    RETURN VARCHAR2;
    function, but I don't really know which preference should I pass as parameter.
    looking in WWV_FLOW_PREFERENCES$, i saw preferences_names like FSP4000_P527_R6281510839654570_SORT , I'm not sure how this name is formed.
    I'm using generic columns for that complex report (which has a flexible number of columns shown), and the idea is that sometimes I have to overwrite that sort column, in case the user chose the version of the report with fewer columns than the previous one.
    Can I get (using API) a list of all preferences set for some user ?
    Thank you,

    seems that it is FSP<app_number>P<pagenumber>R<regionnumber>_SORT.
    is there anyplace where I can get these kind of things documented ?
    Thank you.

  • Sorry, something went wrong error when adding a calculated column

    Hi I tried add a column via calculation, and it seems to not be correct because I keep getting a syntax error.. Can anyone tell me why or where I went wrong?
    This is a dropdown box when a certain CIRCUIT TYPE is selected it would out put a calculation...
    56, 56SW, 56FR are using the same calculation
    DDS IDSL, ISDN TR, ISDN are using the same calculation
    HDSL, HDSL2, HDSL4 are using the same calculation
    Thank you... Here is the calculation below...
    =IF([Circuit Type]="ISDN",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*2.81)+(([F1 Makeup (24)]+[F1 bridge
    tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*2.03)+(([F1 Makeup (22)]+[F1 bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.42)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.84),
    IF([Circuit Type]="DDS IDSL",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*2.81)+(([F1 Makeup (24)]+[F1 bridge tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*2.03)+(([F1 Makeup (22)]+[F1
    bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.42)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.84), IF([Circuit Type]="ISDN T.R.",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2
    Makeup (26)]+[F2 bridge tap (26)])*2.81)+(([F1 Makeup (24)]+[F1 bridge tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*2.03)+(([F1 Makeup (22)]+[F1 bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.42)+(([F1
    Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.84), IF([Circuit Type]="56",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*2.45)+(([F1 Makeup (24)]+[F1 bridge
    tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*1.85)+(([F1 Makeup (22)]+[F1 bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.3)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.77),
    IF([Circuit Type]="56SW",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*2.45)+(([F1 Makeup (24)]+[F1 bridge tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*1.85)+(([F1 Makeup (22)]+[F1
    bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.3)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.77), IF([Circuit Type]="56FR",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2
    Makeup (26)]+[F2 bridge tap (26)])*2.45)+(([F1 Makeup (24)]+[F1 bridge tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*1.85)+(([F1 Makeup (22)]+[F1 bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.3)+(([F1
    Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.77), IF([Circuit Type]="19.2",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*1.73)+(([F1 Makeup (24)]+[F1 bridge
    tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*1.31)+(([F1 Makeup (22)]+[F1 bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*0.96)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.59),IF([Circuit
    Type]="DDS T.R.",(([F1 Makeup (26)]+[F1 bridge tap (26)]+[F2 Makeup (26)]+[F2 bridge tap (26)])*1.91)+(([F1 Makeup (24)]+[F1 bridge tap (24)]+[F2 Makeup (24)]+[F2 bridge tap (24)])*1.46)+(([F1 Makeup (22)]+[F1
    bridge tap (22)]+[F2 Makeup (22)]+[F2 bridge tap (22)])*1.08)+(([F1 Makeup (19)]+[F1 bridge tap (19)]+[F2 Makeup (19)]+[F2 bridge tap (19)])*0.64),IF([Circuit Type]="HDSL",(([F1 Makeup (26)]+[F2 Makeup (26)])*3.88+(([F1
    Makeup (24)]+[F2 Makeup (24)])*2.84)+(([F1 Makeup (22)]+[F2 Makeup (22)])*2.18)+(([F1 Makeup (19)]+[F2 Makeup (19)])*1.5)+(([Num of F1 BTs]+[Num of F2 BTs])*3)+[Num of F1 Guage changes (HDSL)]+[Num of F2 Guage changes (HDSL)]),
    IF([Circuit Type]="HDSL2",(([F1 Makeup (26)]+[F2 Makeup (26)])*3.88+(([F1 Makeup (24)]+[F2 Makeup (24)])*2.84)+(([F1 Makeup (22)]+[F2 Makeup (22)])*2.18)+(([F1 Makeup (19)]+[F2 Makeup (19)])*1.5)+(([Num of F1 BTs]+[Num
    of F2 BTs])*3)+[Num of F1 Guage changes (HDSL)]+[Num of F2 Guage changes (HDSL)]), IF([Circuit Type]="HDSL4",(([F1 Makeup (26)]+[F2 Makeup (26)])*3.88+(([F1 Makeup (24)]+[F2 Makeup (24)])*2.84)+(([F1 Makeup (22)]+[F2 Makeup
    (22)])*2.18)+(([F1 Makeup (19)]+[F2 Makeup (19)])*1.5)+(([Num of F1 BTs]+[Num of F2 BTs])*3)+[Num of F1 Guage changes (HDSL)]+[Num of F2 Guage changes (HDSL)]),0)))))))))))
     

    Two possible issues:
    Maximum formula length is 1024 characters, and you have nearly 4000.
    Maximum nesting is 7 or 8 levels.
    http://blog.pathtosharepoint.com/2010/04/12/maximum-number-of-if-statements-in-a-calculated-column/
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • Getting error message when adding on account payment in Outgoing Payments

    Hi,
    We are getting error message "No Matching records found 'Sales Tax Authorities Type' (OSTT) (ODBC - 2028) [ Message 131 - 183]" when we are trying to add account payment in Outgoing Payments. We are not getting any errors while adding customer payments or vendor payments. Please give us the solution. 
    Version : SAP 2007B SP:00 PL:00
    Thanks,
    Sravan Kumar Pothu

    Hi Jeyakanthan,
    Thanks for your immediate reply.
    Actually in outgoing payments there is no tax code selection available. Just we simply selecting the account on which we are making payment and amount( in payment means we are giving cheque details). When trying to add it is giving above said error. Kindly let me know if you have any solution.
    Thanks,
    Sravan Kumar Pothu

  • Why do i get "wrong password" when i try to log on to the wifi on my ipad 3?

    I have 2 laptops, 2 ipones (5 and 4s, running on ver 6.1.4), an ipad mini and an ipad 3 in my home.
    I'm using my wifi successfuly with every device except for my ipad 3.
    on the "wireless" tab, i can see the network, i'm trying to type the password but i keep on getting "wrong password".
    The ipad can use wifi in other places with passwords.
    I checked how im writing and tried to type again on other devices, that's not the problem. Its not a problem with capitals or o-0 or something like that.
    I've tried reseting the network settings,  reseting my router, reseting my ipad (pressing "off button" + "home button"). I've tried changing password on my router, without succuess.
    that is really annoing, you're paying a lot for something that's suppose to work perfectly, and you get problems like that.
    I really need wifi on my ipad, and I've searched forums all over the internet for a solution. it turnes out that a lot of people are experiencing the same problem, whitout a proper solution.
    please help

    Restore the iOS software.
    Transfer purchases into iTunea, backup your iPad, restore to factory settings, restore from the backup and sync with iTunes and then try again.
    iTunes: Restoring iOS software - Support - Apple

  • Getting no results when connecting to Oracle DB.

    Hello , I'm tryin to connect to an Oracle DB and I get no result excpet that the console prints the following :
    oracle.jdbc.driver.OracleDriver
    BUILD SUCCESSFUL (total time: 0 seconds)
    why so? here is my code :
    import java.sql.*;
    public class ListMovies {
    private static Connection getConnection()
        Connection con = null;
         try
            String driverName = "oracle.jdbc.driver.OracleDriver";
            Class.forName(driverName);
            String serverName = "172.16.100.120";
            String portNumber = "1521";
            String sid = "taddb";
            String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
            String user = "fundinfo";
            String pw = "tadapps";
            con = DriverManager.getConnection(url, user, pw);
         catch (ClassNotFoundException e) {
                                        System.out.println(e.getMessage());
                                        System.exit(0);
         catch (SQLException e) {
                                  System.out.println(e.getMessage());
                                  System.exit(0);
        return con;
        private static ResultSet getMovies() {
            Connection con = getConnection();
        try
             Statement stmt = con.createStatement();
             String select = "select title,year,price "+" from movie order by year";
             ResultSet rows;
             rows = stmt.executeQuery(select);
             return rows;
        catch(SQLException e) {
                 System.out.println(e.getMessage());
            return null;
               private static class Movie
                          public String title;
                          public int year;
                          public double price;
                       public Movie(String title,int year , double price)
                                    this.title = title;
                                    this.year = year;
                                    this.price = price;
                      private static Movie getMovie(ResultSet movies)
                                          try
                                             String title = movies.getString("title");
                                             int year = movies.getInt("year");
                                             double price = movies.getDouble("price");
                                             return new Movie(title,year,price);
                                              catch(SQLException e)
                                               System.out.println(e.getMessage());
                                          return null;
    public static void main (String [] args)
        ResultSet movies = getMovies();
           try
               while(movies.next())
                        Movie m = getMovie(movies);
                        String msg = Integer.toString(m.year);
                        msg += ": "+ m.title;
                        msg += Double.toString(m.price);
                        System.out.println(msg);
           catch(SQLException e)
               System.out.println(e.getMessage());
    }Thanks

    That message is comiong from this
         catch (ClassNotFoundException e) {
                                        System.out.println(e.getMessage());
                                        System.exit(0);
                                          }fix your classpath and provide much better error indicators.

  • Error:When adding RDC runtime library (Crystal report XI R2) to Lotus notes

    Background : We have reporting feature implemented in one of lotus notes application using crystal reports 6 (OCX) and as Crystal report is going to be upgraded to CR XI version in my organisation, we need to implement the same using RDC component available in crystal XI . we have installed Crytal report XI R2 - SP 6 version for testing the integration.
    we are  referring a document available on SAP web site(attached below) that illustrates the steps required to integrate the Crystal Reports®  Report Designer Component into a Lotus® Dominou2122 application.  http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/509b02de-a81e-2b10-f598-822b6d6f2024?quicklink=index&overridelayout=true
    Steps which have been outlined for adding runtime library in lotus domino application is shown below:-
    1. In Domino Designer, add a Form to the application.
    2. In the programmeru2019s pane, go to the (Declarations) handler of the Form and enter:
       Dim App As Variant,    Dim Rep As Variant
    3. Select Create | Object and select the u201CControlu201D radio button in the u201CCreate Objectu201D dialog box that comes up. From the list of controls, select u201CCrystal Report Viewer Control.u201D This adds the control to the Form.
    4. Click on the control and select Edit | Properties. In the u201CAppletu201D properties dialog, select the u201CSize object to fit windowu201D radio button and then close the properties dialog.
    We are getting an error message while trying to add 'Crystal Report Viewer Control' control (illustated in Step 3 above) in the lotus notes form . Error message which we get is 'An error has occured while processing a request on an object'.
    Alternatively , we created the object of Crystal Report Viewer on lotus notes form by adding viewer object file (Crviewer.dll) from the file system  after selecting the u201CObject from a fileu201D radio button in the u201CCreate Objectu201D dialog box and added following code in the postopen event of lotus notes form .
    Set m_Viewer = Source.GetObject("Crystal Report Viewer Control")
    Set App = CreateObject("CrystalRuntime.Application")
    Set Rep = App.OpenReport(u201Cc:lotus
    otes
    ep.rptu201D)
    Set m_Viewer.ReportSource = Rep
    Again, when lotus notes form is opened , it gives error 'Variant does not contain object' at 'Set m_Viewer.ReportSource = Rep' .
    Can any one suggest us any workaround or if iit is not possible in CR XI R2 into a Lotus® Dominou2122 application. Also, can any one provide us sample code if CR 2008 version can be integatred with lotus notes.

    I believe, Lotus was never a "supported" development platform, though it did work - at one time or another. Eventually it did not and you are at that point. I think it was CR 10 where it started to be impossible to add the viewer to Lotus. This was never fixed and we never did find out if this was a Lotus thing or a CR thing.
    Re. CR 2008 and Lotus. The RDC has been retired in CR 2008, so no luck there either for you. The only SDKs available in CR 2008 are for .NET and Java.
    Ludek

  • How to get user name as a calculated column in Analytic View or Calculation Graphical View?

    Hi Folks,
    I needed something like this. In the output, I needed a column which displays the SESSION USER who is seeing the results of the model.
    In Script , we can have something like this
    SELECT SESSION_USER FROM DUMMY
    How can I do the same using calculated columns in the model?
    Regards,
    Krishna Tangudu

    Hi Nick,
    Since you have said "Month Name", I am guessing you are interested in getting values such as "January", "February" and so on as opposed to 01, 02.... Is that right?
    If so, I don't think there exists a built-in function in HANA that could give you that. A calculated attribute with a case or if statement on the hard-coded descriptions (January, February...) for month values (01,02...) derived from the data column (BEZDT) is what I can think of.
    Thanks,
    Anooj

  • Retain field order on form when adding/deleting columns

    If I move my html around to change the layout of the fields on an AddForm.aspx and then I start adding and deleting columns, the ordering of the ff## changes and I can have problems. 
    Its fine if I've only added new columns...what I've done is create an AddForm1.aspx to get the fresh ff##'s at the end of the list.  I copy them over to my AddForm.aspx
    If I add and delete columns, then I can have problems.
    The ff## may be renumbered when making an AddForm1.aspx and copying the new fields might create an error because of dupe ff##'s.
    If I use AddForm1.aspx,  I lose my layout of the fields on my form AddForm.aspx.
    I have been successful finding the ordering of the columns on AddForm1 and renumbering on AddForm.
    But this is pain and error-prone.
    What do people do to get around this dilema?
    thx
    Rich

    Hi,
    By default, we can change the order at the Lists content type settings page.
    I suggest you provide more information about your requirement(screenshot) to make others easier to find a solution for you.
    More information:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/31a5030b-9494-4057-b4ad-485435fdceb0/sharepoint-designer-2010-reorder-fields-for-newform-edifform-viewform?forum=sharepointgeneralprevious
    http://kalsing.blogspot.com/2006/11/create-custom-list-form-for-sharepoint.html
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to Get checkbox value when List value changed in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    regards
    Ahmed

    Hi Ahmed,
    >
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    >
    You should not create checkboxes like this. Either use the APEX_ITEM.CHECKBOX2 API or change the Column Type to Simple Checkbox.
    >
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    >
    name="f01" returns an array, what you need is single element value.
    Try
    <script type="text/javascript>
    function test(pThis) {
      var f01_value = $v(pThis);
       alert('#SEQ : '+ f01_value);
    </script>
    {code}
    {quote}
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    {quote}
    Depends in how you are invoking/triggering the change event. Are you using DA or have you written an "onchange" event on the element?
    Cheers,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding Calculation Column in Physical layer

    Hi All,
    I have oppty fact table and product dimension table.
    I have to create calculation columns
    credit revenue = ( sum( opptyfact. Revenue where product. productgroup = “credit”))
    Debit revenue = (sum( opptyfact. Revenue where product. productgroup = “debit”))
    Brokarage Revenue = (sum( opptyfact. Revenue where product. productgroup = “Brokarage”))
    How can create this calculation column in meta physical layer ( i don't want create in BMM due to some reasons) using fact and dimension table.
    I am creating one phisical table and in Genaral tab i select Table Type as Select.
    i am thinking to write Case statment but i could not gey any idea how can i implement.
    could you please help me is it correct approch to write CASE statement ? is there any other way ?
    Please help me
    Thank you for your time

    Hi user10441472,
    You can use Madan's suggestion. Using it would imply that you change your physical table type to a SELECT. And the you need to emulate the code that he wrote. That is how you get logic implemented in your physical layer from the RPD side of things. Alternatively, you could create a database view to accomplish the business logic (case statements) and reference the view in the RPD physical layer instead of the source table.
    That being said, I would highly recommend against that kind of thing. It makes for a bit more confusing RPD.
    The natural place to put that is in the BMM layer. You mentioned you did not want to do that for several reasons. Could you list those reasons here?
    Best regards,
    -Joe

  • Auto-adjust references when adding rows/columns

    If I recall correctly, it was the behavior of Appleworks that if you added, say, column B, making the old column B into column C, all references to B throughout were automatically changed to C. This does not happen in Numbers. Is there any way to make this the default behavior or a different command to add rows/columns that causes references to automatically be adjusted accordingly?

    OK, this is going to make me sound really stupid, but I actually was so confused and tired that I meant the exact opposite of what I said. I was making a ledger-type spreadsheet keeping a running balance, and I wanted cells in the balance column to continue referring to the cell directly above them rather than to one absolute cell that used to be directly above them. That's how it works in Appleworks. I think.

Maybe you are looking for

  • Sync Center Issue in Windows 8.1

    I purchased a Sony Vaio Laptop Model SVT11125CNS with Windows 8 64 Bit Single User Pre-installed. Subsequently, I upgraded to Windows 8.1 with Freee Upgrade. Te con figuration of my Laptop is: Processor-Intel(R) Core (TM) i5-3317U CPU @ 1.7 GHz; RAM-

  • Which windows bit to use with parallels

    I'm a Newby, and I"m looking to use Parallels with my new Mac Pro 13" duo processor I7.  So, I need to get Parallels and was looking at a Windows 7 OEM disk.  Never have thought much about 32 or 64 bit, what's the difference and is one better then th

  • XML with BI

    Hi All, I want to access BW data through XML.Could anybody assist me to understand what all steps needs to be followed to access BW data using XML. We are on BW 3.5 and need to use XML to retrieve data from BW. Thanks for your help in advance. Regard

  • UNIX command to set time

    I'm looking for a UNIX command to set each client machine to use a network time server to obtain the correct time. Any help would be appreciated. Thank you.

  • Mail loading problem

    Hi all I've got this mail loading problem, whenever the mail is loading I always scroll down to read the text first but it always to back to the top, I scroll down again it scroll back up. this happen only during the images are loading. it is very an