Oracle sql developer and  oracle express

I am new in PL/SQL
I just wonder for run the pl/sql , why has the different result for two tools
for the following example I get out put on the express
Employee 145 commission .4 which is High
Statement processed.
on sql developer I get
anonymous block completed why???
DECLARE
  n_pct employees.commission_pct%TYPE;
  v_eval VARCHAR2(10);
  n_emp_id employees.employee_id%TYPE := 145;
BEGIN
  -- get commission percentage
  SELECT commission_pct
  INTO n_pct
  FROM employees
  WHERE employee_id = n_emp_id;
  -- evalutate commission percentage
  CASE n_pct
  WHEN 0 THEN
    v_eval := 'N/A';
  WHEN 0.1 THEN
    v_eval := 'Low';
  WHEN 0.4 THEN
    v_eval := 'High';
  ELSE
    v_eval := 'Fair';
  END CASE;
  -- print commission evaluation
  DBMS_OUTPUT.PUT_LINE('Employee ' || n_emp_id || ' commission ' || TO_CHAR(n_pct) || ' which is ' || v_eval);
END;
/

Hjava wrote:
I just wonder for run the pl/sql , why has the different result for two tools
for the following example I get out put on the express
Employee 145 commission .4 which is High
Statement processed.
on sql developer I get
anonymous block completed why???Nothing to do with the database or PL/SQL.
The client makes the call (e.g. passing the PL/SQL anon block to the server to be parsed and executed).
This is successful. The server returns a zero return code to that client call. This means successful completion of that database call.
The client can now choose to display any message it wants to inform the user of that - from "+hey dude, it worked!+" to "+command completed successfully+" or whatever.
The database does not return a message string in response to that call - only a return code. What the client can do is make another call and request the associated message from the client driver for that return code. In this case, an English language message file (as queried by the driver) will return the message string, "+normal, successful completion+".

Similar Messages

  • Oracle SQL Developer and Application Express

    Hi all,
    I have a SQL Developer 1.5.4.59.40 and have an application developed in Application Express 10G XE with APEX 3.1.2. I have successfully opened my schema which owns an application, but to my surprise there is no node for viewing my application????? How can i view my application?
    With Regards,
    Sunil Bhatia - Programmer
    Eon Technologies Pvt Ltd
    Edited by: Sunil Bhatia on Mar 26, 2009 9:39 AM

    Hello,
    If you go to your parsing scheme in SQL Developer for ex. SCOTT you'll see a node Application Express.
    That should list all the applications that have the SCOTT parsing scheme defined in your APEX application.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • Oracle SQL Developer vs Oracle SQL Developer Migration Workbench

    Gurus,
    Can anybody let me know what's the difference between Oracle SQL Developer vs Oracle SQL Developer Migration Workbench tools.
    I am in the process of Migrating MS-Access Application to APEX. So the example says me to use Oracle SQL Developer Migration Workbench. Is this part of Oracle SQL Developer? If yes, I know SQL Developer is free.
    If not is Oracle SQL Developer Migration Workbench if free?
    Thanks and Regards

    Thank Oracle ;)
    (well, it's the least they can do after you paid big $$$ for the database)
    Regards,
    K.

  • Error oracle.sql.* and oracle.jdbc.driver.* not found when using oracle as a database

    I am using oracle as database and weblogic 4.5. I have copied the classes12.zip file in lib directory of weblogic. I am getting the error that oracle.sql.* and oracle.jdbc.driver.* not found when i am importing these packages in a jsp file. what i need to do to import oracle driver packages?I put it in the classpath also.
    Please Advice!
    Thanks in advance
    AnuPama

    Hi Anupama,
    First of all I would be surprised if you would not like to use the connection pooling feature of weblogic (in which case you might not be needing the import the classes directly), and would like to open direct connections to your database. Anyways for doing that I would recommend you to check out the readme doc that ships
    along with the jdbc oracle (classes12.zip etc). I am giving an excerpt over here:
    These are a few simple things that you should do in your JDBC program:
    1. Import the necessary JDBC classes in your programs that use JDBC.
    For example:
    import java.sql.*;
    import java.math.*;
    2. Register the Oracle driver before before calling other JDBC APIs.
    (This is not needed if you are using the JDBC Server-side Internal
    Driver because registration is done automatically in the server.)
    To register the Oracle driver, make sure the following statement
    is executed at least once in your Java session:
    DriverManager.registerDriver(
    new oracle.jdbc.driver.OracleDriver());
    3. Open a connection to the database with the getConnection call.
    Different connection URLs should be used for different JDBC
    drivers. The following examples demonstrate the different URLs.
    For the JDBC OCI8 Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:oci8:@<database>",
    "scott", "tiger");
    where <database> is either an entry in tnsnames.ora or a SQL*net
    name-value pair.
    For the JDBC Thin Driver, or Server-side Thin Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@<database>",
    "scott", "tiger");
    where <database> is either a string of the form
    <host>:<port>:<sid> or a SQL*net name-value pair.
    For the JDBC Server-side Internal Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:kprb:");
    Note that the trailing ':' character is necessary. When you use
    the Server-side Internal Driver, you always connect to the
    database you are executing in. You can also do this:
    Connection conn
    = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    Hope this helps,
    Thanks,
    Anupama wrote:
    I am using oracle as database and weblogic 4.5. I have copied the classes12.zip file in lib directory of weblogic. I am getting the error that oracle.sql.* and oracle.jdbc.driver.* not found when i am importing these packages in a jsp file. what i need to do to import oracle driver packages?I put it in the classpath also.
    Please Advice!
    Thanks in advance
    AnuPama--
    Apurb Kumar

  • Oracle sql developer and access db

    Hi All,
    I have connection to oracle and Access dbs’ on my oracle sql developer.
    When i try to create a database link from oracle db to access db i have to add Host Name.
    Connection details to access looks like this :
    @jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\ list.mdb;DriverID=22;READONLY=false}
    I tried different variants, but it doesn’t work.
    Is this possible to create database link to access db, and if yes, what i have to add for a host name and what is the syntaxes for cross table ?
    Thank you

    Good documentation here... http://www.orafaq.com/node/60
    TimS

  • Oracle SQL Developer and Errors (Line Number Incorrect)

    First, I wanted to state that Oracle SQL Developer 2 is a standout job.
    I wanted to report, though, that when Oracle SQL Developer 2 can't compile a block of code or a simple SQL statement has invalid syntax, it does not have an option to accurately go to the line of code in question. GOING TO the erroneous line of code doesn't need to be a feature, but often times the line no. REPORTED by Oracle SQL Developer is incorrect by 50+ lines.
    Is this something I could fix on my end? I have five other developers griping about this.
    Thank you!

    I don't know if this is the situation you are talking about, but line numbers for errors in SQL in a SQL Worksheet are not line numbers within the statement but rather line numbers in the worksheet. For example, with the following SQL in the worksheet:
    select * from dual;
    select * from dual;
    select * from dual;
    select from dual;Running the "select from dual;" statement (as either statement based on cursor position, selected statement or as script), the error is reported on Line 4, Column 7. As I show line numbers (Tools | Preferences | Code Editor | Line Gutter | Show Line Numbers), this makes sense. Without line numbers showing or having the option to go to the error and with more realistic examples with SQL statements scrolling off the page, I can see that the line number in the errors wouldn't be helpful.
    I think -K- is talking about the PL/SQL code editors not reporting the correct line number based on the error line not counting the "create or replace" line at the start of a package (and more for triggers).
    theFurryOne

  • ORACLE SQL DEVELOPER and SQLPLUS

    How can I run the sqlplus command inside of ORACLE SQL DEVELOPER?
    Whe I try to run show SGA command , I get "SQLPLUs command skipped"

    jung1975,
    I have SQL Developer version 1.0.0.14 installed on my PC.
    Under the "Tools" menu, there is a "SQL*Plus" item.
    However, you need to have access to the "SQL*Plus" executable.
    Since my database server is on a different machine (to my PC), that means I need to have Oracle Client also installed on my PC.
    Good Luck,
    Avi.

  • Oracle.sql.BLOB and oracle.sql.STRUCT

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

  • SQL Developer and Oracle Database 10g Express Edition, Connection Problem

    I am using SQL Developer version 1.2.1 and am connecting to a 10g database on a windows xp.
    Up until today there have been no problems with the connection. When I tried to connect to the database and have not been able to.
    The error states that "...listener refused the connection with the following error: ORA-12505, TNS; listener does not currently know of SID given in connect descriptor..."
    Also tried to log into the database home page but page doesn't load...

    I'd bet the database is down.
    Try a login through sqlplus ("Run SQL Command Line" in the Oracle Express Edition 'Start' menu).
    Do a CONN / AS SYSDBA
    If you get a message about database or memory area not available, try STARTUP.
    If that doesn't work, you are best off in the General Database forum or the Express Edition forum.
    You'll probably get the most expert response in General Database, but the Express Edition forum can be gentler on newbies (as it is more accepted that questioners are not and do not have access to full-time DBAs).

  • Added jTDS as third party DB connector to Oracle SQL Developer and connecti

    I have followed the directions for adding a third party db connector to SQL Developer however as soon as I do the connection manager form doesn't come up for both adding a new connection and editing an exisitng one. I have posted here as I am having issues finsing information or getting help through Oracle forums.

    Two things:
    1 - Confirm you got the jTDS we recommend from here http://www.oracle.com/technetwork/database/migration/omwb-getstarted-093461.html#conf
    2 - Confirm you added the entry in the preferences and pointed to the actual JAR file, not just the directory

  • Oracle SQL Developer and commit

    I have the auto commit in SQL Worksheet unchecked and disconnect a worksheet with open transaction and the data is commited !!
    I have to set another option??
    When I close the SQL Developer no questions if I'm sure to close or i want to perform a commit (like toad).
    Thanks.

    you may want to try this forum:
    SQL Developer

  • Oracle SQL Developer Connection Help

    Hi,
    I'm a complete Oracle newbie, so please bear with me. I've been doing research on protein clustering and at my lab the SQL developer has been running queries that I can then do statistics on. I have the query that I need to run, and was told to download Oracle SQL Developer and Oracle Client.
    I was also given a username and password, a hostname, a port and a SID. I'm a bit confused, do I still need to install Oracle Client? And if so, I can't quite find what it is on the website? I have SQL Developer installed but when I click connect I get:
    "Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection"
    I'm pretty computer literate outside the world of databases so if someone can offer some explanations and guidance, it would be appreciated!
    Thanks!

    933874 wrote:
    Hi,
    I'm a complete Oracle newbie, so please bear with me. I've been doing research on protein clustering and at my lab the SQL developer has been running queries that I can then do statistics on. I have the query that I need to run, and was told to download Oracle SQL Developer and Oracle Client.
    I was also given a username and password, a hostname, a port and a SID. I'm a bit confused, do I still need to install Oracle Client? And if so, I can't quite find what it is on the website? I have SQL Developer installed but when I click connect I get:
    "Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection"
    I'm pretty computer literate outside the world of databases so if someone can offer some explanations and guidance, it would be appreciated!
    Thanks!If you have SQL Developer installed & need to connect to some Oracle DB,
    then you do NOT need Oracle client.
    FWIW - SQL Developer is written in Java & uses JDBC (thin) to connect to the DB
    Is the DB Server on a subnet local to your system?

  • Oracle SQL Developer Installation Help (Basics?)

    Hello
    So im taking a class (student here, totally new to this) in Oracle SQL right now and trying to download the Oracle SQL Developer tool onto my desktop (v 2.1.1).
    Im just starting up Oracle SQL Developer and its asking, or I am looking to create a connection.
    I was wondering if anyone had a tutorial for how to make a connection?
    I only have Oracle SQL developer installed on my machine right now, nothing else. I dont have a server or anything, and just wanted to run this on my desktop local machine to practice running some SQL.
    Is there anything else i need to install?
    Is there some basic username and password that would allow me to connect to my local machine?
    What values do i need for the hostname, port and SID etc?
    Any help for a new student to Oracle would be greatly appreciated.

    You'd need a database to connect the SQL Developer client to.
    The easiest / quickest if you're a student would be the Express Edition.
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    Pick your platform and away you go.
    Your hostname will then be 127.0.0.1, SID will be XE .... username and password will depend on what you choose when you're installing (you should get prompted for SYS/SYSTEM passwords).

  • Bug in Oracle SQL Developer

    I had Oracle SQL Developer 1.5.0.53 and when I did a "Check for Update" it said no updates found, even though SQL Developer 1.5.1 was released on June 9, 2008. So obviously this is a bug you need to fix.
    OK - So I downloaded the latest Oracle SQL Developer and installed it and when I opened it up, all my connections were gone!!!
    That's another bug you need to fix.

    See Does check for updates install 1.5.1 for some suggestions for Check for Update.
    For installing 1.5.1 and then losing your connections, did you install in a new directory or over the top of 1.5.0? If yes, then reinstall again into a new directory. If not, did migrate your settings from 1.5.0? Without doing that 1.5.1 won't find your existing connections.
    theFurryOne

  • Help how to connecting Oracle SQL Developer 3.0  with Oracle Database 11g

    Hello,
    I'm new in oracle developer yesterday i setup in my laptop database 11g the last version (11.2.0.1.0), well i follow steps still i got succeed to install, and i got my local host URL and i test my user name and password work very well, my problem now is i try to connect database 11g using Oracle SQL Developer 3.0 (3.0.04.34) but always filed and with my little experience i don't know where the wrong. as i said i test database after finish install is work fine the my URL is https://Ahmed-HP:1158/em and i test my username and password that i already set before is enter normal in my local database, please i need help to know how i connect database with Oracle SQL Developer 3.0 (3.0.04.34).
    Thanks,

    885173 wrote:
    EdStevens, thanks for your quick answer, sorry for my explain was doesn't clear, i open oracle sql developer and choose new connection i set connection name system_orcl username:system password:*i set my password that i create when i setup database*
    -Now the link that i got after finish install database is https://Ahmed-HP:1158/em so i have question about this point Hostname and port if the link to access database is this https://Ahmed-HP:1158/em so this mean i typing at Hostname:localhost and port:1158 ?
    because the message when i test connection always is filed and I'm sure i typing username and password and SID:orcl as i set when install database.port 1158 is what the dbcontrol (Oracle Enterprise Manager) is listening on. OEM is NOT the database. As far as the database is concerned, OEM is "just another client".
    Actually, the database doesn't listen for requests on any port. There is another process, the "listener" that listens for requests to connect to the database. Typically, it listens on port 1521. You should have a tnsnames.ora file set up to resolve a connection request to the correct host. You can read more on this at http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/

Maybe you are looking for

  • Developer Certificate

    Good afternoon, I am researching how to set up and configure about 30 different Apple devices in my network.  From my research, I have found that the method I believe I am going use, is using a Mac Mini with OS X Server, and utilizing the Configurato

  • Ichat and other apps doesnt launch in jaguar 10.2.8

    hi, I'll just keep it plain and simple ichat doesnt launch, address book doesnt launch, sherlock doesnt launch and ical doesnt lanch. i'm going crazy over here!!!!! heeeeeeeeeeeeeeeeeeellllp!!!!

  • Step-by-step: how to install OID

    Folks: Can you please explain me step-by-step of how to install OID. I'm using Oracle DB 10gR1. I can't install AS10gR2 because I can't configure OID. Thanks a lot. hewjang

  • SAP HANA Modules

    Hi Experts, I am into SAP ABAP from past 4 Years and want to learn SAP HANA. I have just checked there are 4 modules in SAP HANA. 1.) SAP HANA data Modelling AND Implementation 2.) Programming 3.) BW on HANA 4.) Administration I want to switch from p

  • Standard Extractor for Sales Overview report

    Hi Experts, Can you all please help me in finding the Standard Extractor for Sales Overview Report, fields like Product Group, Product, Net Sales, Billed Qty, Sales Plan, % Variance Plan etc are present in this report, i tried to search this in trans