Displaying Null-date in SQL developer

Hi,
I run into the following problem (with SQL developer Vers. 1.2.0 build 2998).
On a table with a date column and a null date in some rows (the default value is "to_date(1, 'J')" ), SQL developer is showing after a query in the SQL worksheet the date "01/01/4713"
However, when I'm executing the same query in SQL*Plus, the columns with a null-date showing the value "01/01/4712"
How is it possible that SQL-Developer and SQL*Plus showing different dates on the same data?
Any suggestion or explanations for this behavior?
Any help is much appreciated.
TIA
Fred

They are both getting the same internal Oracle date format.
They will use different code to translate those bytes into a visible format.
The problem is about year 0 because historically there wasn't one.
The internal date format does permit dates in the year zero, but mostly the SQL interface forbids it.
For example
select to_date('01010000','ddmmyyyy') from dual;
will fail, but
select to_date('01010001','ddmmyyyy')-1 from dual;
will pass
and
select to_char(to_date('01010001','ddmmyyyy')-5,'dd/mon/yyyy') from dual;
produces, well, garbage.
Storing 'dummy' values tends to lead to odd results which is why it is generally frowned upon. Use a null and another column to indicate why a real value isn't appropriate.

Similar Messages

  • Changing color for data in sql developer

    I have recently seen some one have modified the setting in SQL developer to show certain color for the cells that have null values. Couldn't find where to set that property. Does anyone know how to default a color for a cell with null values in SQL developer?
    -app

    Go to Tools|Preferences|Database|Advanced. There is an option to set the null value background color.
    Ashley
    SQL Developer Team

  • To find last updated date in sql developer for a procedure or a function

    hi
    how to to find last updated date in sql developer for a procedure or a function.
    i m using sql developer version in 1.2

    I think you are in the wrong forum...
    Anyway you can try
    select * from
    all_objects o
    where o.object_type in ('FUNCTION','PROCEDURE');
    you have there the created date, last DDL and timestamp

  • View CLOB data in SQL Developer

    Hi,
    Can anyone let me know how to view CLOB data in SQL Developer 2.1.
    I am having images stored in a column of datatype CLOB. How to view this image.
    Database is 10.2.0.4.

    Since SQL Developer has no idea about the type of data stored in LOB columns, one cannot view that content in desired format.
    You need a tool to extract the LOB data and render it accordingly.
    BTW, do you mean BLOB here?

  • Release date for SQL Developer 1.1?

    Is there a release date for SQL Developer 1.1? According to your "SQL Developer Statement of Direction", it is due some time in the second half of 2006, but I haven't seen any firm dates. Any update on this would be appreciated, as it is much anticipated.

    When the time comes, will you provide us with release candidates or betas like you did for SQL Developer 1.0?
    I so look forward to test-driving 1.1 out for a spin. :-)
    Eagerly waiting,
    Daniel

  • How to display utf8 characters in sql developer

    Is there a setting I need to change in sql developer in order to display utf8 characters?
    I am seeing weird characters when displaying chinise/arabic characters in sql developer. I can display the same data just fine in Putty ( I changed the following setting in putty before I was able to display utf8 characters ok: Windows->Translation and selected UTF8) .
    Thanks,
    SK

    *1. OS version and oracle version*
    Windows XP Professional/Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    *2. NLS settings for the database*
    AL32UTF8
    *3. Output from sqlplus showing the UTF8 characters*
    \什么是统码
    ANSI
    \什么是统码
    يونی‌کُد چيست؟.utf8
    *4. Same output from SQLDeveloper*
    \什么是统码     ANSI
    \什么是统码     ÙŠÙˆÙ†ÛŒâ€ŒÚ©ÙØ¯ چيست؟.utf8
    Thanks,
    Salem

  • Foreign key Mapping based on Data - in SQL Developer Data modeler

    Team
    Do SQL Developer Data modeler supports Foreign Key mapping based on the Data in the Schema rather defined at the DDL ? For e.g if we implement a Objects Relation ship mapping in Data base, we don't define Foreign keys at table creation.
    Toad does this feature through "AUTOMATIC FOREIGN KEYS MAPPING IN TOAD DATA MODELER" more info at (http://toadworld.com/Blogs/tabid/67/EntryId/905/Automatic-Foreign-Keys-Mapping-in-Toad-Data-Modeler.aspx)
    any one know how to implement through some scripts also helps me
    Regards
    Raj

    If you have table PKs defined and the candidate columns match those PK columns, then you can use the Discover Foreign Keys utility. Right mouse over the relational model name (node) in the left browser. It is about half way down the menu. I did a blog post about it last week on kentgraziano.com.

  • Statement terminator problems when exporting data with SQL Developer 3.2

    I've ran across what appears to be a bug with SQL Developer 3.2.20.09. If someone can let me know if this is indeed a bug, or just something I need to configure differently, please let me know.
    The problem is related to exporting a database as a SQL script, and terminator characters at the end of "create" statements, especially when columns have comments, and problems that occur when using SQLPlus to run the export script to create the tables. With the old SQL Developer 1.5.4, with the "Terminator" and "Pretty Print" options checked, statements like the following are generated:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
    When I then run the script using SQLPlus, everything works fine. However, with SQL Developer 3.2.20.09, with the same options enabled, the same statements are generated like this:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
    Notice all of the extra slashes in there. If a slash is not used as a statement terminator, SQLPlus treats slashes as a command to repeat the last SQL statement, which causes many errors about tables or sequences already existing. So, I tried removing the "Terminator" flag from the export options. This lead to statements that looked a bit more promising:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.'
    The big problem, though, is in the statement for the table with a comment. Notice that there are two statements, but there is not a semicolon after either of them. This unfortunately causes the "COMMENT" statement to be appended to the "CREATE TABLE" statement before being executed, which causes the table to not be created (which causes even more errors later on when the script attempts to populate the table with data).
    So, it would appear that this is a bug, but I'm not sure. Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
    Thanks,
    -Bill

    >
    So, it would appear that this is a bug, but I'm not sure.
    >
    That would be a bug. Thanks for reporting it and providing the detailed example.
    >
    Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
    >
    No.
    Leave the thread open. One of the developers for sql developer should be monitoring the forum and can provide more information.

  • Displaying tables in Oracle SQL Developer

    Anyone who can help me I thank you in advance. I installed SQL Developer v1.5.3 and can connect to the databases I want to access. After establishing the db connection the Tables icon is displayed. I click on it and no tables are displayed. I can run scripts so I know ihave read access to them . Is there anyone who can help my determine why Tables does not expand and diaply the tanbles in the db?

    What do you mean by other owners node? I am an Oracle or SQL newbie. The db I'm accessing is a corporate db. Is there additional permissions (beyond read permisiion to run queries) I need to be able to view the tables as well? Most others access the dbs via Toad or PSQL and are not having this issue. No money for those so I have to use SQL Developer. The Oracle client is 9i, and the db is 10.

  • Querying uncommitted session data in SQL Developer debugger

    I'm trying to analyze a large PL/SQL program that performs table creation, data insertion, and conditional updates to temporary tables. Is there a way to query the uncommitted data in the session in which the PL/SQL is running while stopped at a breakpoint? I see that watches make variables available for inspection, but I'd like to query data in the temp tables using a select statement to see what is there while the debugger is stopped at a breakpoint.
    This is using SQL Developer 1.2 on MS Windows XP against an Oracle 10g database.

    Well, no. You'd have to change your code to include these calls and fill variables you can monitor with the debugger. A lot of work in development, impossible for production...
    This would make a great request for the SQL Developer Exchange though: like the VB/Access Immediate window, a worksheet linked to the debugger session. You'll have my vote if you add it.
    K.

  • Viewing CLOB data in sql developer

    In SQL Developer 1.1, if CLOB data was returned from a query, you could place your mouse over the column and get most of it.
    But in 1.2, all you get is "(CLOB) <some data> ...", and nothing else. Is there something I need to set?

    You should look in the SQL Developer forum. I think your question is answered here:
    How to view the entire CLOB in results table?
    Regards Nigel

  • How to read zipped CLOB data in SQL developer

    hi,
    We have recently switched to SQL developer from TOAD,
    And i have few tables with CLOB column types , and having data in it in zipped form
    Functionality to view zipped CLOB data is there in Toad, please suggest how can i use same in SQL dev.
    Thanks,
    Mayank
    Lead DBA
    Budapest

    Hi,
    I downloaded the SQL Server 2000 Driver for JDBC Service Pack 1 at http://www.microsoft.com/downloads/details.aspx?familyid=4f8f2f01-1ed7-4c4d-8f7b-3d47969e66ae&displaylang=en#filelist.
    I put the mysql jdbc driver to tomcat before.
    However, I write an application program running on console window.
    Where should I put that msbase.jar, mssqlserver.jar and msutil.jar on the windows 2000 server?
    Also, how can I make the application program as a service running on windows 2000 server?
    Thanks for help

  • Next Release date of sql developer

    Does anyone know the expected release date for the next version of (1.3) SQL Developer? I'm interested in the revision control functionality and hoping to get a general idea of when it will be available.
    Thanks

    Hi Kris,
    Thanks for responding. I understand that dates can't be committed to unfortunately I won't be attending OOW this year and I was just hoping to get a general indication if the update would be this year or some point in the first part of next year.
    Thanks, Rick

  • To display chinese characters with SQL Developer

    I have created one table on the Oracle Express Database. In this table ther is one field Nchar tipe.
    The NLS_CHARACTERSET of the d.b. is WE8MSWIN1252, the NLS_NCHAR_CHARACTERSET is AL16UTF16.
    I have done an insert on the table and in this field i have inserted this word: 了解更多
    When i do a select comand with sql developer, on the results i see this only this •••• .
    But if i copy this and cut on the Sql Developer editor, i see the corret word.
    How could i configurate ?
    Regards
    Mario

    Hi
    The following works but there may be better solutions:
    http://totierne.blogspot.com/2008/05/issuesquare-boxes-as-text-characters.html
    Issue:Square boxes as text characters Solution:Add fonts
    Chinese characters in Linux see Debian Chinese How To [1] basically:
    1. create a jre/lib/fonts/fallback directory if necessary and
    2. copy or link the fonts files into this directory. (On my Linux system: /usr/share/fonts/truetype/arphic/gbsn00lp.ttf )
    -Turloch

  • Street date for SQL Developer 3.0

    Does anyone know when this will be released? I saw a neat-o presentation at OpenWorld and can't wait to get my hands on it.

    Thanks Sue and Ashley,
    I understand that you cannot provide a specific date and appreciate your timely feedback in this forum.
    For others watching this thread, Tom Kyte gave an excellent presentation at OpenWorld
    where he demonstrated some of the new cool 3.0 features which you can find on his
    site http://asktom.oracle.com/pls/apex/f?p=100:8:0::NO. Look for the oow_2010.zip file.
    Steve

Maybe you are looking for