Date of issue stopping the export program.

Hi all

We use the version of Oracle 11 g.

We export data from the database to a .txt file. If the new race date of report in a State of table is greater than or equal to the date system and then export is expected to happen.
--Note: <Report Name> is the in param.

Execute immediate 'ALTER SESSION SET NLS_DATE_FORMAT =''DD-MON-RR''';
COMMIT;

FOR i IN (Select reportid from status_table where reportname = <Report Name> and status = 'SCHEDULED' and *NextRunDate <= SYSDATE*)

LOOP

  l_query := l_QueryFromTable;

Select (NextRunDate) into lv_NextRunDate from status_table where reportname = <Report Name> and status IN ('SCHEDULED');


Execute immediate 'ALTER SESSION SET NLS_DATE_FORMAT =''MM/DD/YYYY HH24:MI:SS''';
COMMIT;

-- Then start the export program......

End Loop;
The code above worked perfectly well, but it has stopped working suddenly. I added TRUNC selecting them in the table, and then by comparing the dates. It's working now.

Now, it is;

How does the code no longer works which was working fine before? It happens because 'nls_date_params' being altered?
Is solution TRUNC solves my problem permanently?

Please let me know.

Thanks and greetings
Nana Akkivalli.

could you be more specific on what exactly "stopped working" means?

Was it wrong? It was simply not up all the data in the cursor that you open?

as long as NextRunDate and lv_nextRunDate are real and not varchar2 dates and data are correctly configured (I can't see the definition of your table or your data) then nls_date_format changes shouldn't affect anything.

As a general rule, you should never write code that depends on the session variable NLS_DATE_FORMAT - always treat dates as dates, never as a varchar, except if you decide to display it or converting a string to a date, then you must indicate the exact format the date is explicitly using the format of the functions to_char() and to_date() mask parameter.

Published by: WhiteHat on December 12, 2011 15:20

Tags: Database

Similar Questions

  • How to convert pdf file to excel by using the export program?

    I BOUGHT THE EXPORT PROGRAM AMD TRIED THE COMVERSION.  I JUST BOTH IN EXCEL ANDD WORD RAGTIME.

    SHOULD WHAT PROGRAM I USE TO GET A SUCCESSFUL CONVERSION?

    PDF to Word, Excel or any other format conversion is one of the most complex things, you can try to do it with a PDF file. It works very well in some cases, in other cases, the output doesn't have much to do with the original file. The key to success is that the PDF file must be "marked" - which means that it contains information about the information displayed in the file. The best way to ensure that a PDF file is properly tagged is using the PDFMaker in Acrobat to create PDF from Word or Excel file (this is the Acrobat Ribbon or toolbar).

    Unfortunately it is not that you can do to improve the output without spending a lot of time (for example manually tracking file). In addition, because you use Adobe ExportPDF service and do not have access to Acrobat, it is even not an option.

    The only thing you can do is complain to the original author of the file and tell them that they used a PDF generator bad to create the PDF file.

  • How to disable the stop "the following programs are still running" screen?

    When restarting or stopping of Vista, I show the "continue to run the following programs:" a black screen with the list of programs that have not stopped yet.

    If any program has invited me for an action that would allow it to close, I can't treat the guest once the screen black "always running programs" Vista has developed.

    Behavior of XP was fine, as it leaves me not process request messages as they came. Bevahiour of Vista crashes me to do this. Is there an option or setting registry somewhere which will stop at this screen appear during the process of start/stop? jcairney

    Hello jcairney,.

    Thank you for using Microsoft Vista answers Forum!

    I well recommend individual cessation program before you shut down or restart Windows. If you encounter a problem occurred a program / a particular application, you can must publish return details about the program and we will be able to help others on the issue. In the meantime, try to perform a clean boot to make sure there is no interference or conflict with any program or your PC causing a program is not shut down properly. For more information about how to clean boot, use this link

    http://support.Microsoft.com/kb/929135/

    If please reply and let us know if your problem is resolved or if you need more help.

    David O
    Microsoft Answers Support Engineer
    Visit our and tell us what you think.

  • Windows 7 Enterprise 64-bit has a record of program data as well as the two program files folders?

    Just got a Windows 7 Enterprise 64-bit installation business, I noticed that some Instalss did not work properly. I noticed two folders in program files, I know are there for 32 and 64-bit programs, but I don't have a program data folder as I did when I got Windows 7 Enterprise 32-bit

    Yes, you need to them.

    Programs of data - stores data in your applications.

    Program Files (x 86) - stores your 32-bit applications

    Program file - store your 64-bit applications.

    This is only on 64 bit versions of Windows.

    Its ok, so leave it alone.

  • How to stop the Magnifier program activation at startup

    original title: I want to delete a "program".

    Forgive me for the use of terms laymans.

    Today, I see that on a user account Magnifier is activated at startup (log - on). I don't know how to make this stop. I tried to do something and got a message saying "disable permissions that inherits. I have some research here and "done something" according to a help page for Windows XP. I probably did more harm than good.

    I would like to delete the program, but it is not listed in Add/REMOVE programs (or is to REMOVE/CHANGE).

    Should I just delete the user account and start over?

    In addition, it is a fact that Vista does not automatically like XP restore points don't? Under Vista you must manually perform a restore point? In other words, on the XP computer I go to system restore and try to fix this mess. On Vista, I have found that "system restore." I have found where it is said today to a restore point, can not choose 3 days ago... because I have no previous restore points. I so widows updates

    We just got this PC and I am trying to set up for the family.

    Thank you.

    Go to start / Control Panel / ease of Access / facilitate the expect to see / and uncheck the box to turn on the Magnifier.  If this resolves the problem in this account, go to start / search box and type msconfig.exe and enter and then double-click on the program icon that appears.  Go to the starup tab and see if something related to ease of access or your magnifying glass is included - if so, uncheck the box to prevent it from running at startup and that should fix the problem.  If you can't find any such program, go to the services tab and look for the same thing.  If you uncheck the box, so it does not start at startup and that should fix the problem.  Here is an article on how to disable the Vista Magnifier that should work in the world and for all accounts: http://www.vistax64.com/tutorials/125037-magnifier-turn-off.html.  I suspect that this will do the trick.

    If none of these options works, you can always consider the account as a corrupt user profile and fix it usinghttp://windows.microsoft.com/en-AU/windows-vista/Fix-a-corrupted-user-profile.

    =============================================================================================================================

    Like XP, Vista DO restore points do auto - there just need to be told to do. http://www.Vistax64.com/tutorials/169523-system-restore-task-change-automatic-restore-point-schedule.html orhttp://www.howtogeek.com/howto/windows-vista/change-how-often-system-restore-creates-restore-points-in-windows-vista/ (this second one is a little easier to follow).

    To find the system restore, go to start / Control Panel / backup and Restore Center / and to the left are two options - one to do a system restore and the other to create a restore point or change the restore point settings.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Date field issue - before the previous dates only

    I would like a date field where the user must enter a date that is at least 1,095 days (3 years) before today's date.

    Yes, you dateToday variable does not need to have the Date2Num function, as I said, Date() returns the same value that Date2Num would be

  • How to stop the Setup program for Windows Search?

    Downloaded Windows Search.  Don't want to install it.  How Setup is stopped?

    Press cancel or wait until it's done, and then uninstall it.

    Uninstall an update: http://www.vista4beginners.com/How-to-uninstall-Windows-Vista-updates

    I hope this helps.

  • The Electronic Program Guide (EPG) for Windows Media Center stopped display information guide

    The Electronic Program Guide (EPG) for Windows Media Center stopped display guide information beginning January 1, 2013 in the United Kingdom and Ireland.

    Microsoft is aware of the issue with the Electronic Programming Guide for Windows Media Center in the United Kingdom and Ireland.  We have identified the cause and have already deployed a fix for the United Kingdom.  A solution for the Ireland is being prepared and we will post an update when the problem is resolved.

    We apologize for the inconvenience to Windows Media Center users in these countries.

  • I get this message - internet Explorer - data execution prevention has stopped the program

    I get this message - internet exployer - data execution prevention has stopped the program and it freezes

    Hello

    EricLaw IEInternals - a peek at Internet Explorer from inside. -Understanding DEP/NX
    http://blogs.msdn.com/ieinternals/archive/2009/10/10/understanding-data-execution-prevention-crashes-in-IE8.aspx

    The problem might actually be an add-on or another program to the origin of the problem and you should check that
    1st.

    What antivirus/antispyware/security products do you have on the machine? Be one you have NEVER on it
    machines, including those that you have uninstalled (they leave leftovers behind which can cause strange problems).

    Start - all programs - Accessores - system tools - IE with no Addons - does this work better?

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security - reset all Zones by default level - apply / OK

    not better?

    Close IE and try again IE or IE with no Addons

    IE - tools - manage Addons (for sure disable SSV2 if it is there, it is no longer necessary but Java always install
    "(and it causes problems - you never update Java to go back in and turn it off again)." Search for other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look right. Permit
    are usually OK and "unauthorized" are not always bad. If in doubt about a program to ask about it here.

    Could be that a BHO - BHOremover - free - standalone program, needs no installation, download and run - not all
    are bad, but some can cause your question. (Toolbars are BHO)
    http://securityxploded.com/bhoremover.php

    Startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Also get Malwarebytes - free - use as scanner only. If you ever suspect malware, and it would be
    unusual with Prevx market except for an occasional cookie of low level (not a big deal), update it, then
    run as a scanner.

    http://www.Malwarebytes.org/

    I would add prevx so.

    Prevx - Home - small, fast, exceptional CLOUD free protection, working with other security programs. It comes
    a scan only, VERY EFFICIENT, if it finds something to come back here or use Google to see how to remove.
    http://www.prevx.com/

    PCmag - Prevx - Editor's choice
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    -------------------------------------------------------------------

    Do yourself a big favor and work through 1 above.

    How control DEP but I don't recommend turning it off and certainly not to let power off.

    How to enable DEP on or off for a program under Vista
    http://www.Vistax64.com/tutorials/65790-DEP-turn-off-programs.html

    How to enable or disable DEP in Vista
    http://www.Vistax64.com/tutorials/120778-DEP-enable-disable.html

    ====================================

    If nothing else works you can try this however I would use as a last resort.

    IE - Tools - Internet Options - Advanced Options - Security Section - clear the check box enable memory Protection to mitigate
    Online - APPLY - OK attacks close and restart IE

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • Save data in Excel, while the program continues to flow

    Dear community Labview,

    I am in charge to create one based on the acquisition of data (RPM, power, torque, pressure, temperature) program which should, among other things, to connect its measurements in excel. I had no problems to create the journal itself, however, I still have a problem: I'm supposed to implement a function whose task is to save these values while you press a record button down and stop recording once a stop button is pressed. The program is not supposed to stop running - it stores data of a running engine, and the only time where the program is supposed to be stopped is when we stop the engine.

    Now, I tried several ways to implement, but have failed so far, get the error 2146827284 to undefined location (an error in excel functions, it seems). The ways I've tried:

    • Flat sequence structure, first performing the writing to Excel, then stop logging in the VI collector, then record/stop reset to the original values.
    • Writing to Excel, then taking a Boolean result from the structure of the case where the entry is made and feeding it back to stop logging and the initials reset buttons.
    • I have an idea of the break from the while loop when saving files / creation is done, but I don't know how to implement, especially if it does not interfere with the work of acquiring data on the acquisition.

    I tried to include a Lite version is the most of the VI troubleshooting easier for one who is willing to help me. Recorded in LV2012, I think this is the first version that supports excel features that I put in place.

    Included are the VI, and the very basic excel template that I use for this test.

    Thank you for your attention, and I hope that I didn't offend anyone with any ignorance that may introduce the VI. I'm rather new to Labview.

    Hi, there are many things to improve. One thing that can solve your problem quickly is to change the mechanical action of the "stop recording". Currently, it is set on "change when you press on. You want a locking mechanism, so it only exports the data once. Try "lock when released. As it is right now, as soon as you click "stop recording", he tries to write and re - write and rewrite your Excel sheet as quickly as the main while loop will allow it. Change it to lock so he writes only once.

  • Subvi in the main program output data

    Hello

    I'm trying to export data from sub - VI for the main program in real time. But I found the value may be filed only when the Subvi is finished.

    I'm doing some research and I think that using the queue is the best, but the global variable. You can all give me some tip on queue using to transfer data from sub - VI for the main program in real time?

    Thank you!

    No problem.

  • How to stop the red symbols to appear when I use the question mark, the apostrophe and slash keys. This only happens in my e-mail program.

    How to stop the red symbol to appear when I use the key question mark in my e-mail program.

    HI Julie Delany.

    1. for how long are you facing this problem?

    2. is there any changes made prior to this issue?

    3. may I know what mail client do you use?

    Disable the function key (lock) and then check

  • Tutorial: how to stop a loop 'while' Subvi, which within the main program loop 'while '.

    Hi ppl,

    I searched through the forum on the topic above, but still don't know how to do this. Maybe one of you can post the solution of this important issue.

    I have attached a very simple program: I've done a few while loop as a main program and Subvi as a post-secondary program. Inside the Subvi also manages some while loop. All I want to do is to push the stop button in the main program that will stop the while loop in the second channel; to create a kind of judgment of reference in the main program which influence only the stop button on the Subvi. During this time the loop of the main program will still work.

    Thank you.

    I modified the code that you have joined. check.

  • Upgrade to the new program bitdefender antivirus protection issues and make it load completely on my laptop.

    Original title: Windows Vista vs Bitdefender

    I have improved my protection to the new program of bitdefender antivirus and I have problems make him load completely on my laptop. I have it loaded on the other 2 computers, both with vista, without a hitch. I've installed, uninstalled and reinstalled several times all with the same results. It load, takes the safety relay all the settings like his work, but I can't access the program. As lond as I leave my com.running settings in Security Center: bitdefender is running and up to date. If I restart my com Bitdefender stops, extinguish all my security settings.

    Said BitDefender.com I have Windows Live running and it prevents the program from load correctly. I have uninstalled LIVE from my laptop I did NOT on the other 2. I searched my computer any other running programs migth as and have found none. No adware, no Malware, nothing else that he still does not load. Any ideas?

    Hi Harold,.

    It seems that the system still has traces of the other anti-virus program.
    If you still have problems with the installation of the new anti-virus, you can contact the Bitdefender for assistance:
    http://www.BitDefender.com/support/consumer.html

  • How to stop the mail always program download the messages recovered.

    Windows Mail recovered messages

    Necessary to recover some old messages that were deleted by mistake.  I get them, but now every time I open my email software (Windows Mail) each message recovered, as well as date retrieved, opens upward in new records.  How to stop the mail always program download the messages recovered.  Thanks for any help.  He got more frustrating.

    Try to compact and repair the database (see www.oehelp.com/WMUtil/) and see if that fixes it.

    Steve

Maybe you are looking for

  • Computer HP laptop 17-f114dx: Hp laptop 17-f114dx

    I forgot my power on password of administrator I get a disabled system code 63733760 is anyway to enter into my computer, I don't have anything about it I need, I have not used in about a year.

  • Can I install 4 GB of RAM in my Satellite A100-033?

    I have a Satellite A100-033 (PSAANE-03J02GEN). The manual says that it will support only 2 GB of RAM. Does anyone know if it will support actually 4GB? I installed 2 x 1 GB instead of the supplied 2x512MB and am trying to install 2 x 1 GB? It will wo

  • Re: How to upgrade the memory on Equium U300-15I

    I've searched the forums and yes I found the son with Assembly instructions, but I do not have a manual for my laptop bought recently renovated.My problem is to determine which cover to locate the memory slots. I have 4 GB custom which should arrive

  • service pack for windows 7__

    Hello, I have windows 7 and I wanted to ask, if they are a service packs windows 7 enemy... If anyone knows please help me... Sorry for my bad English...

  • Try to uninstall iTunes

    Impossible to uninstall itunes - error tells me that I do not have this server network. I have all the steps up to 9 completed & will try that next, but still waiting for a response! I can't uninstall or reinstall QuickTime or iTunes. I am running Wi