Host variables in SQL Developer not showing decimal places

I'm a very newbie, taking my first PL/SQL class, so please be gentle! I think this may be a SQL Developer problem, because when I run the same thing from terminal-line SQLplus on my Linux install, it works right.
I'm working with a procedure, and passing a value out to a host variable. Although the value should have a decimal portion, when I print the host variable, all that prints is the integer portion.
Here's the entire program:
set serveroutput on;
create or replace package mypkg
is
  procedure myproc
    (p_in in number,
     p_out out number);
end;--END package mypkg
create or replace package body mypkg
is
  procedure myproc
    (p_in in number,
     p_out out number)
  is
    lv_out_num number(7,2);
  begin
    lv_out_num := p_in / 10.0;
    p_out := lv_out_num;
    dbms_output.put_line('p_out is ' || to_char(p_out,'999.99' ));
  end;--END procedure myproc
end;--END package body mypkg
variable myvar number
execute mypkg.myproc(33,:myvar);
print :myvarAnd here's the output:
PACKAGE mypkg compiled
PACKAGE BODY mypkg compiled
anonymous block completed
p_out is    3.30
MYVAR
3As you can see, myvar should be 3.3, but it only shows 3. However, like I said above, when I do this from sqlplus from a terminal in linux, it works fine. Thus I'm thinking its a SQL Developer thing.
Details:
Machine:
HP Pavilion dv6 notebook (Core i7) with 8 GB RAM
Windows side:
Windows 7 Home Premium SP1
Oracle 10g Express
SQL Developer 3.1.06
Linux side:
Oracle Linux 5.6 (in Virtualbox)
Oracle 11g release 1
Thanks,
Alex

Hi,
This issue has been previously reported on and bugged:
Re: Oracle Sql Developer prblem with variable format
Regards,
Gary

Similar Messages

  • SQL developer not showing compiler warnings

    I'm just testing out the new compiler warning contained in 11g related to the "when others" exception handler when it does not have a subsequent raise or raise_application_error.
    in SQL plus, this works fine:
    SQL> alter session set plsql_warnings='enable:all';
    Session altered.
    SQL>
    SQL> create or replace function do_stuff
      2  return number
      3  as
      4     v_return number;
      5  begin
      6
      7     v_return := 3;
      8     return v_return;
      9
    10  exception
    11  when others then
    12     return null;
    13  end;
    14  /
    SP2-0806: Function created with compilation warnings
    SQL> show errors;
    Errors for FUNCTION DO_STUFF:
    LINE/COL ERROR
    1/1      PLW-05018: unit DO_STUFF omitted optional AUTHID clause; default
             value DEFINER used
    11/6     PLW-06009: procedure "DO_STUFF" OTHERS handler does not end in
             RAISE or RAISE_APPLICATION_ERRORbut in SQL developer the output is:
    BANNER                                                                          
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production    
    PL/SQL Release 11.2.0.3.0 - Production                                          
    CORE     11.2.0.3.0     Production                                                        
    TNS for Linux: Version 11.2.0.3.0 - Production                                  
    NLSRTL Version 11.2.0.3.0 - Production                                          
    session SET altered.
    FUNCTION do_stuff compiled
    No Errors.Anyone experience this issue? is there some setting that makes SQL developer behave differently?

    it must be something I'm doing wrong, above, I was running under windows 7 pointing at the version above.
    I just tried it under an Enterprise Linux pointing at
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production          
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production                                                        
    TNS for Linux: Version 11.2.0.2.0 - Production                                  
    NLSRTL Version 11.2.0.2.0 - Production                                           and I get exactly the same script output and no compiler window....
    actually...... if I go into a procedure window from the schema browser and compile it there, then I get the correct warning messages..... the problem is I mostly develop from .sql files extracted from source control rather than directly from the schema browser, I just want the sql worksheet to be able to show me the same compiler log window.....

  • Sql developer not showing table/view names

    I just set up a new machine, the database settings are same as in the old machine. But I cannot see the table/view names when expending the "+" sign before Tables or Views. When using "select * from tab", the result of all tables/views returns correctly. Is there any other settings I missed?
    I'm using Oracle Database 10g Express Edition, and Oracle SQL Developer 1.5.5.

    The same issue exists in 2.1.1.64.39
    All of a sudden: list of tables empty, views still viewable,tables are still there though.
    In the logging window I get ora-904 messages on sys.o.name
    Sybrand Bakker
    Senior Oracle DBA

  • SQL Report not showing data - available in SQL Workshop and SQL Developer

    I am having an issue with developing a SQL Report in APEX 3.2.1. I run the code in both SQL developer and SQL Workshop and I get data pulled back (both against my development environment). When I run the same code in a SQL Report region, it returns no data available. Does anyone have any idea what would be causing this? Other regions on the page accessing different tables in the same schema return data without issue. Any help would be appreciated.
    Thanks
    Freddie

    Could you explain the last comment a bit more. Here is a bit more info just in case I touch on the info with it. The db schema is BPAMGR, the Workspace is BPAMGR. We use the same schema for all of our reporting. All of our tables are in the same schema. We don't use any tables outside of this schema. Our APEX workspace has been associated to only this schema. The tables are able to be queried by SQL Workshop in the same APEX instance that the report application is under.
    Freddie

  • Sql Developer not connecting to Oracle 11g

    hi all
    i have
    windows 7 ultimate 64bit
    Oracle 11g 64bit
    Sql Developer 3
    on same machine i have created Tow Database on 11g :
    ORCL
    ORCL2
    when it was ORCL only everything was Okay
    but recently i have created another database ORACL2
    then it stop connecting with database through SQL DEveloper
    shows error;
    IO Error: the network adapter could not establish the connection
    On commnad prompt
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=AStix-PC)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    32-bit Windows Error: 61: Unknown error
    LSNRCTL>
    LSNRCTL> start
    Starting tnslsnr: please wait...
    Service OracleOraDb11g_home1TNSListener already running.
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    How to resolve this issue
    please help me out
    thanks to all

    884559 wrote:
    Have you fixed this issue?
    i m having same problem,i tried so mamy things but i was not able to fix it,
    so i uninstalled oracle and reinstalled it so it startd working fine,
    but agin after 10-15 days this problem started.
    from sqlplus i m able to connect but not using any other 3rd party IDE.
    i have also installed one instant client.
    Thanksno dear yet it's not fixed
    i have focused my mind on my work instead of R & D
    which is unexpected .. that ..no body is here for help...
    thanks

  • SQL Developer not fetching data tables while writting query

    HI , I have recently started using SQL developer 2.1, the problem i face is that SQL DEVELOPER is not showing the tables names while writting the query, we have more than 5000 tables and each table name cannot be remembered.
    Thanks
    Essa

    I'm using the Mac version of SQL Developer (Version 2.1.1.64 | Build MAIN-64.45) and I'm having similar problems. I'm currently using OS X Snow Leopard.
    The issue does not happen consistently: If I start writing an anonymous block in a new SQL window, the Completion Insight features works well. I can start typing a name of a package (of which there are many in our db) and I'm quickly provided a list matching what I've typed so far. This is also true of variables, functions and procedures within the packages after I type a period following the package name.
    However, if I open an existing package body and start editing, the Completion Insight feature becomes less reliable. If I move my cursor to the beginning of the main block of one of the package body's internal procedures, Completion Insight works. As I move down the package and try to insert new code, Completion Insight stops working. I should note that this package body I'm working with has no errors and compiles fine. I'm not sure what this indicates...whether it's an issue with the editors internal parser or some other issue.
    I'm not sure the best method for starting SQL Developer via the console window on the Mac. I found the following sh file which does launch it from terminal:
    /Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh
    This does launch the application. As I navigate around and follow the instructions you had given (including ctrl-space) I see no output generated out to the console (errors or other messages).
    I'm happy to assist in further debugging. Having Completion Insight work consistently will certainly increase my productivity with the tool.
    Thanks in advance for any help you may provide.

  • Oracle SQL developer 11g shows the error

    While am trying to connect sql developer in 11g it shows like this
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    *32-bit Windows Error: 2: No such file or directory*
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SKS)(PORT=1521)))
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    *32-bit Windows Error: 1001: Unknown error*
    LSNRCTL>
    Pls help me what to do?..Am new...

    Welcome to the forum.
    You can easily look up the error messages in the Oracle Online Documentation @ http://www.oracle.com/pls/db112/homepage
    Just enter the error code, and you'll get the cause and action, for example:
    TNS-12545: Connect failed because target host or object does not exist
    Cause: The address specified is not valid, or the program being connected to does not exist.
    Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect parameter is the node name. Ensure that the executable for the server exists (perhaps "oracle" is missing.) If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the host name to a numeric IP address and try again.
    It looks like you'll have to edit your tnsnames.ora, and also check if your listener is running.

  • SQL Developer not only reading tnsnames.ora

    Hello,
    I have found a very odd behaviour in SQL Developer 1.2 (running on Windows 2000):
    I have set TNS_ADMIN to point to a directory on a network drive residing on a Linux host. In this directory there were many backup files of tnsnames.ora created over time whose names followed the pattern tnsnames.ora.<timestamp> or tnsnames.bak or something similar. In SQL Developer in the "New database connection" dialog many TNS-entries showed up multiple times in the "Network alias" listbox. Only after removing all those backup files from the directory the behaviour of SQL Developer was correct and every entry only showed up once. I also found out that even when I moved the backup files to a new directory "tnsnames.bak" under the directory which TNS_ADMIN points to the entries showed up multiple times. After I renamed this directory to bak.tnsnames the behaviour was again correct. In my opinion SQL Developer should only read the file called tnsnames.ora and ignore all other files or directories with similar names.
    Kind regards,
    Christof Breker

    Various users reported this before.
    Maybe others use multiple files, but at least there should be the option to read just this one.
    Regards,
    Kristof

  • Bind variables in SQL Developer

    I declared a bind variable called 'test_num' and assigned a value of 10 as shown below.
    variable test_num number
    BEGIN
    :test_num := 10;
    dbms_output.put_line ('The Test Value: ' || :test_num);
    END;
    When I execute the above program, the output is thrown as 'The Test Value: '. The value of test_num is not shown. I fear whether this issue is due to SQL Developer which i am using to execute this program.
    Please let me know why the value is not getting printed
    Thanks for your help!

    I see the same issue you are seeing when using the bind variable. The bind variable works fine in SQL*Plus but not from SQL Developer.
    From SQLPlus*
    SQL> set serveroutput on
    SQL> variable test_num number
    SQL> BEGIN
    2 :test_num := 10;
    3 dbms_output.put_line ('The Test Value: ' || :test_num);
    4 END;
    5 /
    The Test Value: 10
    PL/SQL procedure successfully completed.
    From SQLDeveloper*
    set serveroutput on
    variable test_num number
    BEGIN
    :test_num := 10;
    dbms_output.put_line ('The Test Value: ' || :test_num);
    END;
    anonymous block completed
    The Test Value:

  • Sql Developer not connecting to the DB

    Hi
    I have latest Oracle Sql Developer 3.2.1 installed, and I cannot connect to database Oracle 11g Enterprise Edition.. I typed correct SID, port number, user and password and it won't connect saying: "The Network Adapter could not establish the connection. Vendor code: 17002"
    Strangely I am able to ping and telnet to the Database machine with the DB port
    ping <hostname> got reply
    telnet <hostname> <port> got connected.
    The TNS Listener of the Database is up as I am able to connect to the DB from another computer.
    Do we need to setup anything extra to connect to a DB?
    Thanks in advance

    Hi,
    Item 4 in the following relies on my Windows 7 environment variables. Did you also try...
    1. lsnrctl status
    2. lsnrctl services
    3. tnsping <tnsalias>
    4. sqlplus sys/<pswd>@//%COMPUTERNAME%:<port>/<sid>.%USERDNSDOMAIN% as sysdba
    The syntax in (4) requires specification of the SERVICE_NAME rather than the SID.
    My fully qualified SERVICE_NAME happens to be <sid>.%USERDNSDOMAIN%
    My fully qualified hostname is %COMPUTERNAME%.%USERDNSDOMAIN%, but %COMPUTERNAME% also works for me.
    See if using the literal values of these variables in the SQL Developer connection definition helps.
    Regards,
    Gary
    SQL Developer Team

  • Sql developer - not able to establish connection

    I have installed sql developer 3.2.2 and now I am trying to establish a connection with the database 'orcl' which I just created. But it is giving me a 'socket read timed out error' with vendor code 504. Please help. Thanks in advance.

    The output from 'lsnrctl status' is -
    C:\Users\Bits>lsnrctl status
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-OCT-2013 22:59
    :55
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date                11-OCT-2013 10:18:43
    Uptime                    0 days 12 hr. 41 min. 38 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\Oracle\Bits\product\11.2.0\dbhome_1\network\admin\l
    istener.ora
    Listener Log File         c:\oracle\bits\diag\tnslsnr\Bits-PC\listener\alert\log
    .xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully.
    The output for 'tnsping orcl' is -
    C:\Users\Bits>tnsping orcl
    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-OCT-2
    013 23:04:28
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    Used parameter files:
    C:\Oracle\Bits\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
    t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (0 msec)
    The windows firewall is not working on my computer. Is that causing this issue?

  • Some SQL fields not showing data in Crystal XI R2

    I have a report that is using a stored procedure.  In this stored procedure we have many fields that are being passed over to Crystal.  A small portion of these fields do not show any data when you browse them in Crystal.  But when you check on the SQL Server 2005 side, they contain data.  So we know that the issue is probably on the Crystal side because there is data on the SQL side.
    I originally thought that the problem may be caused by Null values in the database, but I used Crystal to convert the Null's to numeric zero if it was a number, and still there was no data showing up.
    Also in the stored procedure, we are passing 2 parameters a start and end date.   But that seems irrelevent to why some of the fields are not containing data like they should.
    Why would some fields show no values at all, and some fields shows values? 
    Any ideas on how to correct this situation so data will show up for all the fields like they are suppose too?
    Thanks everyone for their help!

    Hi Levi,
    Pleaase check the following :
    1. Other than storedprocedure are you adding any tables to your report ? If so, check the links between your stored procedure.(Through Database Expert)
    2.Write the following formula to find out whether the database fields contains values or not.
    if isnull() or = " " Then
    "This Field is Empty"
    Else
    Drag and dwop this formula in your report to get the field values.
    Thanks,
    Sastry

  • SQL Developer not starting - new installation

    I installed Oracle 11g on Windows 8, and am having problems with SQL developer starting. I have tried to debug but not a clue what I am looking for. I really could use some help. It is a 64 bit installation - and seems to be OK as I can connect to the DB in SQL plus. Thanks a lot!
    From a self-help perspective, did the following after looking at some threads:
    Ran sqldeveloper.exe and the output I got is:
    C:\app\kmalik\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\kmalik\AppData\Roaming
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=KMMAC
    ComSpec=C:\Windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\kmalik
    LOCALAPPDATA=C:\Users\kmalik\AppData\Local
    LOGONSERVER=\\KMMAC
    NUMBER_OF_PROCESSORS=1
    OS=Windows_NT
    Path=C:\app\kmalik\product\11.2.0\dbhome_1\bin;C:\Program Files (x86)\Parallels\
    Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\
    Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web
    Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v
    1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Pro
    gram Files\Microsoft SQL Server\110\Tools\Binn\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3a09
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\kmalik\AppData\Local\Temp
    TMP=C:\Users\kmalik\AppData\Local\Temp
    USERDOMAIN=KMMAC
    USERDOMAIN_ROAMINGPROFILE=KMMAC
    USERNAME=kmalik
    USERPROFILE=C:\Users\kmalik
    VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools
    windir=C:\Windows
    Ran: java -version on the same command prompt and got
    'java' is not recognized as an internal or external command, operable program or batch file.

    And also note the following similar thread:
    java.exe Requirement to run SQL Developer?

  • SQL Developer not accepting certain characters from the keyboard

    Hello,
    I have been using SQL Developer for 5 or 6 months now, with minor issues and great satisfaction.
    A few days ago, just out of the blue, in the middle of the day, SQL developer started not accepting the following characters:
    Ctrlv, Ctrl + c, F5, F9 (I Think all function keys), BackSpace, Delete, Enter and arrow keys.+*
    T*his is only happening in the text editor part*. I am able to use this keys in the results, whether they were a script output or an execute query output.
    SQL developer also functions properly (if i paste using the mouse, paste works.. and all the other keys)
    I checked the pc for viruses, using AVG, no viruses were found (my avg is updated daily and runs daily virus checks on a schedule, and this issue has been here for the past 1 or 2 weeks, so it was a virus, i think it should have been discoverd, besides, the keys are still working in sql developer, only not in the text editor part)
    Needless to say, but if i run notepad and type, keys work properly.
    I also reinstalled it in another folder with no luck
    Tried so many restarts .. no luck
    Tried it in safe mode .. no luck
    I am using SQL developer Version 1.5.4, Build MAIN-5940.. on Windows Xp
    I am suspecting there's some option in it that I disabled without paying attention..
    HELP!!!
    Regards,
    Charles

    All that time trying possible solutions is understandable, but then typing them in your post... when searching the forum would have given you the solution under 1 minute:
    Preferences - Accelerators - Load Preset - Default
    Hope that helps,
    K.

  • Oracle SQL Developer (Not seeing object names within the interface)

    Hello,
    I was finally able to perform an export/import from our production environment to our training environment. Anyway, this was done using the SYS account and for some reason, I have an issue where in Oracle SQL Developer, there are no object names being displayed, but the objects do exist within SQLPLUS if I should query the table.
    The following error message displays when I refresh any of the objects folders within SQL Developer:
    ORA-00942: table or view does not exist
    Any ideas would be greatly appreciated.
    Thank you.

    825084 wrote:
    I'm pretty new to the Oracle DBA space but not to SQL Server Ah. The first thing you need to do is check everything you think you know about rdbms at the door. The similarity between SQL Server and Oracle ends right after SELECT * FROM EMP.
    Even the term "database" has different meanings.
    First thing I see, in your original post, is that you did the export/import as SYS. Was this "as sysdba"?
    From Oracle® Database Utilities
    10g Release 2 (10.2):
    Invoking Export and Import As SYSDBA
    SYSDBA is used internally and has specialized functions; its behavior is not the same as for generalized users. Therefore, you should not typically need to invoke Export or Import as SYSDBA, except in the following situations:
    * At the request of Oracle technical support
    * When importing a transportable tablespace set
    so it's quite possible that I missed something during the import/export of the environments.
    Are there any system tables that get invoked when you click on any of the objects within the connection?

Maybe you are looking for

  • Creating a removeable subset of the iPhoto Database

    My iPhoto library has grown to the size where I have to make CD/DVD Backups of the photos (and subsequently store the disk images on an external hard drive for further backup safety), just to have enough space to keep Mac OS X running smoothly. Looki

  • Checkboxes are being checked by default when they shouldn't be

    I have a form and there are eight checkboxes on it. In the server model I set the default to N. WHen i insert the records in the web form it still ticks them all (they cannot be entered by the user). To try and fix it, I set the Initial Value in form

  • Saving as a PDF-saves what's outside the workspace

    I'm using Illustrator CS....that might be my first problem haha. Anyway, when I try to save a .pdf version of my file, it ALWAYS saves including whatever is OUTSIDE the workspace area....Like instead of saving, say, the 8.5x11" document that I worked

  • Software Configuration Management and Delivery

    A client of ours wants to use Designer6i for software configuration management. We set it up, got it working, and have demonstrated such to the client. Oracle's documentation states the one missing piece in 6i is software delivery. Designer9i is supp

  • Untagged physical object must be assigned to a tagged parent object   ?

    Hi friends , I am using Auto-ID Test tool  as simulattor  of Device Controller  . When i tried to trigger Tag commissioning from AII , I have sent the proper informations like GTIN , Device Controller ID , command etc.,         It is triggering the r