Conversion of number in Date in Oracle sql

I have some values in Field1 as
20110820,
20110821,
20110822
which is a data type number and
which is something like yyyymmdd.

I want to convert to date as "mm/dd/yyyy" format

I have to use in a select query, something like if (A.field1 = 0, 01/01/2000, A.field1).

How can I achieve this?

Probably not the right forum but maybe

Select f1, to_Date (substr (date1, 7, 2) |) » /'|| substr (date1, 5, 2) | » /'|| substr(date1,1,4), ' dd/mm/rrrr') as date2
Of
(select 0 F1, 20110820 like double date1)

Tags: Oracle Development

Similar Questions

  • Number displayed in the oracle.sql.NUMBER form in the result of the query

    Developer SQL version 3.2.10.09.57 displays numbers like "oracle.sql.NUMBER@66a35419 (the part after @ is not constant and change each time) even for simple count (*) select double."
    At the same time "run the Script (F5)" no indication that the header
    COUNT (*)
    ------------
    and no the query results.

    Hi Andriy,

    The forum search, I see a similar complaint noted against 3.1.07.42. Instruction execution produces the list oracle.sql.NUMBER, probably because of a corrupt installation query results (due to decompress questions, or perhaps no decompression in an empty directory). See the following thread:
    SQLDev 3.1: Number-fields in the tables have "oracle.sql.NUMBER @...". »

    Hope this helps,
    Gary
    SQL development team

  • Oracle SQL Developer in JDeveloper data modeling

    Hello

    See http://www.oracle.com/technology/products/database/sql_developer/files/Modeling.html
    Oracle SQL Developer - early release of the adoptive parent 2 data modeling
    Oracle SQL Developer data modeling is the latest product offering to join the Oracle database tools. SQL Developer data modeling offers complete data and database, modeling, tools and utilities, including entity-relationship, modeling relational (configuration database), Type data and multidimensional modeling, front and rear complete engineering and code generation. It includes the import to and the export to a variety of sources and targets, offers a variety of formatting options and valid models through a predefined set of design rules.

    SQL Developer data modeling can connect to any version of the data base Oracle 9.2.0.1 and later versions, and is platform-independent. Initially available as a standalone product, with the future versions available as an extension of Oracle SQL Developer. The second version of the early adopter has stand-alone and file-based.


    See the screenshots, import.png, multi.png, notation.png, subview.png, erd.png, largemodel.jpg

    question
    These data new modeling capabilities are destined to end up in a future version of JDeveloper (replacing the existing data modeling features in JDeveloper)?

    Thank you very much
    Jan Vervecken

    N °

    Modeling of SQL Developer focuses on ER diagrams and a repository - which we think is targeting a different audience, then the 'physical' offered by JDeveloper modeling.

  • In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date?

    Hello world

    During playback of Oracle ADF Real World Developer's Guide, I noticed the dates match occurring in JDeveloper is different from what is the list in the book. JDeveloper is failing to oracle.jbo.domain.Date, but according to the book:

    DATEjava.sql.DateDATE type is mapped to java.sql.Date if the column in the table is a no time didn't need information zone.
    DATEjava.sql.TimestampDATE type is mapped to java.sql.Timestamp if the column in the table has a component "time" and that the client needs to zone information.
    TIMESTAMPjava.sql.TimestampThe TIMESTAMP type is mapped to java.sql.Timestamp if nanosecond precision is used in the database.

    In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date? Using java.sql.Date and java.sql.Timestamp could save me some headaches conversion date. And, is there a place in JDeveloper to display these maps? I looked around and didn't see anything.

    Thank you.

    James

    User, what version of jdev we are talking about?

    In GR 11, 1 material versions db types date and timestamp are mapped to types of domain data that represents a wrapper for the native data types. The reason was that the framework can work with the domain types regardless of the underlying data type.

    Since Oracle 11 GR 2 maps the types DB to java types (default selection, you can change it when you create a model project, you can set the Data Type Mapping). Once the pilot has business components define you cannot change this setting it would break existing components such as eo or vo.

    So if you are working wit 11 GR 1 subject, you must use the domain types, if you work with GR 11, 2 or 12 c, you can use the domain types, but it is recommended to use the java type mapping.

    Timo

  • SEVERE: Exception initialization 'oracle.dbtools.crest.fcp.DataModelerAddin' extension ' Oracle SQL Developer Data Modeling

    After some testing today with a new installation and plugin subversion in the latest edition of data Modeler this error happens with every start of the tool.

    Have removed and unzipped the installation once again without changing the error.

    After that, I started with another user on my computer, it the error does not occur.

    Is there a system folder to remove the configuration of my personal like jdeveloper and sql developer?

    I lose the most important features, for example. have no browser and cannot open a design.

    Here is the full error stack:

    29 may 2015 22:17:40 oracle.ideimpl.extension.AddinManagerImpl

    SEVERE: Exception initialization 'oracle.dbtools.crest.fcp.DataModelerAddin' extension ' Oracle SQL Developer Data Modeling

    java.lang.NullPointerException

    at oracle.dbtools.crest.swingui.editor.UDPLibrariesPersistence.load(UDPLibrariesPersistence.java:220)

    at oracle.dbtools.crest.model.design.DesignSet.createElement(DesignSet.java:56)

    at oracle.dbtools.crest.swingui.ApplicationView.addDesign(ApplicationView.java:2497)

    to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:435)

    to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:389)

    at oracle.dbtools.crest.swingui.ApplicationView.getInstance(ApplicationView.java:2258)

    at oracle.dbtools.crest.fcp.DataModelerAddin.initialize(DataModelerAddin.java:553)

    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:496)

    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:483)

    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManagerImpl.java:299)

    at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:160)

    at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:143)

    at oracle.ide.IdeCore.initProductAndUserAddinsAndActionRegistry(IdeCore.java:2294)

    at oracle.ide.IdeCore.startupImpl(IdeCore.java:1817)

    at oracle.ide.Ide.startup(Ide.java:772)

    at oracle.ide.osgi.Activator.start(Activator.java:209)

    to org.eclipse.osgi.framework.internal.core.BundleContextImpl$ 1.run(BundleContextImpl.java:711)

    at java.security.AccessController.doPrivileged (Native Method)

    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)

    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)

    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)

    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)

    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)

    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)

    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)

    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)

    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)

    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)

    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)

    at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)

    at org.netbeans.core.netigso.Netigso.start(Netigso.java:191)

    at org.netbeans.NetigsoHandle.startFramework(NetigsoHandle.java:209)

    at org.netbeans.ModuleManager.enable(ModuleManager.java:1352)

    at org.netbeans.ModuleManager.enable(ModuleManager.java:1156)

    at org.netbeans.core.startup.ModuleList.installNew (ModuleList.java:340)

    at org.netbeans.core.startup.ModuleList.trigger (ModuleList.java:276)

    at org.netbeans.core.startup.ModuleSystem.restore (ModuleSystem.java:301)

    at org.netbeans.core.startup.Main.getModuleSystem (Main.java:181)

    at org.netbeans.core.startup.Main.getModuleSystem (Main.java:150)

    at org.netbeans.core.startup.Main.start (Main.java:307)

    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)

    at java.lang.Thread.run(Thread.java:745)

    Hi Torsten,

    Thanks for reporting the problem. I logged a bug.

    You can view together as "list of system types" directory to "preference > Data Modeler"-probably no longer exists. I guess that the setting for this directory is empty when you start SQL Dev as a different user.

    Philippe

  • Oracle sql for data after the first occurrence of the hyphen

    Hi, I need oracle sql get data after the first occurrence of the hyphen.

    source of the string:
    ABCD - efgh

    I just want everything after the ' - '.

    someone help me please...

    Edited by: 1001076 on 28 may 2013 18:42

    Handle: 1001076
    Status level: Beginner
    Join date: April 18, 2013
    Messages total: 12
    Total Questions: 4 (3 pending)

    I offer you my condolences; Since you rarely get your questions answered here.

  • Oracle SQL Developer with SQL Developer Data Modeler

    Friends,

    I'm trying to understand the differences between Oracle SQL Developer Data Modeler and the possibility to use the SQL Developer Data Modeler.

    I have looked at two home pages produced on OTN, http://www.oracle.com/technology/products/database/datamodeler/index.html & http://www.oracle.com/technology/products/database/sql_developer/index.html and would appreciate your comments on my findings so far

    (1) the Oracle SQL Developer Data Modeler is a paid product stand-a-lone while using the Data Modeler of SQL Developer feature is free

    (2) the Data Modeler in SQL Developer functionality is basically a "viewer" I create my existing table of DR. by dragging in the Modeler in the object browser, but that's all. I can't save the diagram for later use or use to change the structure of the or the tables

    (3) if I need to have 'Oracle Designer' as ERD capability so I need to use Oracle SQL Developer Data Modeler (after purchase!)

    (4) are there other differences that I missed?


    Thanks in advance

    Yes, you've nailed it!

    Have fun
    K.

  • 'Oracle SQL Developer Data Modeling required repository report'

    Hi all

    Try to use model data of SQL Dev EA 2.1 reports, but whenever I try to connect to a database I get message 'Oracle SQL Developer maker data reporting repository.' necessary

    No idea how to fix this?

    Thank you

    Hello

    You can create from Modeler data using "file > export > schema considered" feature - repository will be created with the first exported design.

    Philippe

  • Oracle SQL Developer Data Modeler start error

    Hi all

    I just downloaded Oracle SQL Developer Data Modeling (2.0.0.57.0) [released July 1, 2009] by selecting the option ' Oracle SQL Developer Data Modeler for Windows (this zip file contains the JRE).

    After that I installed the same and tried to start clicking on datamodeler.exe, I get the following error message

    "Failed to create an instance of the JVM on the path:... \jdk\jre\bin\client\jvm.dll.

    On the same machine, I can successfully run the SQL Oracle program without error. My machine is having Windows XP Professional SP3.

    Any ideas? If there is a problem with Java, that of the Oracle SQL Developer should also not run. But as I said it runs with any error, but the Oracle SQL Developer Data Modeler gives the above error.

    Kind regards

    JAA149

    Hey Jawad,

    you wrote you have 960 MB of RAM - how did you do a test with 1.5 MB of RAM and 2 MB of RAM?
    No doubt this is a problem of memory - memory change in the datamodeler.conf file option:
    -There 'AddVMOption-Xmx768M"by default; to take
    -"AddVMOption-Xmx512M" or never, making it suitable for your configuration - you can check the available free memory first.

    Philippe

  • transfer of data from the sql for oracle server

    Can we use the tools datapumps or oracle exp in oracle to transfer data from oracle to sql server database? Is it possible to do through the use of these tools expdp or exp in oracle. Create oracle dump files and import them to sql server?
    I know there are third-party tools for the same. but I'm just curious?

    No, these tools cannot be used for the transfer of data from oracle to sql server. The two write files in an oracle proprietary format, that they not fixed data or sql scripits files.

  • How to modify data in "Result grid query" in Oracle SQL developer

    Dear,

    I would like to know how to change values directly in the query result grid.

    I use Oracle SQL Developer version 4.0.3.16

    Thank you

    Khalil

    EditValues.JPG

    I checked in SQL Developer 4 and I found no option to do this.

    I don't think it's available. You can open the table and add filters on each column and change. Or you can add where clause as suggested the link written by Jeff that I already gave. (http://www.thatjeffsmith.com/archive/2013/06/sql-developer-im-looking-at-a-record-how-do-i-edit-it/)

    Or you write update instructions.

    See you soon

    AJ

  • Number of Date conversion

    Hi, in my answers date of report appears as 20,071,224.0, I want to convert this number to Date as MM-DD-YYYY format, this isn't a time Dimension. do we need to convert this column in RPD or can we do answers, please help me on this.

    OBIEE 10.1.3.4.1

    Try this
    SUBSTRING (CAST (20091228 AS CHARACTER (30)) FROM 1 TO 4). '-' || SUBSTRING (CAST (20091228 AS CHARACTER (30)) 5-2). '-' || SUBSTRING (CAST (20091228 AS CHARACTER (30)) 7-2)

  • maximum number of data files in oracle

    I have the oracle10g database. I want to see the maximum number of data files in the database. One way, we can trace the control file and we can find... y at - it another way, we can see this parameter value? Please let me know.

    The db_files parameter controls this thing.

    Aman...

  • Date settings Toad/Oracle SQL Developer

    Dear all, the code below works as a TOAD, but in the Oracle Sql Developer does not work it says the start_date is not declared. Ambersand doent work in Toad? Do not know why. Y at - it a reason for this.
    I used Toad for awhile, now, they are deploying Oracle Sql Developer because it is a free tool.

    SET SERVEROUTPUT ON
    SET VERIFY OFF

    (8) tank variable start_date;


    BEGIN
    : Start_date: = TO_CHAR (TO_DATE ('& 1', 'YYYYMMDD'), 'YYYYMMDD');
    END;
    /

    BEGIN
    DBMS_OUTPUT. PUT_LINE(:START_DATE);
    END;

    Published by: user531731 on 07/23/2009 17:18

    Published by: user531731 on 07/23/2009 17:19

    My recommendation would be to write correctly regardless of the tool.

    SQL> DECLARE
      2    START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('&1','YYYYMMDD'),'YYYYMMDD');
      3  BEGIN
      4    DBMS_OUTPUT.PUT_LINE(START_DATE);
      5  END;
      6  /
    Enter value for 1: 20091010
    old   2:   START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('&1','YYYYMMDD'),'YYYYMMDD');
    new   2:   START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('20091010','YYYYMMDD'),'YYYYMMDD');
    20091010
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • The using Excel and Oracle SQL Developer data import - I need help

    Dear friends,

    I use Oracle SQL Developer 1.5.1 and I need to import an Excel file into a database table. If I try to import this file into XLS format, fields and headers are properly presented and separated, but if I press the button 'Next', it does nothing - it remains stopped.

    I did some research here in this forum and it seems to me that when you try to import a file via the XLS format, Developer SQL has bugs. Is this correct?

    If I save the same file in the CSV format and try to import the same file, it moves forward, but SQL Developer is not separating headers and fields correctly. It includes all CSV fields into one - say Column0 and fields 1. TEST; 01/01/2000 under the same Column0.

    Save the file in the CSV format is not a problem, by taking a little time. But I don't know how to make Developer SQL import correctly. Could someone help me please? Thanks in advance.

    Best regards

    Franklin

    This is a known bug in 1.5.1 so use 1.5.0 to import from Excel.
    With respect to the CSV, make sure that you have the right setting in the Preferences - Database - settings of export of genres - delimiter of export custom .

    Have fun
    K.

Maybe you are looking for