ORACLE QUEY PROBLEM

dear all,
i m trying following query to count the now of days within a month according to the hour worked in a day based on condition.
for determing it, i m using case statement.. but not working in oracle form builder...
select
  SUM(CASE WHEN NVL(MANNUAL_HOURS,HW)<3.5 THEN 0
           WHEN NVL(MANNUAL_HOURS,HW)>=3.5 AND NVL(MANNUAL_HOURS,HW)<7.5 THEN 0.5
           WHEN NVL(MANNUAL_HOURS,HW)>=7.5 THEN 1
           ELSE 0 END)
  INTO DAYS
  from tbltimeregister1
  where PAYCODE='G0000157' AND
  TO_CHAR(DATEOFFICE,'MON-YYYY')='MAR-2013';pl tell me how to correct it to achieve result.
m waitinng
with regards
vishal agrawall

Hello,
Use DECODE() instead of CASE.
Francois

Similar Messages

  • Oracle reports problem in distribution with xml file

    Hi ,
    I am having problem while I am trying to distribute the file with specifing the destination details in the xml. If I am giving the destination details in url then it is working.
    Ex.
    This is Working
    http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&desformat=pdf&destype=file&desname=devlopersuit/reports/output_file.pdf
    Not working :
    http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&DISTRIBUTE=YES&destination=devlopersuit/reports/dis_test.xml
    xml file
    <destinations>
    <file id="test" name="output_file.pdf" format="pdf">
    <include scr="mainSection"/>
    </file>
    </destinations>
    Error : REP-34304: Distribution failed to complete; review the distribution lists
    Its been week I tried many things , but not working.
    Right now I am trying to distribute to single file but my goal is to burst and distribute on basis of account number.
    This is the first stage of the project.
    Thanks a lot for the help
    Anju

    Hello
    see answer in Oracle reports problem in distribution with xml file
    Regards

  • Everyones Oracle Linux Problem solved!!!

    Everyones Oracle Linux Problem solved!!!
    Here's something Linux people should relate to: Use what works!
    what works?
    NT works! NT works great with 8i AND OAS.
    No hassles at all!
    Up and running within one day!!!!
    Guaranteed!
    U don't see a NT forum here with people having ridiculous install problems like Linux people?
    Perhaps Oracle should moderate this newsgroup and even give an authorative answer or two?
    null

    I have switched our development and soon production databases to Linux because it runs like a charm. Fast and efficient, no problems. The installer has been a problem no doubt because Oracle put less of an emphasis on debugging their Linux installer than their idiot-proof NT installer.
    By the way, I was able to circumvent installer problems by just linking svrmgrl to svrmgrlO; this avoided the dreaded segmentation fault and kicked everything open just fine.
    BTW, about NT; what makes an OS is not how well everything works when everything is going well, but how bad it gets when something goes bad. For instance, the segmentation faults on Linux weren't a problem because I just picked up and continued; on NT you'd have to restart the whole system...not a pleasant feature.
    null

  • Oracle Designer Problem Please help me

    Sir,
    1) I created a database
    2) Run>cd d:\Oracle_home\repadm61\admin\@ckqa
    @ckparams.txt
    @ ckvalqa
    @ ckcreate
    3)Opened Repository Administration Utility
    Log in as 'repos_manager/repos_manager@orcltest'
    Installed Repository.
    4) Opened Oracle 9i Designer. I am able to connect
    as 'repos_manager/repos_manager@orcltest'
    But I am not able to logon as any other user in same database/ any other user in different database. Why?
    Please help me.
    regards
    Mathew

    duplicate thread, see this one -> Re: Oracle Designer Problem Please help me

  • Oracle 10g to 11g Upgrade - Oracle Clusterware problem

    Oracle10g RAC (2 Nodes) RHEL 4 64bit
    Hi All,
    I have began the procedure for upgrading Oracle Clusterware to 11g. However, during the install OUI was giving me certain error messages like it couldn't transfer the OUI installlogs to node 2. Well, I kept pushing through the install and after I ran the last rootupgrade script on node 2 it gave me the following error:
    Checking the existence of nodeapps on this node
    Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/ops/opsctl/OPSCTLDriver (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Creating '/crs/home/install/paramfile.crs' with data used for CRS configuration
    Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/ops/opsctl/OPSCTLDriver (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Failed to retrieve VIP details
    Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/ops/opsctl/OPSCTLDriver (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Failed to retrieve VIP details
    Setting CRS configuration values in /crs/home/install/paramfile.crs
    So I ignored the error for the time being and after that I checked the status of crs and it gave me the following:
    [oracle@vtl-rac2 crsd]$ crsstatus
    HA Resource Target State
    ora.VMRACDEV.VMRACDEV1.inst ONLINE ONLINE on vtl-rac1
    ora.VMRACDEV.VMRACDEV2.inst ONLINE ONLINE on vtl-rac2
    ora.VMRACDEV.db ONLINE ONLINE on vtl-rac1
    ora.vtl-rac1.ASM1.asm ONLINE ONLINE on vtl-rac1
    ora.vtl-rac1.LISTENER_VTL-RAC1.lsnr ONLINE ONLINE on vtl-rac1
    ora.vtl-rac1.gsd ONLINE ONLINE on vtl-rac1
    ora.vtl-rac1.ons ONLINE OFFLINE
    ora.vtl-rac1.vip ONLINE ONLINE on vtl-rac1
    ora.vtl-rac2.ASM2.asm ONLINE ONLINE on vtl-rac2
    ora.vtl-rac2.LISTENER_VTL-RAC2.lsnr ONLINE ONLINE on vtl-rac2
    ora.vtl-rac2.gsd ONLINE ONLINE on vtl-rac2
    ora.vtl-rac2.ons ONLINE OFFLINE
    ora.vtl-rac2.vip ONLINE ONLINE on vtl-rac2
    So i tried to bring it back up by doing a crs_stop -all and crs_start -all and it gave me the following error:
    vtl-rac1 : CRS-1019: Resource ora.vtl-rac2.ons (application) cannot run on vtl-rac1
    Start of `ora.vtl-rac1.ons` on member `vtl-rac1` failed.
    vtl-rac2 : CRS-1019: Resource ora.vtl-rac1.ons (application) cannot run on vtl-rac2
    CRS-0223: Resource 'ora.VMRACDEV.db' has placement error.
    CRS-0215: Could not start resource 'ora.vtl-rac1.ons'.
    CRS-0215: Could not start resource 'ora.vtl-rac2.ons'.
    I am thinking that all of this is caused by the various issues I had with the install. If I am incorrect, then please let me know. If it is true, I would like to know if there are any 11g docs on how to clean up a failed clusterware upgrade. Any advice would be greatly appreciated on any of the situations I am having.
    Thank you

    Hi Chandra,
    Did CVU report any problems before the upgrade?No, there were no errors reported by CVU before the upgrade.
    I don't there is note out there for cleaning 11g CRS
    install...and I think can very use the 10g CRS note -
    239998.1.Yeah I might have to go that way.
    I have both the 11g CRS install and upgrade from 10g
    to 11CRS at
    http://chandradba.blogspot.com/2007/08/oracle-11g-rac-
    install-on-red-hat-50.html
    and
    http://chandradba.blogspot.com/2008/02/oracle-10g-crs-
    upgrade-to-11g-crs.html
    see if it helps.Yup, your guide is very simple, clear and error proof :) That's how mine when pretty much except right around 75% I started getting these strange errors of files not being able to be transferred to node 2. Anyways, it shouldn't be a problem as none of those errors were configuration related...or else I would have a messed up cluster.
    Well, I actually rebooted both machines and now the whole CRS stack is up!! So I guess I am ok. We'll just have to wait and see.
    Thanks for your help Chandra...I always appreciate it.

  • Oracle Installation Problem on Windows 2000

    Dears
    I have the Windows 2000 Advance Server and Windows 2000 Professional. I install the Oracle8 on Windows 2000 Advance Server and Windows 2000 Professional. I have a lot of problems while i install. If i install it successfully after two or three days it gives me some errors. like it give errors the services. It could not start the Instance.
    If i upgrade the NT 4.0 to Windows 2000 which is also an ORACLE server. It upgrade the OS but not upgrade the Registory. It have the same problem
    Please tell me is the Oracle 8.0.4 is compatible with Windows 2000 Advance Server and Windows 2000 Professional or not.
    Please Please.
    Yours
    Muhammad Munir
    [email protected]
    null

    This resolved my problem as well. I am on Windows 2000 server, SP2. The problem installing Oracle 8.1.7.0.0 standard edition exhibited itself by briefly changing the cursor to an hourglass and then returning to ready. The executable JREW.EXE would briefly execute in processes and then stop.
    I copied the installation media to a server drive and renamed symcjit.dll and the installer worked correctly.
    Thank you to Yugandhar for this solution.
    We too faced some of those problems ie setup.exe wont even run in Windows XP pro, p4 system..the culprit is symcjit.dll. Its the problem in p4 to run this dll. After lot of research, just rename it and all is set to go.
    regards
    Yugandhar

  • Oracle Listener Problem

    I am having a problem starting the Oracle Listener after a system crash on Windows NT.
    However, if I first connect to the internet and then try to restart, everything works ok.
    Why should I have to connect to the internet with my laptop in order to start the Oracle Listener?
    The message I am getting is as follows.
    C:\WINNT\Profiles\timh\Desktop>net start OracleStartORCL
    The OracleStartORCL service is starting..........
    The OracleStartORCL service was started successfully.
    C:\WINNT\Profiles\timh\Desktop>net start OracleTNSListener80
    The OracleTNSListener80 service is starting.
    The OracleTNSListener80 service could not be started.
    A system error has occurred.
    System error 1067 has occurred.
    The process terminated unexpectedly.
    null

    some more info.
    Given below is the output of status. does anything look bad or am I doing something wrong?
    for the service"abcd" it says has two instances, one of the status is unknown. does that matter is it always like that or I am asking very dumb questions?
    Please excuse me if that is the case.
    C:\lsnrctl status
    LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 23-JUL-2007 14:54:28
    Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=servername)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Produc
    tion
    Start Date 23-JUL-2007 10:27:09
    Uptime 0 days 4 hr. 27 min. 19 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File D:\oracle\ora92\network\admin\listener.ora
    Listener Log File D:\oracle\ora92\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=2100))(Presentation=FTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "abcd" has 2 instance(s).
    Instance "abcd", status UNKNOWN, has 1 handler(s) for this service...
    Instance "abcd", status READY, has 1 handler(s) for this service...
    Service "abcdXDB" has 1 instance(s).
    Instance "abcd", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • Oracle driver problem

    Hello,
    I'm currently trying to install the Jive forum application on the WAS. The installation itself went very well, but I have a problem with the initial setup.
    At a certain point I have to give the DB driver class and the according connection string.
    I have a oracle DB installed for this and was using the following driver class:
    oracle.jdbc.driver.OracleDriver
    As error jive setup gives me :
    Unable to load database driver 'oracle.jdbc.driver.OracleDriver' - make sure it is in your appserver's classpath.
    I have deployed the classes12.jar as described in
    http://help.sap.com/saphelp_nw04/helpdata/en/80/4f34c587f05048adee640f4c346417/frameset.htm
    This also did not solve my problem.
    Does somebody has some experience  with this?
    Thanks a lot!
    Regards,
    Peter

    Hi,
    how likely is it that your DB connect code produces the problem ? Did you try this question on the database forum ?
    Frank

  • Oracle report problem-Passing a column value from a query block to another

    Hi I am facing a problem in oracle reports.
    I have 3 query blocks say Q1,Q2 and Q3.
    From Q1 I get a tblkey coulmn and for each value of tblkey I need to pass it on to Q2 which gives me a status and now finally Q3 will take tblkey and status to give me final output.
    Can somebody please tell me how I can do it?
    Thanks,
    Avin

    Depending on your report requirement, you may do a join of Q1, Q2, and Q3; or keep all Qs and for Q3 use subqueries ...
    Select ... from ... where tblkey, status in (
    select tblkey, status from ... where tblkey in (
    select tblkey from .... where .... ) )
    Good luck.
    DC

  • Crystal Report Oracle Logon Problem

    Hi,
    We are using Webforms for launching the reports.  When we tried to launch the reports system is prompting for logon information.  It states "The report you requested requires further information." followed by text box having Server Name,  Database Name, User Name, Password and use integrated security(checkbox). 
    We are using Oracle backend for connecting the database.  Crystal Report RPT is designed using the OLEDB ADO (Database Type) and the provider is u201CMSDAORAu201D. 
    The same report is working fine when the Internet service manager identity is set as u201CLocal Systemu201D reported problem occurs when the identity is set as u201CNetwork Serviceu201D.  How to over come this issue.
    Crystal Version : Crystal Reports 2008 is installed
    Operating System : Windows server 2003 standard edition
    Oracle Version : Oracle 11g
    Please Note : Report is fetching data from the crystal report designer in the preview.  There is no problem in oracle connectivity.
    Code is available below
    rpt.Load(@"D:\report\totaldetails_sub_sp_oracle.rpt");
    CrystalDecisions.CrystalReports.Engine.Database crDb;
    CrystalDecisions.CrystalReports.Engine.Tables crTables;
    CrystalDecisions.CrystalReports.Engine.Table crTable;
    TableLogOnInfo crTableLogOnInfo;
    ConnectionInfo crConnInfo;
    crDb = rpt.Database;
    crTables = crDb.Tables;
    crConnInfo = new CrystalDecisions.Shared.ConnectionInfo();
    crConnInfo.ServerName = "< Oracle Service Name>";
    crConnInfo.DatabaseName = "";
    crConnInfo.UserID = "<Oralce User Name>";
    crConnInfo.Password = "<Oracle Password>";
    for (int i = 0; i < crTables.Count; i++)
             crTable = crTables<i>;
    crTableLogOnInfo = crTable.LogOnInfo;
    crTableLogOnInfo.ConnectionInfo = crConnInfo;
    crTable.ApplyLogOnInfo(crTableLogOnInfo);
    CrViewer.ReportSource = rpt;

    Thanks a lot for replies ...
    To use oracle client 32 bit on the x64 server may be a problem for the next times. And my project leader don't want to change oracle client version (x64). So I try to change my reports connections to ODBC type.
    Now, I want to ask another question:
    Firstly, I will test these changes on 32 bit. Later, I test it on 64 bit.
    My report are created on Crystal reports 10, 32 bit. I change the connection type by using "Set Datasource Location" menu. I test this ODBC connection with my report on 32 bit platform. I can see the records on the Crystal Reports when I refresh my report. This is OKEY. ODBC connection is success on 32 bit.
    But, in my project (this is an web application, and it is working 32 bit and 64 bit successfully), I can't see the records. I debuggged my project on 32 bit with Visual Studio. For this, I put some breakpoints on to the specific places. I watch that two records are taken from database. Everything is good. But when "reports.aspx" file opens, these records don't appear. Before changing connection type , this records were listed in my project on 32 bit.
    For this, have you any ideas ?
    Thanks ...

  • Oracle 11g - Problem in referring ROWNUM in the SQL

    Hello All,
    We are facing a strange problem with Oracle 11g (11.2.0.1.0).
    When we issue a query which refers the rownum, it returns a invalid record ( which is not exists in the table).
    The same sql is working fine once we analyze the table
    Note: The same sql is working fine with oracle 10g (Before analyze also).
    The script to reproduce the issue:
    DROP TABLE BusinessEntities;
    CREATE TABLE BusinessEntities
    business_entity_id VARCHAR2(25) PRIMARY KEY,
    business_entity_name VARCHAR2(50) NOT NULL ,
    owner_id VARCHAR2(25) ,
    statutory_detail_id NUMBER ,
    address_id NUMBER NOT NULL
    DROP TABLE BusEntityRoles;
    CREATE TABLE BusEntityRoles
    business_entity_id VARCHAR2(25) NOT NULL,
    role_id VARCHAR2(10) NOT NULL,
    PRIMARY KEY (business_entity_id, role_id)
    INSERT
    INTO businessentities ( business_entity_id , business_entity_name, owner_id , statutory_detail_id , address_id)
    VALUES
    ( 'OWNER', 'OWNER Corporation Ltd', NULL , 1, 1 );
    INSERT
    INTO businessentities ( business_entity_id , business_entity_name, owner_id , statutory_detail_id , address_id)
    VALUES
    ( 'ALL_IN_ALL', 'ALL IN ALL Corporation Ltd', 'OWNER' , 2, 2 );
    INSERT INTO busentityroles(business_entity_id, role_id) VALUES ('TEST' , 'OWNER');
    INSERT INTO busentityroles (business_entity_id,role_id) VALUES ('TEST','VENDOR');
    INSERT INTO busentityroles(business_entity_id, role_id) VALUES ('ALL_IN_ALL' , 'VENDOR');
    SELECT *
    FROM
    (SELECT raw_sql_.business_entity_id, raw_sql_.business_entity_name, raw_sql_.owner_id, raw_sql_.address_id,
    rownum raw_rnum_
    FROM
    (SELECT *
    FROM BusinessEntities
    WHERE (business_entity_id IN
    (SELECT business_entity_id
    FROM BusinessEntities
    WHERE business_entity_id = 'OWNER'
    OR owner_id = 'ALL_IN_ALL'
    AND business_entity_id NOT IN
    (SELECT business_entity_id FROM BusEntityRoles
    ORDER BY business_entity_id ASC
    ) raw_sql_
    WHERE rownum <= 5
    WHERE raw_rnum_ > 0;
    OUTPUT Before Analyzing
    BUSINESS_ENTITY_ID: OWNER
    BUSINESS_ENTITY_NAME: NULL
    OWNER_ID: OWNER
    ADDRESS_ID: NULL
    RAW_RNUM_: 1
    Note: There is no record in the table with the value business_entity_id as 'OWNER' and OWNER_ID as 'OWNER' and the address_id as NULL
    OUTPUT : After analyzed the table Using the below mentioned command
    ANALYZE TABLE "BUSENTITYSUPPLYCHAINROLES" ESTIMATE STATISTICS
    ANALYZE TABLE "BUSINESSENTITIES" ESTIMATE STATISTICS
    BUSINESS_ENTITY_ID: OWNER
    BUSINESS_ENTITY_NAME: OWNER Corporation Ltd
    OWNER_ID: NULL
    ADDRESS_ID: 1
    RAW_RNUM_: 1
    Any clue why Oracle 11g is behaving like this.

    Hi,
    it's a good practice to give aliases for tables, as well as name query blocks. Here it is (and formatted for convinience):
    select --/*+ gather_plan_statistics optimizer_features_enable('10.2.0.4') */
      from (select /*+ qb_name(v2) */
                   raw_sql_.business_entity_id
                  ,raw_sql_.business_entity_name
                  ,raw_sql_.owner_id
                  ,raw_sql_.address_id
                  ,rownum raw_rnum_
              from (select /*+ qb_name(v1) */ *
                      from businessentities b1
                     where (b1.business_entity_id in
                           (select /*+ qb_name(in) */ b2.business_entity_id
                               from businessentities b2
                              where business_entity_id = 'OWNER'
                                 or owner_id = 'ALL_IN_ALL'
                                and business_entity_id not in
                                   (select /*+ qb_name(not_in) */ r.business_entity_id from busentityroles r)))
                     order by business_entity_id asc) raw_sql_
             where rownum <= 5)
    where raw_rnum_ > 0;You are facing some bug - definitely - and, possibly, it is caused by [join elimination|http://optimizermagic.blogspot.com/2008/06/why-are-some-of-tables-in-my-query.html]. As a workaround you should rewrite the query to eliminate unnecessary join manually; or you may include a hint to not eliminate join (it's not documented):
    SQL>
    select -- /*+ gather_plan_statistics optimizer_features_enable('10.2.0.4') */
      from (select /*+ qb_name(v2)  */
                   raw_sql_.business_entity_id
                  ,raw_sql_.business_entity_name
                  ,raw_sql_.owner_id
                  ,raw_sql_.address_id
                  ,rownum raw_rnum_
              from (select /*+ qb_name(v1) no_eliminate_join(b1) */ *
                      from businessentities b1
                     where (b1.business_entity_id in
                           (select /*+ qb_name(in) */ b2.business_entity_id
                               from businessentities b2
                              where business_entity_id = 'OWNER'
                                 or owner_id = 'ALL_IN_ALL'
                                and business_entity_id not in
                                   (select /*+ qb_name(not_in) */ r.business_entity_id from busentityroles r)))
                     order by business_entity_id asc) raw_sql_
             where rownum <= 5)
    20   where raw_rnum_ > 0;
    BUSINESS_ENTITY_ID        BUSINESS_ENTITY_NAME                               OWNER_ID                  ADDRESS_ID  RAW_RNUM_
    OWNER                     OWNER Corporation Ltd                                                                 1          1Strange thing is executing a transformed query gives correct result too:
    SELECT "from$_subquery$_001"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
           "from$_subquery$_001"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
           "from$_subquery$_001"."OWNER_ID" "OWNER_ID",
           "from$_subquery$_001"."ADDRESS_ID" "ADDRESS_ID",
           "from$_subquery$_001"."RAW_RNUM_" "RAW_RNUM_"
      FROM  (SELECT /*+ QB_NAME ("V2") */
                    "RAW_SQL_"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
                    "RAW_SQL_"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
                    "RAW_SQL_"."OWNER_ID" "OWNER_ID","RAW_SQL_"."ADDRESS_ID" "ADDRESS_ID",
                    ROWNUM "RAW_RNUM_"
               FROM  (SELECT /*+ QB_NAME ("V1") */
                            "SYS_ALIAS_1"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
                            "SYS_ALIAS_1"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
                            "SYS_ALIAS_1"."OWNER_ID" "OWNER_ID",
                            "SYS_ALIAS_1"."STATUTORY_DETAIL_ID" "STATUTORY_DETAIL_ID",
                            "SYS_ALIAS_1"."ADDRESS_ID" "ADDRESS_ID"
                       FROM "TIM"."BUSINESSENTITIES" "SYS_ALIAS_1"
                      WHERE ("SYS_ALIAS_1"."BUSINESS_ENTITY_ID"='OWNER'
                          OR "SYS_ALIAS_1"."OWNER_ID"='ALL_IN_ALL' AND  NOT
                             EXISTS (SELECT /*+ QB_NAME ("NOT_IN") */ 0
                                       FROM "TIM"."BUSENTITYROLES" "R"
                                      WHERE "R"."BUSINESS_ENTITY_ID"="SYS_ALIAS_1"."BUSINESS_ENTITY_ID")
                      ORDER BY "SYS_ALIAS_1"."BUSINESS_ENTITY_ID") "RAW_SQL_"
             WHERE ROWNUM<=5) "from$_subquery$_001"
    26   WHERE "from$_subquery$_001"."RAW_RNUM_">0
    27  /
    BUSINESS_ENTITY_ID        BUSINESS_ENTITY_NAME                               OWNER_ID                  ADDRESS_ID  RAW_RNUM_
    OWNER                     OWNER Corporation Ltd                                                                 1          1

  • Sun Web Server 6.1 Insert into Oracle Database problem

    Hello there,
    I'm using Sun Java Studio Creator 2004Q2 Update 7, and trying to deploy to Sun ONE Web Server 6.1 SP3 without much luck.
    I am trying to use ojdbc14.jar and have included it in a lib directory added to Native Lib Path Prefix.
    DataSource Classname oracle.jdbc.pool.OracleDataSource
    URL jdbc:oracle:thin:@myserver:1521:myinstance
    JNDI Name jdbc/HBC
    In the constructor I have:
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                abcRowSet.setDataSourceName("java:comp/env/jdbc/HBC");
                abcRowSet.setCommand("SELECT ALL ABC.TT.XX, ABC.TT.YY, ABC.TT.ZZ FROM ABC.TT");
                abcRowSet.setConcurrency(java.sql.ResultSet.CONCUR_UPDATABLE);
            } catch (Exception e) {
                log("TestEntry Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
             try {
                 abcRowSet.execute();
                 abcRowSet.next();
             } catch (Exception ex) {
    Then in the submit button action I have:
            try {
              abcRowSet.moveToInsertRow();
              abcRowSet.updateString("XX",fieldXX.getValue().toString());
              abcRowSet.updateString("YY",fieldYY.getValue().toString());
              abcRowSet.updateString("ZZ",fieldZZ.getValue().toString());
              abcRowSet.insertRow();
              abcRowSet.moveToCurrentRow();
              abcRowSet.commit();
            } catch (SQLException se) {
                error("ERROR SQLException: " + se);
                log("LOG SQLException: " + se);
                try {
                    abcRowSet.rollback();
                } catch (SQLException se2) {
                    log("ROLLBACK SQLException: " + se2);
    When I run this I get:
            [25/Apr/2005:20:32:41] info ( 2652): for host 127.0.0.1 trying to POST /hbc/faces/TestEntry.jsp,
            service-j2ee reports: WEB2798: [/hbc] ServletContext.log(): LOG SQLException:
            java.sql.SQLException: Invalid operation for read only resultset: moveToInsertRowAlternatively (1) I have tried to have automatically generated rave connection pool / jdbc resources and copying over the driveradapter.jar but as we know that version is locked for embedded applications only (since Creator only includes the AppServer PE's driveradapter which cannot be deployed on WebServers).
    Alternatively (2) I have tried manually setting up the connection pool / jdbc resources and copying over the smutil.jar / smoracle.jar / smbase.jar but it complains about java.lang.ClassNotFoundException: com.sun.sql.jdbc.oracle.OracleDriver
    Is there a pain-free way to get Creator to play with Web Server 6.1 nicely? I seem to either run into Oracle THIN JDBC problems (main code above) or otherwise running into situations where Creator and Web Server 6.1 doesn't like each other (alternative 1 and 2).
    Thanks for your input
    Regards
    Thomson K

    Hi there, sorry for the trouble. I found the following thread:
    http://forum.java.sun.com/thread.jspa?forumID=48&threadID=417560
    I am using Oracle 8, I had followed the instructions in that thread and still get the error.. but you can ignore this thread for now I will pursue this in the other thread. Sorry for taking your time.

  • Oracle Installation Problem on MacBook Pro with OS X

    Im trying to install Oracle database 10g on my MacBook Pro with the latest OS version. At first I was a bit confused on which of the links I should download, so I downloaded the client release 1, it was a 300mb aprox download. When the download was over I couldnt run any of the files on my Mac, maybe its because they only run on Mac OS Server? maybe i got the wrong link?
    FORGOT TO READ FIRST... SEEMS LIKE A COMMUN PROBLEM. SORRY
    Message was edited by:
    user575116

    AirPlay Mirroring requires a second-generation Apple TV or later, OS X 10.8 or better and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). You can see which Mac you have and which operating system you are using by selecting 'About this Mac' from the Apple menu in the top left corner of your Mac and selecting the 'More Info' button.

  • Oracle Developer problem

    Hi,
    I downloaded and installed the developer suite 10.1.2. When I launched Forms builder I received the message, 'Oracle Forms Designer has encountered a problem and needs to close. The error report said it was in the uiw.dll module. I uninstalled and tried to install it again and got the same error. I then downloaded and installed the 9.0 version. I received the message for the uiw90.dll module. I am running Oracle 11g, on a Windows XP SP3 environment.
    Has anyone encountered this error before and have a solution to it?
    Thanks,
    Marshal

    Please start by reading this:
    http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
    Then please explain what you are asking. Proceed further with what?
    Information about Forms and how to use it can be found in the product documentation libraray and various white papers available here:
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    Designtime information about LOV (list of values, visual attributes, and other objects) are explained in the Forms Builder Online help

  • Oracle procedure problem

    I'm doing a final year project through oracle and java with a bit of pl/sql also. i have recently come across a problem and was wonderiing if any one could help me to resolve it. I need to know if it is possible to develop a webpage through using html in pl\sql to get information to send to and from the database or would it have to be done purely

    thank you ill try and get that book. just another question i have done out a sample table and a sample procedure both are fine but how can i execute the procedure in sql plus in order to to bring up the webpage that displays the table. very confused. have tried run, execute but no joy.

Maybe you are looking for

  • Mock RFP for SUN network management tool, desperate 4 help, just need specs

    OK, I have a project that in essence is a mock Request for Proposal (RFP), I play as an intern, & our instructor roleplays the manager we need to convince. The different network management tools that were available were for example; HP Openview, Cisc

  • Podcasts require 2nd Sync to Copy Correctly

    iphone 5, latest version of itunes on win7 Since around Oct/Nov 2013 i've had an issue where I will have to perform a sync TWICE on my machine in order to get podcasts to correctly copy over to my phone.  I've since rebuilt my computer and the issue

  • Numbered captions incorrect in Table of Contents

    Hi, I am working on a book project and have a page – let's call it the "image page" – with eight images with manually typed descriptions below each. These descriptions sit in Static Captions. The captions also have a sequential numbering (1, 2, 3, 4,

  • PEI in VB notbeing detected by DynamicLoads

    Using PT5.0.2 (.NET)I am trying to use OnAfterLogin method. I created a VB project (Template - Class Library) for this purpose. Wrote the code. I added the appropriate namespace in LoginActions.xml.Namespace - com.companyname.companyLoginPEI.pei.Clas

  • Could not use the spot healing brush because of an internal error!

    Hi All. I have been trying out the Photoshop CC trial and all is well but all of a sudden I have been getting the "could not use the spot healing brush because of an internal error" message when I'm using the healing brush rapidly! I'm sending the ti