Case statement Not working with Oracle version 10g

Below is code , which works on 11r2 but not on 10g.
declare
v1 VARCHAR2(200);
begin
select version into v1 from DBA_REGISTRY WHERE COMP_NAME LIKE '%Catalog Views%';
CASE
      WHEN v1 like '10.2%' THEN
DBMS_OUTPUT.PUT_LINE('it is  10.2');
dbms_streams_auth.grant_admin_privilege('GGADMIN');
      WHEN v1 like '11.1%' THEN
DBMS_OUTPUT.PUT_LINE('it is  11.1');
dbms_streams_auth.grant_admin_privilege('GGADMIN');
EXECUTE IMMEDIATE 'grant become user to GGADMIN';
      WHEN v1 like '11.2.0.3%' THEN
DBMS_OUTPUT.PUT_LINE('it is  11.2.0.3');
dbms_goldengate_auth.grant_admin_privilege('GGADMIN');
    END CASE;
end;
/I dont know when i run code in 10.2 it still looks for dbms_goldengate_auth
and error out.
dbms_goldengate_auth.grant_admin_privilege('GGADMIN');
ERROR at line 18:
ORA-06550: line 18, column 1:
PLS-00201: identifier 'DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE' must be declared
ORA-06550: line 18, column 1:
PL/SQL: Statement ignoredif I comment dbms_goldengate_auth it returns perfect result.
it is  10.2
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.03Is there any other way around ????
Edited by: 949509 on Jan 27, 2013 6:57 PM

949509 wrote:
Can you please tell me How i can execute dynamic sql via execute immediate.In a very simialr was as you did the grant of become user in your code. SOmething like:
declare
   v1          VARCHAR2(200);
   l_grant_str VARCHAR2(1000);
begin
   select version into v1 from DBA_REGISTRY WHERE COMP_NAME LIKE '%Catalog Views%';
   CASE
      WHEN v1 like '10.2%' THEN
         DBMS_OUTPUT.PUT_LINE('it is  10.2');
         l_grant_str := 'dbms_streams_auth.grant_admin_privilege(''GGADMIN]'')';
      WHEN v1 like '11.1%' THEN
         DBMS_OUTPUT.PUT_LINE('it is  11.1');
         l_grant_str := 'dbms_streams_auth.grant_admin_privilege(''GGADMIN'')';
         EXECUTE IMMEDIATE 'grant become user to GGADMIN';
      WHEN v1 like '11.2.0.3%' THEN
          DBMS_OUTPUT.PUT_LINE('it is  11.2.0.3');
         l_grant_str := 'dbms_goldengate_auth.grant_admin_privilege(''GGADMIN'')';
   END CASE;
   execute immediate l_grant_str;
end;John

Similar Messages

  • I downloaded Firefox 4 and tried to launch it. The message said that Firefox will not work with this version of Mac OX. Please advise.

    I downloaded Firefox 4 and installed it. When I tried to launch it, a message came up saying that Firefox will not work with this version of Mac OSX. Now I have no Firefox. How can I get Firefox 3.6 back on my Mac? How can I make Firefox 4.0 work? Please advise.

    Thanks for the reply so quickly! Is the tenfourfox going to be be just as safe and as high of quality as the Firefox 4? Also since Mozilla's website says, "Firefox 3.6.x will be maintained with security and stability updates for a short amount of time. All users are strongly encouraged to upgrade to Firefox 4" does that mean if I go back to 3.6 there will be security and stability issues after a "short amount of time"?

  • Does ORACLE functions work with Oracle Database 10G

    Hi,
    I am wondering if ORACLE functions work with Oracle Database 10G or is it mandatory to use OCI functions?
    Thanks in advance!

    I was able to run a simple query with ora_* functions using 10g on Windows.
    The Oracle OCI calls used by PHP's ora extension still exist in the Oracle 10g libraries
    But I cannot recommend this obsolete extension.
    -- cj

  • I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    You can get Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • When attempting launch of photoshopcc,I get a box with "could not load the MMX core routines module because it does not work with this version of PS... what does this mean and how do I correct it?

    when attempting launch of photoshopcc,I get a box with "could not load the MMX core routines module because it does not work with this version of PS... what does this mean and how do I correct it?

    I did a search on my system and found the Photoshop has a fastcore plug-in.  Creative Cloud includes a subscription version of CS6 version 13.1.2.   I do not know if you installed that or not.  The cc un-install may have done something.  You may need to use Adobe Cleaner then Install The Perpetual CS6 version of Photoshop  CS6 version 13.0.6 Mac or Photoshop  CS6 version 13.0.1.3 PC and not the subscription CS6 extended version 13.1.2.  Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6   If you need to download the CS6 installer Download CS6 products.
    You may also be able to recover your cs6 using an old system backup
    fastcore.8bx on my system...

  • Mail application will not work with latest version mac 4.5

    mail application will not work with latest version mac 4.5

    You can get Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Oracle 11g XE not working with oracle BI publisher 10g after enabling ACL

    Hello,
    I previously work with oracle 10gXE and Oracle BI publisher 10g and it work fine. now i install oracle 11g XE and try to configure it with oracle Bi Publlisher, it show this error
    "ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1324 ORA-12570: TNS:packet reader failure" after runing the ACL package to neable network service.
    on the database.
    Please can any body tell be why this is not working. Tanx.

    You'll need to add the apex engine owner to the ACL (Access Control List). Depending on your version of apex the user name varies. i.e. 4.0 is APEX_040000
    See Joel's blog for info about the ACL and APEX.
    [http://joelkallman.blogspot.com/2010/10/application-express-network-acls-and.html]

  • PreparedStatement not working with Oracle

    Hi All,
    I am using preparedStatement in my JDBC code to fetch/insert values from oracle9i database.
    I am checking condition like if a given record does not exist then insert it else update it.
    First time it works when there is no row in database, however for subsequent run it's not able to return me the result though that row exist in database and this resulting in DuplicateKeyException becuase it try to create the row in db again.
    The code is working fine for MySQL DB2 and SQLServer but doesn't work in case oracle 9i
    Here is mycode
    //problem is here 1st time it works next time it is not retunring true though record is there in DB.
    if(isItemExist("1","CORP"))
    updateItem("1","CORP","DESC1");
    else
    insertItem("1","CORP","DESC1");
    public boolean isItemExist(String itemid, String storeid)
    String FIND_SQL = "SELECT item_desc from item where item_id = ? and store_id = ? ";          
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    rs = ps.executeQuery();
    if(rs.next()){
         return true;
    utils.close(c, ps, rs);
    else{
         return false;
    utils.close(c, ps, rs);
    public void createItem(String itemid, String storeid, String item_desc)
    String INSERT_SQL = "INSERT INTO item(item_id,store_id,item_desc)values(?, ?, ?)";
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, itemid);
    ps.setString(i++, storeid);
    ps.setString(i++, item_desc);
    ps.executeUpdate();
    utils.close(c, ps, null);
    public void updateItem(String itemid, String storeid, String item_desc)
    String INSERT_SQL = "UPDATE item SET item_desc = ?, store_id=? WHERE item_id = ?";
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, item_desc);
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    ps.executeUpdate();
    utils.close(c, ps, null);
    Kindly suggest what's wrong with code. because same code works with other databse like SQL Server, MySQL but it is not working with oracle9i.

    if(isItemExist("1","CORP"))
    updateItem("1","CORP","DESC1");
    else
    insertItem("1","CORP","DESC1");
    String FIND_SQL = "SELECT item_desc from item where item_id = ? and store_id = ? ";
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    String INSERT_SQL = "INSERT INTO item(item_id,store_id,item_desc)values(?, ?, ?)";
    ps.setString(i++, itemid);
    ps.setString(i++, storeid);
    ps.setString(i++, item_desc);
    String INSERT_SQL = "UPDATE item SET item_desc = ?, store_id=? WHERE item_id = ?";
    ps.setString(i++, item_desc);
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);My first guess, looking at the above snippets, would be that the item_id field is a number and not a string and so you should be calling ps.setInt instead of ps.setString when setting that parameter.
    This is only a guess, however, since you have not posted what the actual error is, which will probably give a hint to what the actual error is.

  • IOS7 will not work with current version of iTunes

    My phone has had a recurring problem with the mic not working unless the phone was in speaker mode. I haven't bothered to update to iOS7 before now, but finally got annoyed with not being able to have a phone call in public, so I attempted to restore (which several posts on the topic recommended). Connected phone to iTunes, backed up, clicked "restore", got a pop-up saying that it couldn't restore the phone because I was still running iOS6.
    Figured, what the heck, iOS7 can't be that bad, decided to update. All the while, my phone was connected to my computer, which is running iTunes version 10.6.3. Not once did I get any sort of warning, notification, pop-up, anything letting me know that iOS7 was not compatible with this version of iTunes. Since my phone was pretty much out of memory, I actually deleted all of my music so that I could download the update, knowing that it would be able to be replaced as soon as the update was finished. Waited for the update to download and install, clicked "Sync" on my computer, there's my pop-up. Attempted to download iTunes 11, won't let me because my computer is still running Mac OSX 10.5, because I don't feel the need to buy a new laptop every 2 years.
    My computer was purchased (new) in '09, not even a full five years ago. I understand that Apple changes constantly, but the fact that I now have NO way to restore my phone, NO music, NO way to back my phone up without a wireless connection, is frankly a pile of crap. I can't even talk to tech support about this without paying $19 for an internet conversation because I purchased my phone 13 whole months ago.
    I've been a huge proponent of Apple ever since I got my computer. I've recommended them to countless friends because my computer has lasted five years without a single problem, no significant slow-down, etc. It's great to find out that the fact that Apple made such a great product is the same fact that's causing me to have to write this long, drawn out, very livid post that is essentially a giant plea of: short of getting a new computer (because um, no, I'm not doing what Apple wants and spending more money so that two products made by the same freaking company are compatible), how do I restore my phone and get my music back? I know that anything purchased on the iTunes store can be downloaded to my phone, but the vast majority was from CDs.

    cynecasey wrote:
    ... my computer is still running Mac OSX 10.5, because I don't feel the need to buy a new laptop every 2 years.
    You have written a very long story, and I admit I have skipped most of it.  But I think the question is you are on iOS 7, and cannot get the latest version of iTunes (11.1.5) on your computer because your OS X is too old.
    The fact that you chose not to update your hardware does not mean you could not update your software!
    OS X 10.5 is very old (about four years).  iTunes 11.1.5 (current version) requires at least OS X  10.6.8 to run.  Very likely, you could upgrade your computer's software to at least OS X 10.6.8 and then download the current iTunes on it.
    You would start here:
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Then you would update the OS X 10.6 to OS X 10.6.8 over the air, then download iTunes (or update to a later OS X, as the current version is 10.9.2).

  • Xml code not working with new version

    Hi,
    my following code is not working with the xalan 2.7.0 version. Any one can help to convert this to work on new version.
    import java.io.*;
    import java.util.*;
    import org.xml.sax.*;
    import org.apache.xalan.xslt.*;
    public class XML2Edifact
    public static void main(String args[])
    throws SAXException, IOException
    if(args.length < 3)
    throw new IllegalArgumentException(
    "Usage is XML2Edifact in.xml xsl.xsl out.edi");
    InputStream sin = new FileInputStream(args[0]),
    sxsl = new FileInputStream(args[1]);
    OutputStream sout = new FileOutputStream(args[2]);
    EdifactFormatter formatter = new EdifactFormatter(sout);
    XSLTProcessor processor =
    XSLTProcessorFactory.getProcessor();
    XSLTInputSource in = new XSLTInputSource(sin),
    xsl = new XSLTInputSource(sxsl);
    XSLTResultTarget out = new XSLTResultTarget(formatter);
    processor.process(in,xsl,out);
    }

    Solved, had to repair the Z10 with the PC!  Would have thought that upgrading software would have saved the environment so that this step was not needed (played with this for several weeks on-and-off).

  • MMXcore essentials does not work with this version of photoshop

    I am using photoshop essentials 12.
    It was working fine and all of a sudden I got an error
      Saying MMxcore essentials doesn't work with this
    version of Photoshop? I have job to finish and can't get into
    photoshop. Can anyone help me fix this remotely?
    thanks in advance

    Which operating system are you using?
    Did you copy/move any plugins from older photoshop elements versions to the pse 12 editor plugins folder?
    Did you point the Additional Plugins under Preferences>Plugins to an older version of photoshop elements?
    That MMXCore.plugin (mac) or MMXCore.8BX (windows) is an adobe plugin and only the version installed with pse 12, works with pse 12.
    Also see:
    https://helpx.adobe.com/photoshop/kb/error-could-load-fastcore-multiprocessor.html

  • Simple Pass Not Working with Chrome Version 42.0.2311.90 m

    SimplePass stopped working today.  I noticed a while ago that I no longer had to manually add the Website Logon extension anymore.  A small window popped up with a warning about using developer extensions and SimplePass worked.  Website Logon extension is enabled, but SimplePass isn't working.
    Does anyone know I can fix this?  Many thanks in advance.
    As a last resort, I have gone back to a previous restore point.  Now SimplePass is working.  However, I would still like resolution as I expect to encounter this problem again with other updates, etc.  Can someone tell me what Windows Update may have caused the problem so I can not apply that particular update?
    Thanks again.

    Hi @mellman ,
    Welcome to the HP Support Community! I hope you enjoy your time with us.
    I see that you are having a problem with SimplePass not working with Chrome. This has been a problem for a while now as Google Chrome made some changes about what extensions are available from their webstore and how they work.  You can try the steps in this HP Forums post to see if that fixes the issue for you.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • IPlanet J2EE application not working with oracle 9i but working with 7.3

    We are in a process of upgrading database from oracle 7.3 to 9i.
    We have a working application running on iPlanet Application Server with oracle 7.3 as database. We are using iPlanet Application Server's connection pooling. Our JDBC driver is classes111.zip.
    After upgrading to 9i, our application doesnt work. When I try to run a test application that uses single select statement, this the error I get: java.sql.SQLException: Invalid URL: Driver type not specified
    SQL*PLUS works fine. I havent upgraded oracle client. Do I need to upgrade the JDBC driver or oracle client?
    Any suggestions? iAS version is 6.5.

    If you are new to JSF, then I'd try and simplify the environment in which you are working as the first step to achieving a successful outcome.
    JSF 1.2 is a certified and well tested component of WLS, so we know it works. I'm not sure of the effect of all those additional modules you are adding in there -- it appears as if you have gotten a Faces implementation instantiated, but there could be some form of version difference/conflict since it can't find a method its looking for.
    Using Oracle Enterprise Pack for Eclipse (http://www.oracle.com/technology/software/products/oepe/oepe_11115.html) you can build yourself out a pretty simple JSF application to get started from and deploy it to a WLS server. This would remove all the additional libraries you currently have, provide you with a bundled applicaton to deploy and give you a pretty good environment from which you can learn and experiment with JSF.
    -steve-

  • MDX simple case statement not working?

    hi all - any idea what is wrong with this MDX statement? it is returning blank. I am trying to add a calculated measure using the below code but it is not working. thanks for the help.
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER = "Cash" THEN
    ([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END

    If you are checking for the 'Cash' member of the Account Name hierarchy, do you need to do something like this?
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER IS [Accounts].[Account Name].[Cash] THEN([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END
    Regards,
    MrHH

  • Case statement not working in rpd

    Hi Gurus,
    I am giving case statement for the exchange rate column#1 from original exchange rate column , the data of column is like
    0.0
    0.0
    0.1
    0.2
    1.2
    1.3
    1.4
    so here i dont want 0.0 instead of that i want 1.0 so whenever in next derived column i will calculate it would be this derived exchange rate#1 * inv amt = desired amt
    for the same I used different diff. case statement but still 0.0 is not going , I am giving like
    1) CASE WHEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" = 0.0 THEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" * 1.0 ELSE BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" END
    2) CASE WHEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" = 0.0 THEN 1.0 ELSE BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" END
    nothing is working , result remains same, any quick help would be apprciated
    Thanks,

    Once again, could you write all information, like I described here my example.
    When tried the same it works.
    TABLE.COLUMN1 is from dimension.
    TABLE.COLUMN1 is DOUBLE in the physical layer (in Oracle it is NUMBER(8,2)) and view/data gives:
    TABLE.COLUMN1
    12.99
    0.00
    0.20
    In the RPD I made new logical columns.
    EXPR:
    CASE WHEN "Presentation area".TABLE.COLUMN1 = 0.0 THEN 1.0 ELSE "Presentation area".TABLE.COLUMN1 END
    EXPR2:
    CASE WHEN "Presentation area".TABLE.COLUMN1 = 0 THEN 1 ELSE "Presentation area".TABLE.COLUMN1 END
    Test in Answers:
    COLUMN1----EXPR----EXPR2
    12.99---------12.99----12.99
    0.00-------------1.0--------1.0
    0.20------------0.20------0.20
    I leaved data format on the column properties as default (override default data format not checked).
    I don't see where is the problem.
    Regards
    Goran
    http://108obiee.blogspot.com

Maybe you are looking for