When reading from the file validate the date  'DD/MM/YYYY'  format

Hi,
reading from the file ,validate the date format 'DD/MM/YYYY'.
Thanks & regards
venkata

I suppose that you are writing a program in some programming language, probably PL/SQL. So, you can use TO_DATE function and handle the exception when it occurs.
create or replace procedure tstdt
as
  stdt varchar(10);
  dt date;
begin
  stdt := '20/10/2006';
  dt := to_date(stdt);
   dbms_output.put_line('date is correct
exception
when others then
  dbms_output.put_line('Invalid Date');
end;[],
Miguel

Similar Messages

  • Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.

    Hi All,
    I am trying to add a new task to a Tasks list called CATasks. The list was created via Visual Studio “Add > New Item > List” process and not by custom code. The code I am using to add a task is shown below.
    What I have noticed is if I use my code to add a Task to a Task List created by Visual studio “Add > New Item > List” process, I get an error. Error message when adding an item:
    Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
    But if I create the same list using custom code I don't get an error.
    Am I missing something in my custom code or is this a bug?
    I hope you can help.
    CEStar
    App.js Code:
    function createItem() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/?$select=Title,CurrentUser/Id&$expand=CurrentUser/Id",
    type: "GET",
    dataType: "json",
    headers: {
    Accept: "application/json;odata=verbose"
    call.done(function (data, textStatus, jqXHR) {
    var userId = data.d.CurrentUser.Id;
    addItem(userId);
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function addItem(userId) {
    var due =
    new Date();
    due.setDate(due.getDate() + 7);
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/getByTitle('CATasks')/Items",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.Data.CATasksListItem" },
    Title: "Sample Task",
    AssignedToId: userId,
    DueDate: due
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var div = jQuery("#message");
    div.text("Item added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function failHandler(jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    Create List Custom Code:
    function createList() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.List" },
    BaseTemplate: SP.ListTemplateType.tasks,
    Title: "CATasks"
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var message = jQuery("#message");
    message.text("List added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thanks 
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Using servlets to read from text file and insert data

    Hi,
    Can I use a servlet to read from a space delimited text file on the client computer and use that data to insert into a table in my database? I want to make it easy for my users to upload their data without having to have them use SQL*Loader. If so can someone give me a hint as how to get started? I appreciate it.
    Thanks,
    Colby

    Create a page for the user to upload the file to your webserver and send a message (containing the file location) to a server app that will open the file, parse it, and insert it into your database. Make sure you secure the page.
    or
    Have the user paste the file into a simple web form that submits to a servlet that parses the data and inserts it into your db.

  • Dynamically create variables when read from txt file

    hi,
    need a little help on this one.
    im reading in the name of user defined classes from a text file into a string array. once i have them all read in i want to be able to declare instances of each class, but how?
    i have the string array with the names and i know that il have to use a loop with a counter to give each instance a unique name but im stomped on how to do the rest.
    anyone have any ideas?
    many thanks in advance.

    im getting it in the following line:
    Class cls = Class.forNames(behList[ i ]);
    behList is a list of names, im trying to loop through
    it and create an instance of each object in the list
    using
    Object x = cls.newInstance();
    but it never gets to this line cos of the top one.
    any ideas?stupid bb codes...
    now are you sure you got that error by java and not Eclipse(or another IDE)
    cause afaik, if the VM cant find the class, it will throw a ClassNotFoundException...

  • Read from txt file and analyse data

    hi,
    i am having a problem for reading data from a text file and checking whether it is a integer or not.
    basically if i have a txt file with the following content:
    12 45 345 500 45.67684 33
    my output should be:
    12 45 345 500 invalid 33
    that means if there is a integer number in the file, the integer number will be printed on the screen BUT if there is anything else like a string or a double number, then "invalid" will be printed.
    how can i check what kind of datatype it is??
    i have the following code to start with:
    try
                BufferedReader in = new BufferedReader(new FileReader(FileName));
                String l = in.readLine();
                in.close();
            catch(IOException e)
                System.out.println("IO error");
                System.exit(0);
            }

    ok i have tried the following code:
            int index = 0;
            String[] arr = null;
            int nb = 0;
            try
                BufferedReader in = new BufferedReader(new FileReader(nameFile));
                String line = in.readLine();
                arr = line.split(" ");
                for(int i=0; i<arr.length; i++)
                    index = i;
                    nb = Integer.parseInt(arr);
    System.out.print(nb+" ");
    in.close();
    catch(IOException e)
    System.out.println("IO error");
    System.exit(0);
    catch(NumberFormatException e)
    System.out.print("invalid ");
    for(int j=index+1; j<arr.length; j++)
    nb = Integer.parseInt(arr[j]);
    System.out.print(nb+" ");
    which works perfectly fine for the following scenario:
    txt-file:
    12 45 345 500 45.67684 33
    output:
    12 45 345 500 invalid 33
    but what, if I have the following data in my txt file:
    12 45 345 500 45.67684 33 23.234 21
    then the output should be:
    12 45 345 500 invalid 33 invalid 21
    how can i solve this???

  • How do i do the replacement by reading from a file ?

    The multibyte representation in cloumn 2 in the input file is encoded in UTf8 format.
    I have the code to get the code point value from a multibyte representation.
    But i am not sure how to do the same when reading from a file.
    A better explanation of the requirement is like this,
    I have a java program ,i have a String="test";
    I traverse the string
    on encountering the character 't' i read from the input file ,the input file has the characters m to z listed in it, and it also has the UTF8 encoded multibyte representation in it.
    I then read from the file
    I search the file to get he character 't'
    on gettin the character 't' i get the corresponding multibyte representation from the input file
    Then i get the unicode code point value for the multibyte representation that i got from the input file.
    Lastly i replace the character 't' in the string with the unicode code point value 3046
    Hope the requirement is clear
    Please do help
    Any help would be very useful
    Thanking you
    khurram

    I am still not sure as to what your problem is. It would be better if you specify as to where the problem lies in the steps that you have stated and ask for a solution.
    agar yeh homework hai to log yehan par isse appreciate nahin karte. Acha hota agar requirements ki bajai problem discuss ki jati.

  • "Read from Binary File" and efficiency

    For the first time I have tried using Read from Binary File on sizable data files, and I'm seeing some real performance problems. To prevent possible data loss, I write data as I receive them from DAQ, 10 times per second. What I write is a 2-D array of double, 1000 data points x 2-4 channels. When reading in the file, I wish I could read it as a 3-D array, all at once. That doesn't seem supported, so I repeatedly do reads of 2-D array, and use a shift register with Build Array to assemble the 3-D array that I really need. But it's incredibly slow! It seems that I can only read a few hundred of these 2-D items per second.
    It also occurred to me that the Build Array being used in a shift register to keep adding on to the array, could be a quadratic-time operation depending on how it is implemented. Continually and repeatedly allocating bigger and bigger chunks of memory, and copying the growing array at every step.
    So I'm looking for suggestions on how to efficiently store, efficiently read, and efficiently reassemble my data into the 3-D array that I need. Perhaps I could simplify life if I had  "write raw data" and "read raw data" operations that write and read only the numbers and no metadata.then I could write the file and read it back in any size chunks I please -- and read it with other programs besides. But I don't see them in the menus.
    Suggestions?
    Ken
    Solved!
    Go to Solution.

    I quote the detailed help from Read from Binary File:
    data type sets the type of data the function uses to read from
    the binary file. The function interprets the data starting at the current file
    position to be count instances of data type.
    If the type is an array, string, or cluster containing an array or string, the
    function assumes that each instance of that data type contains size information.
    If an instance does not include size information, the function misinterprets the
    data. If LabVIEW determines that the data does not match the type, it sets data
    to the default for the specified type and returns an error.
    So I see how I could write data without any array metadata by turning off "prepend array or string size information", but I don't see any way to read it back in such bare form. If I did, I'd have to tell it how long an array to read, and I don't see where to do that. If I could overcome this, I could indeed read in much larger chunks.
    I'll try the auto-indexing tunnel anyway. I didn't tell you the whole truth, the 3-D array is actually further sliced up based on metadata that I carry, and ends up as a 4-D array of "runs". But I can do that after the fact instead of trying to do it with shift registers as I'm reading.
    Thanks,
    Ken

  • I am getting "a network error occurred while attempting to read from the file c:\windows\installer\itunes.msi" when I attempt to download itunes, can someone help me with this?

    I am getting "a network error occurred while attempting to read from the file c:\windows\installer\itunes.msi" when I attempt to install itunes.  Can anybody help me to resolve this issue?

    You can try disabling the computer's antivirus and firewall during the download the iTunes installation
    Also try posting in the iTunes forum since it is not an iPod touch problem.

  • When I try to install Itunes, I get this error: (translated from Norwegian) There was a network error while trying to read from the file: C: \ windows \ installer \ iTunes.msi I have tried many times to reinstall, but nothing helps, please help me.

    When I try to install Itunes, I get this error: (translated from Norwegian) There was a network error while trying to read from the file: C: \ windows \ installer \ iTunes.msi I have tried many times to reinstall, but nothing helps, please help me.

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Windows Easy Transfer (WET) Issues with External Hard Drive - "Can't read from the source file or disk"

    I work for Office Depot, in the tech department. Basically, one of our associates was supposed to do a data backup, and re-install Windows 7, then transfer the files back. He used Windows Easy Transfer and compacted everything into a 163 GB file. 
    Now comes the hard part. When we try to put it back on his computer ((drag-and-drop to the desktop) which has been wiped back to factory settings using the recovery partition), it stops at 79.5 GB remaining (you know how it doesn't give you a % of completion,
    it just shows how many GB are remaining) and then says "Can't read from the source file or disk" and gives you an option to try again, or cancel. It gets hung up on the same point each time.
    Normally, this wouldn't be a huge issue, but the contents on the drive are his wife's architect blueprints and interior design stuff, along with wedding photos, etc, which are the only copies they have. On top of those, they have court documents and other
    important files that we are unable to access now.
    I wasn't involved with this transfer, so I'm trying to clean up the mess as best I can. I remembered that the customer's wife was Russian, and had some files typed with a Russian keyboard, so on and so forth. I wonder if that's the issue? If not, I really
    have no idea how to manually extract things from a ".mig" file, or how to diagnose what area is potentially corrupted.
    In light of this situation, we tried using "Recuva" to recover the files post-wipe, but everything was corrupted or unable to be opened, and it also extracted and recovered all of the "useless" photos, such as the skype logos, up and
    down arrows for browsers, etc (it was 160,000+ photos).
    Trying to avoid a potential lawsuit, unhappy customer, and costing the company lots of money to see if professionals can get into this external hard drive.
    Other relevant information:
    We used a Toshiba 500 GB (465 GB) external hard drive.
    Customer's computer is an HP Pavilion P6000 Series (Model No. p6520y) running Windows 7 Home Premium 64-bit Service Pack 1.
    Any other information that is needed can be provided, thanks in advance, and hopefully we can find a solution to this issue quickly!
    -John

    I think there's a lack of understanding somewhere.
    "If you even can't start the process, please unplug it from your new PC. Then head back to your new computer and plug
    the external drive back in to your new computer. "
    Unplug from new, head back to new, plug it back in? That doesn't make much sense! Haha.
    I knew what you meant though, somewhat. When I search through the drives after clicking yes (Has windows easy transfer
    already saved your files blah blah blah) I click on the transfer file and it says "Windows Easy Transfer could not open the file".
    Rather than drag-and-drop the file to the desktop, I now tried to double-click on the file itself while it was plugged
    into the computer. It opened, and it started transferring until it was about 70% completed, and then an error popped up saying "WET can't open the easy transfer file, make sure your USB device is plugged in or check your internet connection". 
    I checked, and the USB hard drive's light wasn't on. Now, I unplug it and plug it back in, and the light comes back on,
    so I click Retry, and it resets the bar back to nothing and says "Transfer time: 1 minute".
    Rather than continue trying, I clicked "Cancel" instead of Retry, and it says "Your transfer did not complete successfully."
    It says to click "view report" for more information, but there's no "view report button".
    At the moment, I am scanning the External Drive for bad sectors using the check disk tool in properties. It's frozen
    at "0 USN bytes processed".

  • When I tried to open Lightroom 5.4 today I got a msg that says "Lightroom encountered an error when reading from its preview cache and needs to quit. Lightroom will attempt to fix this problem the next time it lauches". What do I do? I get the msg each ti

    "Lightroom encountered an error when reading from its preview cache and needs to quit. Lightroom will attempt to fix this problem the next time it lauches". What do I do? I get the msg each time I try to open it.

    It isn't a file, it's a folder. It will have the same name as your catalog, but will have the extension data. It will be in the same folder along with your catalog. If you need to use the search feature to search for *.lrdata.

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • Read from .txt file and output the content as two arrays

    I am using the contoured move to control the x-y stage. The trajectory datas for x and y axis are generated using my interpolation program and it is stored in a .txt file as two columns. What I want to do is read .txt file and output the content of this file as two arrays. Is there anyone has any ideas? Thanks, the .txt file is attached.
    Attachments:
    R.75.txt ‏172 KB

    Hi Awen,
    This is quite easy to do, you can merely use the "read from spreadsheet file" function to get a 2D array (2 columns and n rows) and then use the index array function to get whatever row/colums you want..
    Hope the attached VI helps you
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    read sprdsheet file.vi ‏27 KB

  • Read from spreedsheet file dont read the file correctly

    Hi, i have the problem that i want to show my voltage output (4 channels) on a graph, by saving the data (the saving process is in a SubVI) on the PC  and reloading it in the mainVI when all actions are done. If i open the file with a editor, like UltraEdit, the data looks right, but on the graph, some parts of the voltage output are shown wrong (as vertical instead of horizontal line)... Anyone got a idea why? or how to fix it?
    Thanks and greetings (and sorry for my bad english ) Mari0
    attached:
    -example voltage output (.lvm)
    -code extract (.vi)
    -picture with wrong parts (.jpg)
    Attachments:
    VoltageOutputReload.vi ‏22 KB
    SignalOutput.txt ‏4044 KB
    New Bitmap Image.jpg ‏1219 KB

    First, let's get the chastizing out of the way:
    Was it really necessary to upload a 4 MB text file as is? Ever hear of compression?
    DO NOT UPLOAD BITMAP FILES OR CHANGE THE EXTENSIONS TO GET AROUND THE BAN ON BITMAPS. THERE IS A REASON THE BAN IS THERE.
    I don't understand what your VI's purpose is. Why are you continuously reading the file in a loop? Is this something you created on the fly for demonstration? If so, the Read From Spreadsheet File needs a True wired to the transpose? input. The graph is showing you exactly what's in the data file. Look at your data. At line 66100 it jumps.
    NOTE HOW I DID NOT UPLOAD A BITMAP.

  • After updating I ended up with 4 icons on my desktop - I cannot delete any of them. The error message reads; "Cannot read from the source file or disk".

    I updated from the original version to 6.0.1 and when I re-started FF there were 4 icons on my desktop. I managed to delete one of them, but I cannot delete the other two - to leave me with just one.
    I get the error message of "Cannot delete file: Cannot read from the source fie or disk".

    Here's the meaning of the error that you received.
    "An error has occurred. ERROR :10-FC06-0002" -- may be caused by damaged recovery media or faulty hard drive"
    Possible that the problem is on the recovery also.
    Hope this helps.

Maybe you are looking for

  • Transactional WebService, non-XA problem

    I have build a transactional web service and it is working fine on if the client and service are on same domain. If they are not am getting the following error: Exception thrown from bean; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink

  • Error taking CR2 image to Photoshop CS2

    Using LR v1 & WIn XPPro Am in the develop module, click on Ctrl E, In the pop up the only option I have is Edit a copy with Lightroom adjustments, click on Edit & a 2nd window saying "Lightroom was unable to prepare the selected file < filename> for

  • Oracle 11gR2 install query

    I have downloaded the Oracle 11g Release 2 form the Oracle website for installation. Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (x64) win64_11gR2_database_1of2.zip (1,213,501,989 bytes) (cksum - 3906682109) win64_11gR2_database_

  • Data Transfer / Communication between Live Applications

    Gurus, I am basically an E-Business Sutie Developer. This is my first experience posting questions in Application and Architecture community. Please read the following and let me know if this is the correct thread to post this question also it would

  • Cross company code

    Hi to all nice to meet u Plz clarify my doubt any one What is difference between inbound delivary and out bound delivary. thank u