Error that using TO_CHAR (TRUNC (SYSDATE), 'DAY') FROM DUAL
Hello everyone.I have a pl/sql procedure that contains TO_CHAR (TRUNC (SYSDATE), 'DAY') FROM DUAL to capture the DAY in a variable. Now when I access this procedure of someother application (Workflow), I get the error ORA-01841: (full) year must be understood between-4713 and 9999 and not be 0.
If I do not use TO_CHAR (TRUNC (SYSDATE), 'DAY') and hardcode the value, it throws no error.
Any ideas on this error?
Is this something to do with the NLS_DATE?
Thank you
Kind regards
Pavan K
>
...
IF (TRIM (SAT_DAY) = 'SATURDAY')
THEN
L_DAYS: = L_DAYS + 2;
ELSIF (TRIM (SAT_DAY) = "SUNDAY")
THEN
L_DAYS: = L_DAYS + 1;
ON THE OTHER
L_DAYS: = 1; - FND_PROFILE. VALUE ('DSD_PAF_TIMEOUT'); -Getting the value of timeouit in days
END IF;
L_DAYS: = L_DAYS * 24 * 60;
First, you add two days if it's a Sunday.
Then you multiply by 24 * 60.
Are you sure that this logic is ok?
I guess you just use bad values for the L_days parameter.
The difference between last Friday and today, without doubt is:
last Friday, the variable L_days has been VERY VERY VERY big, for example 20000000 = (x + 2) * 24 * 60)
Today, it's only 1 * 24 * 60 = 1440.
Published by: W. Sven on September 21, 2009 18:01
Looking at the error message...
ORA-01841: (full) year must be between-4713 and 9999
My current guess is that you have created a date that goes beyond the year 9999.
Published by: W. Sven on September 21, 2009 18:05
Tags: Database
Similar Questions
-
Hi all, I had a few problems looking for a table in which I had a few days of the week (i.e. john doe should do the laundry 'Friday'). Well, when I go to call:
SELECT name
TABLE
WHERE table.weekday = TO_CHAR (SYSDATE, 'Day');
the query spits out no data found... because:
-during the week is spelled correctly;
-SELECT TO_CHAR (SYSDATE, 'Day') FROM dual gives the right day (and I tried this nest in the above query);
-day of the week is of type varchar (10)
-nls options are properly defined (= > the last query gives current day in the correct language)
What is the problem with that?
Kind regardsYou have to adjust them and properly handle the case:
SELECT name FROM table WHERE upper(table.weekday) = trim(TO_CHAR(SYSDATE, 'DAY'));
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/] -
trunc sysdate returns 12:08 AM
SELECT TO_CHAR (TRUNC (SYSDATE), ' MM/DD/YYYY hh: mm AM ")"Current Date and time"from DUAL;
----------
21/08/2015-12:08 AM
If this should not return 12:00 AM... ?
I see the example, with the same output (where I got of) mentioned in this oradoc:
http://docs.Oracle.com/CD/B19306_01/server.102/b14200/functions201.htm
However, the textbooks I use show 12:00 as output. Maybe something's different in my initialization?
MM is the month, not minutes
-
get more records of 30 days from the date of the day
I use MS SQL 2000 How can I recover the data that are older than 30 days from the date of the day? I put currendate "DateTime" field as data type and length is the '8 '.
< cfset variables.getdate = DateAdd (would be ',-30, now()) >
Select dataname
of tabletest
where currendate > = "variables.getdate."
the sql stmt above does not work.Select dataname
of tabletest
where currendate<= #createodbcdate(dateadd("d",="" -30,="">=>You say that you want records which are more than 30 days from now, so that it must be less than or equal to the date
But if you want the Chronogram of 30 days there are until now then it must be greater than or equal toKen
-
TO_CHAR (sysdate, 'DAY') as a predicate
I was working with a statement SQL tries to use TO_CHAR (SYSDATE, 'DAY') to get all the rows in a table where a specific column holds the day of the week (as a literal - i.e. TUESDAY). However - it did not work... So - I tried the following:
Who did not return the rows either...select sysdate from dual where 'TUESDAY' = TO_CHAR(sysdate,'DAY');
However (not that that's what I was trying to do) it does not work:
I'm obviously missing something here... I don't understand why the first SQL does not.select sysdate from dual where '3' = TO_CHAR(sysdate,'D');
Can someone tell me what I'm missing?
Oracle 11.2.0.1 VersionSeveral things
(1) see the "fm" format modifier (which adjusts off the coast of the white flight) - the likely question
(2) if there is a chance that your NLS settings would point to the non-English languages, you will have to answer for that as well. -
Dell xps 15 laptop with windows 7 Home premium 64-bit
processor Intel core i5 2.30 GHzHello tejashande,
Thank you for the question!
It is disheartening to know that have problems you with the computer laptop wi - fi. As I understand it, you get an error that Microsoft hosted network is not available when you use the computer laptop wi - fi as a hotspot.
I need to ask you some questions to help you best.
1. What is the exact error message related to networks hosted?
2. is it works much earlier?
Download and install the Wireless driver from the link below and check.
Answer to us if you are having problems with a Wi - fi connection or any other issue of Windows, and I'd be happy to help you again and try to correct the problem as soon as possible.
Good day!
Hope this information helps.
-
using trunc ((sysdate-1 * 12) add_months get Monday on this wk
Hello all;
I use trunc (add_months (sysdate-1 * 12)), which get me on 18/05/2010 but what I would do is bascially, if this date falls on a Monday, then getting Monday involved in this period, in this case Monday that is associated with is therefore 17/05/2010. How to get what I want to change.
Edited by: user13328581 may 18, 2011 08:36SQL> select trunc(add_months(sysdate, 1 * -12),'IW') from dual 2 / TRUNC(ADD --------- 17-MAY-10 SQL>
GOLD:
SQL> select next_day(trunc(add_months(sysdate, 1 * -12)) - 7,'monday') from dual 2 / NEXT_DAY( --------- 17-MAY-10 SQL>
SY.
-
Error when you use the trunc function
Hai
While I use the trunc function in my program there is an error
ORA-01422 exact fetch returns several non requested lines but he executed successfully
Concerning
Srikkanth.MSrikkanth,
Make sure that the SELECT INTO returns only 1 row. If you can not sure of that, so that its better to use a cursor.
DECLARE CURSOR Cur_Att IS SELECT BARCODE, INTIME, OUTTIME FROM DAIL_ATT WHERE BARCODE = :BARCODE AND ATTEND_DATE = TRUNC(:bardate); BEGIN OPEN Cur_Att; FETCH Cur_Att INTO :TODAY_BAR, :TODAY_IN, :TODAY_OUT; CLOSE Cur_Att; END;
Kind regards
Manu.
If my response or response from another person was helpful, please mark accordingly
-
I have Adobe Acrobat 9 Pro Extender. When I try to convert a Word file to PDF that says that it cannot find the drivers from the Adobe PDF printer and reinstall Adobe Acrobat 9.0. In addition, when I open just the program Acrobat 9 Pro Extender an error message comes up saying that a part of the Capture 3D plugin has been damaged. I went to customer service and they sent me here. Please tell me that this is not another race. I'm running out of patience! I have 10 window.
Acrobat 9 is quite old and not longer supported. The last Windows OS that could use Acrobat 9 has Windows 7 and Acrobat had to have all updates applied.
You need to upgrade to Acrobat DC.
-
I'm running the following insertions and all periods are open, but I still get this error in the po_interface_errors table.
«Error: Please enter a GL Date in an accounting period of the open inventory.»
Cause: You have provided a date Open GL that isn't in an accounting period of the inventory.
Action: enter a date that is in an open period. »
Here are the inserts.
INSERT INTO rcv_headers_interface
(header_interface_id, GROUP_ID, processing_status_code,
receipt_source_code, transaction_type, last_update_date,
last_updated_by, last_update_login, creation_date, created_by.
vendor_id, expected_receipt_date, validation_flag)
SELECT rcv_headers_interface_s.NEXTVAL, rcv_interface_groups_s.NEXTVAL,
'Pending', 'SELLER', v_transaction_type, SYSDATE, v_user_id, 0, SYSDATE, v_user_id,.
v_vendor_id, SYSDATE, 'Y '.
FROM DUAL;
INSERT INTO rcv_transactions_interface
(interface_transaction_id, GROUP_ID,
last_update_date, last_updated_by, creation_date,
created_by, last_update_login, transaction_type,
transaction_date, processing_status_code,
processing_mode_code, transaction_status_code,
po_header_id, po_line_id, item_id, quantity, unit_of_measure,
po_line_location_id, auto_transact_code,
receipt_source_code, to_organization_code,
source_document_code, document_num,
destination_type_code,
deliver_to_location_id, subinventory,
header_interface_id, validation_flag)
SELECT rcv_transactions_interface_s.NEXTVAL,
rcv_interface_groups_s.CURRVAL, SYSDATE, v_user_id,
SYSDATE, v_user_id, 0, 'RECEIVE', SYSDATE, 'pending. "
'BATCH', 'PENDING', v_po_header_id, v_po_line_id,
V_ITEM_ID, resume,.
v_unit_meas_lookup_code,
v_line_location_id, "DELIVER", "SELLER",.
v_organization_code, "PO", v_po_number.
v_destination_type_code,
v_deliver_to_location_id, v_destination_subinventory,
rcv_headers_interface_s.CURRVAL, 'Y '.
FROM DUAL;
I found it today the inventory > Cycle farm accounting > accounting periods in the inventory
-
How to use day - from life in XSL 2.0
Hello
I try to use the days-duration of function in XSL 2.0, but it keeps complaining about invalid Xpath for this line.
I use it with xp20: prefix, is that correct?
Thanks in advance.
OK, I got, I had to add namespace below & then use it as the prefix
"xmlns:FN ="http://www.w3.org/2005/xpath-functions"
FN: Days - from-duration
Thank you.
-
Hello. I have a problem downloading the photoshop cs2 free on the Adobe site to my PC... I got 2 before Photoshop on my computer, but after that I formatted this last day, I can't download the programs again. I use Vista on my computer and my Internet is also open and I ludovic Firefox. My firewall I also closed when I try to download the file, but the problem is the same. When I try to download the photoshop or other programs Adobe down your site (Adobe website) and cams out there a text saying: Firefox can not find server download.adobe.com. Check the address for typing errors, like ww.eksempel.dk instead of www.eksempel.dk if you can not load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web. I also tried with Crome and Microsoft Internet but still the same problem and error text is displayed. Can someone help me? Please...
Hi benjamina35117761,
Please visit the following link;
Error: "Activation Server is not available. CS2, Acrobat 7, pass a hearing 3
-
someone from adobe can help immediately please? I've already paid for the 1 year plan and your system tells me that I have only 30 days trial
Your subscription to cloud shows correctly on your account page?
If you have more than one email, you will be sure that you use the right Adobe ID?
https://www.adobe.com/account.html for subscriptions on your page from Adobe
.
If Yes
Some general information for a subscription of cloud
Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work
Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud
-Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
-http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
-ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
-http://helpx.adobe.com/creative-cloud/kb/license-this-software.html
.
If no
This is an open forum, Adobe support... you need Adobe personnel to help
Adobe contact information - http://helpx.adobe.com/contact.html
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
-Select your product and what you need help with
-Click on the blue box "still need help? Contact us. "
-
Question
I have a problem when I want to print an email page.it shows me an error that seems to come from a program that blocks the emerged Windows.ce do sais.what do? EditCan you check this problem on Firefox 9?
-
error0x800CCC0F
I get a message from explicit outlook 0x800CCC0F error that prevents e-mails to transfer my bt yahoo mailbox. This problem has occurred since the end of last year. There are occasions when the transfer is made, but it is intermittent. BT tell me it is a sequel to a modification of windows security and the difficulty with Windows. They will advise a round work but not a solution. Is there a way to fix?Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
http://www.oehelp.com/OETips.aspx#3Why you don't need your anti-virus to scan your email
http://thundercloud.NET/infoave/tutorials/email-scanning/index.htmThe way most effective to do this is to completely remove the program anti-virus and then perform a custom installation. When the possibility of withdrawing the e-mail analysis arises, remove.If that fixes it, please post any error message in its entirety. You can left click on it to highlight then right click to copy and then paste in this thread. Just the number of code alone is not enough.
Maybe you are looking for
-
Satellite C660 with Windows 8.1 is very slow
I have upgraded from windows 7 to 8.1 and it was very slow, the drive is still in the use of 100.When I had Windows 7 I've never had the slow computer.
-
Need new compatible battery for Satellite C650-129
* URGENT *: Hello. Y at - there anyone out there who can give information me on replacing the battery for satellite C650. (model No.: PSC14E-002001AR), with the battery model number: PA3816U-1BRS, PABAS227? I can't find the battery exactly by this mo
-
Why don't the graph and the table of the DAQ Assistant, when it is run more than once
I have a vi that collects data and the poster. When I press the run button, it collects data as expected. But, if I changed the samples or the rate and press the run button, it collects data on the previous values of the sample and rate. I have the r
-
Vista - Error Code: 0 X 80070026 (cannot install Service Pack 2)
HI PLEASE HELP! WHEN I TRY TO INSTALL SP2 - THIS NOTE: error: error_handle_eof (0 x 80070026)am on dell inspiron 1520 - vista Home premium
-
I use XP and several years ago MS sent me the butterfly disk. I used it since. Opportunities, there has been some problems, but they have always resolved. Today, traces of the butterfly DISAPPEARED! As they had never been there. No traces. It is some