problem of date in oracle
Hi allI wrote a query in Notepad (Oracle 10g client) and the database is 11 GR 1 material where the entry_date data type is date in table
Select * from une_table where entry_date between to_date('20-jan-2011') and to_date('20-jan-2011').
Sometimes it's return of lines and sometimes not
When I write
Select * from une_table where
TO_DATE (entry_date) between to_date('20-jan-2011') and to_date('20-jan-2011');
I've seen this type of problem oracle forms also
I want to know where is the problem and why is - this problem persists.
is there any solution here...
Please answer...
assumming this entry_date is of type date
Try this:
Select * from une_table where
trunc (entry_date) between to_date('20-jan-2011','dd-mon-yyyy') and to_date('20-jan-2011','dd-mon-yyyy');
Tags: Database
Similar Questions
-
problem loading data from oracle table excel table / oracle
Hi all
I'm working on the form of data transformation 2 different sources to a target table only oracle.
My first source - excel sheet.
2nd source - oracle table.
Creation of data servers, dsn(for excel), reversing everything done very well.
When I try to display the data there is a problem.
EXCEL - serial number column is displayed as 1.0,2.0,.3.0 etc. need 1,2,3,4,5...
Oracle tables-> after that reverse it does not display the data types for the selected columns.
I am not able to create a join and run.
Help, please.
Thank you
Chaitanya.Hello
Just a thought, why not u cast TO_NUMBER to the interface mapping for the serial number column?
Thank you
Guru -
Problem importing data in Oracle 10 G
I have had every schema s successfully imported in oracle 10G. Then, import the data also. But I can't find any of the imported data, there are still a few tables which is missing data.
Error:-ORA 1917; problem with table constraints.
Please suggest... should I have to disable the before importing the data?Vijay kr wrote:
Error:-"the parent key does not exist.
Due has an idea about this?Yes.
It seems that you import tables parent when there are primary keys (parent keys) for the table/s for which you are trying to activate the key foreign/s. -
Regarding the problem of Date in Oracle.
Dear Sir.
I want the query q that will give me the result in the following form.
for example. entry date is 30.09.2012 then the output should be
"Up to 31.03.1996.
"01.04 - 1996 - 31.03.1997'"
"01.04 - 1997 - 31.03.1998'"
"01.04 - 1998 - 31.03.1999'"
"01.04 - 1999 - 31.03.2000'"
"01.04 - 2000 - 31.03.2001'"
"01.04 - 2001 - 31.03.2002'"
"01.04 - 2002 - 31.03.2003'"
"01.04 - 2003 - 31.03.2004'"
"01.04 - 2004 - 31.03.2005'"
"01.04 - 2005 - 31.03.2006'"
"01.04 - 2006 - 31.03.2007'"
"01.04 - 2007 - 31.03.2008'"
"01.04 - 2008 - 31.03.2009'"
"01.04 - 2009 - 31.03.2010'"
"01.04 - 2010 - 31.03.2011'"
"01.04 - 2011 - 31.03.2012'"
When the entry is 31/12/2012 then exit
"Up to 31.03.1996.
"01.04 - 1996 - 31.03.1997'"
"01.04 - 1997 - 31.03.1998'"
"01.04 - 1998 - 31.03.1999'"
"01.04 - 1999 - 31.03.2000'"
"01.04 - 2000 - 31.03.2001'"
"01.04 - 2001 - 31.03.2002'"
"01.04 - 2002 - 31.03.2003'"
"01.04 - 2003 - 31.03.2004'"
"01.04 - 2004 - 31.03.2005'"
"01.04 - 2005 - 31.03.2006'"
"01.04 - 2006 - 31.03.2007'"
"01.04 - 2007 - 31.03.2008'"
"01.04 - 2008 - 31.03.2009'"
"01.04 - 2009 - 31.03.2010'"
"01.04 - 2010 - 31.03.2011'"
"01.04 - 2011 - 30.06.2012'"
Similarly in the same way.
Please give me the solution
Thanks and greetingsHello
That's what you asked for:
VARIABLE input_date VARCHAR2 (10) EXEC :input_date := '31.12.2012'; WITH got_end_date AS ( SELECT ADD_MONTHS ( TO_DATE (:input_date, 'DD.MM.YYYY') , -6 ) AS end_date FROM dual ) , got_start_date AS ( SELECT ADD_MONTHS ( TRUNC ( ADD_MONTHS ( end_date + 1 , -3 ) , 'YEAR' ) , 3 ) AS start_date , end_date FROM got_end_date ) SELECT CASE WHEN CONNECT_BY_ISLEAF = 1 THEN 'Upto ' ELSE TO_CHAR ( ADD_MONTHS ( start_date , -12 * LEVEL ) , 'DD.MM.YYYY-' ) END || TO_CHAR ( CASE WHEN LEVEL = 1 THEN end_date ELSE ADD_MONTHS ( start_date - 1 , -12 * (LEVEL - 1) ) END , 'DD.MM.YYYY' ) AS txt FROM got_start_date CONNECT BY LEVEL <= 17 ORDER BY LEVEL DESC ;
Boneist has a good point: If you explain what you want, it will be easier for people to find solutions and to provide correct solutions.
-
Extract data from Oracle into excel file
Hello
I have a requirement where in I need to extract data from Oracle into excel file and the worksheet excel name should be 'given '.
for example. Excel 'AR Data_DDMMYY' file name and the name of the "Data" sheet excel
I used the UTL_FILE API to extract the data delimited by tabs that you can open in excel, but it's not exactly an excel file as the name of the worksheet is the same as the name of the file.
I tried to use utl_file.fcopy and frename.
Is it possible to do it using PLSQL?
Select * from version of v$.
Example Code:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL Release 10.2.0.5.0 - Production "CORE 10.2.0.5.0 Production" TNS for HPUX: Version 10.2.0.5.0 - Production NLSRTL Version 10.2.0.5.0 - Production
Thank youdeclare cursor c is select * from scott.emp; v varchar2(100); f utl_file.file_type; file_name varchar2(100) := 'AR Data.xls'; dir varchar2(50) := 'CESDIR191710'; --select * from dba_directories begin f := utl_file.fopen(dir, file_name, 'W'); v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO'; utl_file.put_line(f, v); for i in c loop v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno; utl_file.put_line(f, v); end loop; utl_file.fclose(f); --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false); utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls'); end;
ImranHello
I tried to change the .xlsx to .xls and it gives a note at the opening of the file "the file you are trying to open, abc.xls, is in a different format that it is specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? »
When you rename the file does not solve your problem.
Anton Scheffer package generates a file in format xlsx Office 2010. When rename you it with the .xls extension, then Office 2010 will give you the warning that the file format does not match the extension.but the requirement has to generate excel 2003 file.
The xml_spreadsheet package writes a format that was introduced with Office 2003, but you must use .xml as extension in other Office 2010 will give you the same caveat.
To write the real xls version (binary), you can use Apache POI. You will need to import Java classes in your db and write a PL/SQL wrapper. Or you can use one of the options above, writing the output to a windows server and then use Excel to open and save in the required format.You must decide whether it is easier to write the binary xls format or to convince the customer to accept other formats that can be opened with Excel.
Concerning
Marcus -
CfSQLtype and date type oracle
I have a problem with a SQL Oracle when part of the where clause is:
and INSPECTION_DATE = < cfqueryparam value = "" #Form.INSPECTION_DATE # "cfsqltype = 'cf_sql_DATE' >"
It does not, so the SQL is not updated as I expect. I also tried the cf_sql_TIMESTAMP type, but it does not correspond to either. An Oracle date is actually a date and timestamp, but it does not resemble the ColdFusion TimeStamp. No one knows what look like the acutally cf_sql_DATE and cf_sql_TIMESTAMP, so I can use an Oracle to_char() function make them match?
Thanks for your help.
Scott
If your Oracle files have something else that zeros in the time portion of the datefield that you won't get a match because the cold fusion will be zeros. There are at least two ways to handle this:
With the functions, that is to say
where to_char (date field oracle) = dateformat (date of cold fusion)or with an exanded where clause, that is to say
where oracle_date_field > = cold_fusion_date_you_want
and oracle_date_field<> -
SOS! -Error to load data from Oracle 11 g to Essbase using ODI
Hi all.
I want to load data from oracle database to essbase using ODI.
I have set up correctly the Hyperion essbase physical and logical topology manager and got the structure ESSBASE BASIC app DEMO.
The problem is.
1. when I try see data right click on the table of essbase.
va.sql.SQLException: driver must be specified
at com.sunopsis.sql.SnpsConnection.a (SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection (SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection (SnpsConnection.java)
at com.sunopsis.graphical.frame.b.jc.bE (jc.java)
at com.sunopsis.graphical.frame.bo.bA (bo.java)
at com.sunopsis.graphical.frame.b.ja.dl (ja.java)
to com.sunopsis.graphical.frame.b.ja. < init > (ja.java)
to com.sunopsis.graphical.frame.b.jc. < init > (jc.java)
I got the answer of partisan Oracle it's ok, just omit it. The second problem will appear.
2 create an interface between the oracle and essbase database, click on the option ' staging of deffirent from the area of the "(ce qui signifie que la mise en scène est créé à la base de données oracle) target, and using IKM SQL for Hyperion Essbase (metadata), run this interface".
org.apache.bsf.BSFException: exception of Jython:
Traceback (innermost last):
"< String >" file, line 61, in there?
com.hyperion.odi.essbase.ODIEssbaseException: invalid value specified [RULES_FILE] for the load option [null]
at com.hyperion.odi.essbase.ODIEssbaseMetaWriter.validateLoadOptions (unknown Source)
at com.hyperion.odi.essbase.AbstractEssbaseWriter.beginLoad (unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at org.python.core.PyReflectedFunction.__call__ (PyReflectedFunction.java)
at org.python.core.PyMethod.__call__ (PyMethod.java)
at org.python.core.PyObject.__call__ (PyObject.java)
at org.python.core.PyInstance.invoke (PyInstance.java)
to org.python.pycode._pyx1.f$ 0 (< string >: 61)
to org.python.pycode._pyx1.call_function (< string >)
at org.python.core.PyTableCode.call (PyTableCode.java)
at org.python.core.PyCode.call (PyCode.java)
at org.python.core.Py.runCode (Py.java)
at org.python.core.Py.exec (Py.java)
I am very confused by it. Someone give me a solution or other docs.
Ethan.Hello
You say that you are loading, but you chose the KM for the loading of metadata?
If you load metadata then you must provide a rules file, if you are loading and then choose the KM - IKM SQL for Hyperion Essbase (DATA)Ok?
See you soon
John
http://John-Goodwin.blogspot.com/ -
Importing bulk data into Oracle - with restrictions
Hello
I am trying to insert data from a stream (inside the ETL tool) of bulk in Oracle via a stored procedure, but under many restrictions. Hope you can help.
Oracle 10 g database is.
There is up to 1 000 000 records of about 100 bytes each, through delivery, to about 200 000 000 per day.
Target table:
CREATE TABLE TBL_STG
("KEY", NUMBER (13.0),)
"ATT_1" NUMBER (1.0).
NUMBER (14.0) "TIMESTAMP."
"ATT_2" NUMBER (14.0).
"ATT_3" NUMBER (14.0).
"ATT_4" NUMBER (2.0).
"ATT_5" NUMBER (1.0)
)
I can easily convert the stream of input documents in a collection (list separated by commas, for example) with the ETL tool that I use. I then call the stored procedure with the collection of records (delimiter: comma) as one of the parameters.
The problem is that I am using the ETL tool in slightly modified middle (emulation of continuous treatment) which greatly limits my possibilities to load data into Oracle.
Basically, I can't use utilities (for example, SQL * Loader), except when writing to disk first! Neither the tool provided support for the api.
I'm now calling a stored procedure with a collection set however it gives the problem types are NOT taken in charge the following data:
Nested table, VARRAY/ANYTYPE: gives an error of type 108 unknown column
index - by table (old style): unknown col.tp. 152
Clob/NCLOB: unkn.col.tp 112
BLOB: 113
All I have left is the stored procedure:
LONG BELIEVED, GROSS, LONG.
These data types are not recommended, but at least still supported by 10g.
So where did that my question, in these circumstances, could you provide me with assistance towards passing the RAW collection /... and interpreting it as a digital table in Oracle. Your help is greatly appreciated.
Thank you(deleted - double post)
Edited by: nthomas on January 6, 2009 14:43
-
context: a previous thread with an identical title never responded, the problem just disappeared. Well its been two weeks since then and the problem came back.
somethings which may or may not apply: internet TV seems to work better in media center. All updates have been applied to H.P. of Vista SP2. Netflix works fine in ie8 (such as the internet, of course). Tried to delete all the Internet Options, delete browsing history section of Internet Explorer. I get the same error message with my windows 7 professional media center, but netflix seems to play anyway (no game with vista). I recently installed quicktime alternative 2.72 to see what it was and how it worked, then removed and put back in quicktime.
Tried / symptoms:
-Remove all the browsing history (econcepts)
-Same message on Win7pro but works even when (econcepts)
-Works on Win7 no problem (omegafiler)
-Works in ie 8 (econcepts)
-Works in crome (Martin TX)
-Consensus is that it started around December 30, 2009 (GeoffG1, johnetX, me)
-Remove and reinstall silverlight (omegafiler)
-Remove and replace netflix plugin (omegafiler)<- how="" did="" you="" do="" that="">->
-Netflix says: microsoft problem (Nitestalker)
-Microsoft is silent (this thread - on vacation?)
-Same problem on 32-bit and 64-bit VMC (JRSMiamiFL)
-No applied update (johnetx)<- perhaps="" date="" related="" or="" drm="" date="">->
-Disconnect from netflix, you reconnect again - ultimately the same error (chicagokiwi)
-Tried to reduce the number of items in the queues to well below the limit of 200 (econcepts)
-Tried the register / unregister the third wire procedure, no joy (does not break anything else however)
-Disabled the firewall, no change (econcepts)related topics:
http://social.answers.Microsoft.com/forums/en-us/vistaprograms/thread/0c154c0a-1fcb-4353-8c5e-b394e885256dSomeone else knows Netflix not being is not able to connect? It started yesterday (30/12/2009) for me. I looked fine the day before without problem. The message I get says "there was a problem of data recovery. Check the works of your internet connection and try again. Ok. I make it work with both my VMC - one with the service pack and the other without. My OS updates have been loaded in early December, so I don't see how this could it be. I searched and found this problem has come up before, but I have not found a solution. I made NO changes to my HTPC.
Those who have and solved this problem.
UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE *.
2009-01-05 has attempted to start Netflix this morning and you know, it works on both my VMCs. That's the good news. So now the real questions are:
Only 20 people reported it as a problem and only 6 on the green button. I believe that it affected all the world with Media Center. So why not discussed much?
It already happened, causes a stir and silently slips without known cause or cure. How can we find out what caused this and how to prevent it from happening again in the future?
*******************************************************************************************
-
Netflix in WMC «there was a problem of data recovery...» »
I installed the latest round of updates (Ultimate) of Windows Vista and it apparently burst Netflix in WMC. Now, I get the error:
"There was a problem of data recovery. Make sure your internet connection is working and try again. »
Internet works on the machine. I reinstalled Silverlight (v4) and Netflix for WIndows Media Center.
How to diagnose and repair the problem?
Thank you!
Keith...
Sorry for the delay, but I've been busy (in my free time) trying to get this to work.
I gave up trying to resuscitate MCE and installed a brand new Windows Vista Ultimate Edition with Service Pack 2. After apply all WIndows patches and installation of Silverlight, I have the "Netflix" element in MCE. He invites me to install, what I'm doing. However, every time I start MCE and go to Netflix, he tells me to do reinstall - no login screen.
I tried all the "mcupdate" article and then supported your steps above, but no go.
I did this twice, so it wasn't just a fluke. Apparently, the part of Netflix to MCE is not detect the plug-in that it installed.
Any thoughts on what to do then?
Thank you again...
Keith...
Later: I ran "mcupdate" after the steps you suggested, and now Netflix is gone again!
Later: same problem on my other computer running MCE and Vista. I don't want to mess up this computer so I left as what.
Later: opening of a new post on problems become Netflix to work with a clean install.
-
Original title: cannot load Netflix movies in Media Center
Netflix photo click on the message appears indicating a problem of data recovery. Check the works of your internet connection and try again.
Hi Barbarasimonetti,
(1) since when are you facing this problem?
(2) remember to make changes?
(3) what is the complete error message you receive?
Method 1: You can follow the steps described in the article below
Known issues and limitations of Netflix on Windows Media Center for Windows Vista
http://support.Microsoft.com/kb/972496
Method 2: If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:
How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
http://support.Microsoft.com/kb/929833
Thank you, and in what concerns:
Ajay K
Microsoft Answers Support Engineer
*************************************************************************** -
Hi, after all stages of extraction of data from oracle to oracle during the execution of command "start extract ext1" his error giving this handler does not run both source and target, can you please help me. Thank you
Hello
The setting should be as below, and not only the port number should be...
PORT 7809
Kind regards
Veera
-
Possibility to integrate data from Oracle EBS in Amazon cloud Cloud of planning via FDMEE
Hi experts,
I just entered a case more about FDMEE.
I want to know is it possible to integrate data from Oracle EBS on Amazon cloud TO cloud of planning by FDMEE.
Oracle EBS (Amazon Cloud)-> FDMEE-> planning and budgeting of the Cloud Services
Please let me know about the opportunity and the necessary measures to be taken for the integration of the data.
~ Thank you
They are separate environments first - an existing one in Amazon Cloud and another within the Oracle offer. Oracle allows not currently SEEP for connections to a system of source book, the only option available is a function file upload.
I think, in part because they do not want to expose SEEP to the external environments for reasons of maintenance and security.
-
Hi, I installed oracle11g R2 on fedora 14
all other things are perfact except EM :(
[oracle@shhost ~] lsnrctl start $
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on February 26, 2012 01:01:07
Copyright (c) 1991, 2009, Oracle. All rights reserved.
AMT-01106: listener by using the name of the LISTENER listener has already begun
[oracle@shhost ~] $ emctl start dbconsole
OC4J Configuration problem. /U01/app/Oracle/product/11.2.0/Db_1/OC4J/J2EE/OC4J_DBConsole_shhost.shdomain.com_sh not found.
[oracle@shhost ~] $ emca - config dbcontrol db-rest recreate
EMCA STARTED February 26, 2012 01:03:15
Configuration MS Assistant, Production of the Version 11.2.0.0.2
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
SID of the database: sh
Listener port number: 1521
Listener ORACLE_HOME [/ u01/app/oracle/product/11.2.0/db_1]:
User SYS password:
User DBSNMP password:
SYSMAN user password:
E-mail address for notifications (optional):
Server of Mail (SMTP) out for notifications (optional):
-----------------------------------------------------------------
You specified the following settings
Database ORACLE_HOME... /u01/app/oracle/product/11.2.0/db_1
Local hostname... shhost.shdomain.com
Listener ORACLE_HOME... /u01/app/oracle/product/11.2.0/db_1
Number of headphone port... 1521
Database SID... sh
Email address for notifications...
Server of Mail (SMTP) out for notifications...
-----------------------------------------------------------------
Do you want to continue? [yes (Y) (N) /no]: y
February 26, 2012 01:03:31 oracle.sysman.emcp.EMConfig perform
INFO: This operation is currently recorded in u01/app/oracle/cfgtoollogs/emca/sh/emca_2012_02_26_01_03_14.log.
February 26, 2012 01:03:32 oracle.sysman.emcp.EMConfig perform
GRAVE: Could not allocate ports in the specified range (s) for the following processes: JMS [5540-5559] RMI [5520-5539], Database Control [5500-5519] EM Agent [3938] | [1830-1849]
See the file journal at /u01/app/oracle/cfgtoollogs/emca/sh/emca_2012_02_26_01_03_14.log for more details.
Unable to complete the configuration. See the file journal at /u01/app/oracle/cfgtoollogs/emca/sh/emca_2012_02_26_01_03_14.log for more details.
[oracle@shhost ~] $More information on this:
* Troubleshooting Dbconsole EMCA caused failures Hostname and Port issues [ID 1107743.1] *.
EMCA fails with the error 'Cannot allocate or ports in the specified range (s) for the following process' [353843.1 ID]
EMCA fails to create DB control with "Impossible to allocate Ports within the Port range specified" [ID 1302951.1]Published by: 909592 on February 26, 2012 16:48
Published by: 909592 on February 26, 2012 16:49
Published by: 909592 on February 26, 2012 16:50
-
How to migrate data from Oracle 11.2 Standard Edition to Oracle 11 g XE Beta
Hello
Can someone help me by giving steps to migrate from Oracle 11.2 Standard Edition data to Oracle 11 g XE Beta. The database size is 6 GB.
Thank you
AshrafHello Ashraf.
use datapump (expdp/impdp).
-Udo
Maybe you are looking for
-
GSM7224v2 loses the configuration after power failure
As the topic title says - this device (new for me but flea market) loses its configuration after power off. I don't see any button cell within the unit for volatile memory backup. Surely the configuration lives in non-volatile storage? I am being dum
-
Recovery of the clips audio clip made up?
I know that I can combine audio clips in a compound clip - tell all my sound effects. So I know I can "expand" the audio components - to make adjustments. Or also open the clip in her own scenario - where all the separate elements are revealed. I w
-
HP 15 Notebook PC TS: hp support assistant
My laptop is about a month old. My HP support assistant said I've updated, but it will never be done download. It connects to the HP Server and then everything just never finished downloading. I uninstalled HP Support Assistant and reinstalled. N
-
alcalel one-touch 5005 X driver free download
My pc don't see my alcatel5005x one touch on USB mobitel. How to get a driver
-
Downloads (KB959209) x 86 and (KB951847) x 86 still fail... displaying the error Code: 0X8007064C. My regular resources has been unable to resolve the situation. Can it be fixed by someone with limited computer skills or it was take another profess