Parse the right Date

Hi,
at first, sorry for my bad english,
now the problem:
I have to prevent the users to type in
a wrong date in my textfield;
Example: a user typed in 31.02.01, I try
to parse it into a Date and expect an
Exception, because in February there
are never 31 days. Instead I get the
third march.
Is there a workaround for this task?
Thanks for help!

Try this...
Calendar calendar = Calendar.getInstance();
calendar.setLenient(false);
calendar.setTime(yourDate);
This throws a runtime exception.
setLenient prevent you as you expected.
Use calendar.getTime() to get the date.

Similar Messages

  • Unable to open some psd file -   "could not complete your request ,unable to parse the path data"

    Hi I am unable to open some psd file that i created . I get this message "could not complete your request ,unable to parse the path data"  I am curently using cs6. Any idea how to fix it. I tried opening on other computer with photoshop but no luck yet.

    Is Vista a supported CS6 system????
    Photoshop CS6 / Tech specs
    System requirements
    Windows
    Intel® Pentium® 4 or AMD Athlon® 64 processor
    Microsoft® Windows® XP with Service Pack 3 or Windows 7 with Service Pack 1. Adobe® Creative Suite® 5.5 and CS6 applications also support Windows 8. Refer to the CS6 FAQ for more information about Windows 8 support.*
    1GB of RAM
    1GB of available hard-disk space for installation; additional free space required during installation (cannot install on removable flash storage devices)
    1024x768 display (1280x800 recommended) with 16-bit color and 256MB (512MB recommended) of VRAM
    OpenGL 2.0–capable system
    DVD-ROM drive
    This software will not operate without activation. Broadband Internet connection and registration are required for software activation, validation of subscriptions, and access to online services.† Phone activation is not available.

  • Problem parsing the path data

    I am trying to open a PSD doc in Photoshop CS3 and I am getting an error: problem parsing the path data. Is there any way around this?

    Is the icon really an alias? Aliases have a hard-to-see arrow in the lower left corner. If you click once on the icon and do a Get Info, you'll be told if it's an alias, and if so, where the original is, or once was if the original is gone.
    Following Ramon and Buko's advice, I got rid of Norton products and several minor irritations at the same time.
    --Gene

  • Problem parsing the path data - error on jpgs

    Photoshop CS2 v9.0.2 Windows XP SP2
    Received the following error message in CS2: "Could not complete your request because of a problem parsing the path data"
    I began getting the message above after adding ITPC data to three .jpg files. The message appears when I try to open the files from either Bridge or Windows Explorer. Other files are not affected. The .psd master file with the same metadata opens ok. I tried clearing the ITPC data, but this had no affect. I also tried moving the file to a different folder and renamed the file with no success. The files open ok in Windows Paint and appear ok in Bridge.
    I created the ITPC data on one file in Photoshop and saved a metadata template. Then, in Bridge 1.0.4.6 I used the "replace metadata" command on the other two files.
    I searched the knowledge base and this forum. I found only one hit in the forum from 2007, but there were no responses.
    Can anyone describe what triggers this message, and how to avoid it or fix it?
    Thanks

    Foward / backward slashes should not cause issues, as they are part of the standard character set on any system for obvious reasons, but I would more assume that this is an issue in how Windows translates the file info to native paths and tries to access those paths for verification. I seem to recall having read something along those lines recently in relation to some security issues, but I'm not really sure. anyway, does "escaping" the characters improve the matter (\\ or \/)?
    Mylenium

  • When I set the right date, it blocks my yahoo mail

    My date time is one day ahead, when i set the right date, my yahoo mail gets crazy and stop sending mails. 

    It would be best to respond to [email protected] as I can't get to me regular e-mail.
    Jim Wolf

  • Parsing the respective data in the String which is dynamic

    Hi,
    I have customer application, in which we are handling the validation for customer details through a custom validator
    For example, if I have not entered the mandatory value for custFirstName.I will get an error message in my java class as below:-
    String errMsg = "Required value missing for CustomerVO.custFirstName"
    Here I need to parse the error message (ie) I need only the field and VO which causes this error hence i need "CustomerVO.custFirstName" only
    so that I can write the code to set the value for custFirstName
    Like
    if (mandatoryErrMsg){
    //parse the errorMsg and get the respective field with VO (ie)CustomerVO.custFirstName
    //and set the value
    CustomerVO customerVO = new CustomerVO();
    customerVO.setCustName("xxx");
    save(customerVO);
    Like wise i will get a different field with different VO
    Like :-
    String errMsg = "Required value missing for AddressVO.State"
    Here I need to write a generic method which parse the only the respective VO and field like in this case AddressVO.State.
    Since the VO and field can be anything. What is the min and max limit we need set for parsing and hoe we can parse only the
    respective VO and field. please provide your opinion on this.
    Thanks.

    Ram wrote:
    As per your previous post, it seems you need to parse only the last word of the error message. You can easily get the last word of the error message by using substring and lastIndex() methods.
    For example,
    String errMsg = "Required value missing for CustomerVO.custFirstName";
    String lastWord = errMsg.substring(errMsg.lastIndexOf(" ")+1);You will get "CustomerVO.custFirstName" as the value for lastWord. Now you can easily split the value String.split() method by "VO." as delimiter.
    lastWord.split("VO.");
    That's one possible approach. Without knowing more details about the forms the error message can take, we can't know if it will work in all cases. Which I pointed out in my first response, and which the OP chose to ignore when demanding we solve his problem for him in his reply.

  • Not reading the right data value

    So I am reading data from a txt file that I created,in particular I am trying to pull out the first column which is the time data.  When I read it using the "Read from spreadsheet file.vi" I am getting unexpected values. For example when the first value in the file is 1491.044016 it displays 1491.044067, it does this for every value? I thought it may have been a formating issue but I set the vi %.9f on the formating field I'm not sure why it is handling the values this way? Any insights?
    thanks,
    Chris

    Are you using LabVIEW 7.1 or older? In this case, "read from spreadsheet file" uses only SGL precision, which is not sufficient for your desired resolution.
    See also: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=315189#M315189
    Solution: Read the file as a plain string and then use "spreadsheet string to array" with DBL as type.
    ... or upgrade to LabVIEW 8.0 or higher.
    LabVIEW Champion . Do more with less code and in less time .

  • Q:Date link not getting the right date in calendar

    Gang,
    I have enabled the day link on my calendar so the user can click on the date in the month view to get to a form page where they can add records.
    My day_link looks like this:
    f?p=&FLOW_ID.:2:&SESSION.::&DEBUG.:2:P2_TRAINING_DATE:#TRAINING_DATE#
    Where P2_TRAINING_DATE is the DATE I'd like to populate on page 2. The variable name that holds this date is called P2_TRAINING_DATE.
    If I hoover over the daylinks they display very strange dates and also if I click on the link the dates are wrong. For example if I hoover over 01-May the URL in the bottom of my browser displays the correct date but if I hoover over 02-May it displays 05-May instead.
    What am I missing, should I not use the #TRAINING_DATE# variable?
    Oh, this application is running on apex.oraclecorp.com so it's version 3.1.
    Cheers,
    Andy

    Hi Andy,
    Change the day link to pass #DD#/#MM#/#YYYY# (UK format, so change if another format is required).
    This will pick up the date from the calendar rather than your data.
    Andy

  • Clipboard not copying the right data

    Hi All,
    I have a JTable which displays different objects in different rows. I am trying to implement the copy paste function so that the user can do CTRL+C and paste the data in an excel spread sheet. Initially I implemented the toString method for all the objects that the table displays. But, I had to modify the copy functionality, so that, for each table row, 2 excel rows can be generated. This is how I do it.
    private StringBuilder getTableData(){          
              StringBuilder sb = new StringBuilder();
              int columns = table.getColumnCount();
         int rows = table.getRowCount();
         StringBuilder row1 = null;
         StringBuilder row2 = null;
         Object value = null;
         for(int i = 0; i < rows; i++) {
              row1 = new StringBuilder();
              row2 = new StringBuilder();
              for(int j = 0; j < columns; j++) {
                   if(table.getModel().getValueAt(i, j) != null){
                        value = table.getModel().getValueAt(i, j);
                        if(value instanceof FieldComparison){
                             row1.append(((FieldComparison)value).getField1());
                             row2.append(((FieldComparison)value).getField2());
                        } else {
                             row1.append(value.toString());
                             row2.append(value.toString());
                   if(j < (columns - 1)){
                        row1.append("\t");
                        row2.append("\t");
              if(i < (rows - 1)){
                   row1.append("\n");
                   row2.append("\n");
         //sb.append("\n");
              sb.append(row1);
              sb.append(row2);
         return sb;
    I copy this data to the clipboard as follows:
    StringBuilder sb = getTableData();
    StringSelection allData = new StringSelection(sb.toString());
    cb.setContents(allData, allData);
    try {
              Transferable content = cb.getContents(null);
         String clipBoardContents = (String)content.getTransferData(DataFlavor.stringFlavor);
         System.out.println(clipBoardContents);
    }catch(Exception e){
              System.out.println("Transfer data error " + e.toString());
    At this point I can see the proper data in the console, However when I try to do a CTRL+C on the excel spredsheet, the data appears as if the toString method was called on each object. It appears like the clipboard data that I added has been overridden somehow. Not sure what the problem is. Please Help!
    Thanks!

    Are you using LabVIEW 7.1 or older? In this case, "read from spreadsheet file" uses only SGL precision, which is not sufficient for your desired resolution.
    See also: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=315189#M315189
    Solution: Read the file as a plain string and then use "spreadsheet string to array" with DBL as type.
    ... or upgrade to LabVIEW 8.0 or higher.
    LabVIEW Champion . Do more with less code and in less time .

  • Parsing the xml data

    Hi,
    i have the mehtods in proxy class. those methods are return the data as string. and all the data is in an XML format. now i want to parse that data to normal doc and convert into string form. give me the solution.
    Thanks

    sailesh is right! kXML is very popular pasrer for J2ME apps.
    Its pull type parser, 3 main things about kXML
    1. Reads a little bit of a document at once.
    2. Parser goes through the document by repeatedly requesting the next piece.
    3. Best suitable for J2ME application as take comparatively less memory and processing than other type of parser.
    For resource-constrained devices following parsers are frequently used -
    1. kXML
    Written exclusively for the J2ME platform (CLDC and MIDP).
    http://kxml.objectweb.org/software/downloads/
    2. NanoXML
    Version 1.6.8 for MIDP, supports DOM parsing.
    http://nanoxml.cyberelf.be/download.html
    I have used kXML and found it the best!
    Regards,
    Rohan Chandane

  • Itouch date is in BE ? it's 2555 BE. how do I get the right date?

    My callendar date is 2555 BE and I cant change it? what to do?

    You have changed the calendar format to Buddhist, you need to change it back to Gregorian.
    To Set the calendar format Go to Settings > General > International > Calendar, and choose the format.

  • TS1702 Cannot connect to store. Which reads a secure connection could not be established. Please check your date & time settings. What should i do if its already set to the right date and time?

    Can not enter my apps store or itunes store. What should i do?

    Turn the tables on the iTunes Store. Try this.
    Go to Settings>General>Date and Time>Set Automatically>Off. Set the date one year ahead. Try to download the apps again. If you get an error message, go back to the settings. Correct the date and time (set automatically) then go back and try again.

  • Keeping plot colors with the right data

    I have a vi written in 7.1 that has three traces in one plot.  I have selector radio buttons so the user can turn on or off any channel.  The problem is the color of the trace is automatically grabbed by the vi and chooses the colors based on which trace is turned on first, second and third.  So, if the user turns off all of the channels and then turns them on one at a time, from top to bottom, they are correct, green, blue, and then red.  But, if they turn them on from the bottom first, then the first and third traces no longer follow the plot color legend.  Basically, I want to know how to lock a plot color to a given channel.
    Regards,
    Ron
    Solved!
    Go to Solution.

    I can't vouch for 7.1, but you are looking at plot.color property node similar to the one in this example. http://digital.ni.com/public.nsf/allkb/C6BFD9BD5F0​1108C86256F8100638B29
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How can i get the correct text from a string like it show in the original source with the quotation marks in the right place ?

    The text is in hebrew so the problem is that sometimes the quotation marks not in the right place.
    For example i have this text: תווית
    על בגד: ''תן לאישה לכבס. זה תפקידה''
    This is the source original text you can see the quotations marks and they are not in the right place and all i did is copy paste.
    And this is a screenshot of how this text looks like in the website in the original:
    You can see now where the quotations marks should be.
    Now this is how i'm using the text in my program:
    First of all i'm using a webclient to download the page from the website and i'm also encoding it to windows-1255 since it's in hebrew.
    using (var webClient = new WebClient())
    webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    byte[] myDataBuffer = webClient.DownloadData("http://rotter.net/scoopscache.html");
    page = Encoding.GetEncoding("windows-1255").GetString(myDataBuffer);
    Then i'm extracting the places i need by reading the html file lines and parsing the right text and it's link.
    string loc;
    List<string> metas = new List<string>();
    List<string> metas1 = new List<string>();
    List<string> lockedLinks1 = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    lockedThreads = new List<string>();
    lockedLinks = new List<string>();
    Regex textRegex = new Regex("ToolTip.*?(?=','<)");
    string[] fall = File.ReadAllLines(filename);
    for (int i = 0; i < fall.Length; i++)
    if (fall[i].Contains("http://rotter.net") && fall[i].Contains("locked")||
    fall[i].Contains("locked_icon_general") ||
    fall[i].Contains("locked_icon_anchor") ||
    fall[i].Contains("icon_anchor") ||
    fall[i].Contains("locked_icon_fire") ||
    fall[i].Contains("locked_icon_sport") ||
    fall[i].Contains("locked_icon_camera") ||
    fall[i].Contains("locked_icon_movie"))
    Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    foreach (Match m in linkParser.Matches(fall[i + 2]))
    if (m.Value.Contains("><b"))
    loc = m.Value.Replace("\"><b", string.Empty);
    lockedLinks.Add(loc);
    string txt = fall[i - 1];
    string text = textRegex.Match(txt).Value.Replace("ToolTip','", String.Empty);
    if (text.Contains("&rsquo;"))
    text = text.Replace("&rsquo;", string.Empty);
    lockedThreads.Add(text);
    Already here on the List lockedThreads you can see the quotation marks not in the right place as in the original:
    After i'm parsing the text and links and adding them to the Lists in another class i'm doing a comparison using this Lists:
    foreach (List<string> l_branch in ListsExtractions.responsers)
    TreeNode l_node = treeView1.Nodes.Add(l_branch[l_branch.Count - 1]);
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    l_node.ImageIndex = 0;
    l_node.SelectedImageIndex = 0;
    for (int l_count = 0; l_count < l_branch.Count - 1; l_count++)
    TreeNode l_subnode = l_node.Nodes.Add(l_branch[l_count]);
    if (ListsExtractions.lockedThreads.Contains(l_subnode.Text))
    l_subnode.ImageIndex = 0;
    l_subnode.SelectedImageIndex = 0;
    The problem is in the line:
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    When it's getting to the line with the quotation marks it's never equal.
    Now there are more quotation marks.
    In general the problem when comparing both text if it's having quotation marks it's not the same.
    So i have two options:
    1. To fix it somehow so the quotation marks will be the same in both variables when comparing and also the same like in the original as they show in the html page.
    2. To remove the quotation marks from both variables.
    What should i do ? And how ? I was prefer to use the original quotation marks like in the original since they have a meaning in the place they should be. The question is how can i do it ?
    This is example of the block from the html file where the text with the quotation marks is:
    <TD ALIGN="RIGHT" VALIGN="TOP">&nbsp;<font size=-1 color=#ff9933><b>9418</b></font>&nbsp;</TD></TR><TR BGCOLOR="#eeeeee">
    <TD ALIGN="RIGHT" VALIGN="TOP">
    <body onmousemove="overhere()">
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();" onmouseout="deActivate()" href="javascript:void(0)">
    <img src="http://rotter.net/forum/Images/new_locked_icon_general.gif" border="0"></a></TD><TD ALIGN="right" VALIGN="TOP" WIDTH="55%">
    <FONT CLASS='text15bn'><FONT FACE="Arial">
    <a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=189696&forum=scoops1"><b>
    <font color="898A8E">תווית על בגד: ''תן לאישה לכבס. זה תפקידה''</b>
    </a></font></TD>

    Ok, it is unclear on what is happening here.
    Are you saying that when the webclient gets the data that it is not honoring the quote characters? Or the processing of the data buffer is causing issues?
    This is what I see the of your example text which is trying to be parse out:
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();">";
    It appears to me that the  escapes `&rsquo;` does not have matching `&ldquo;` anywhere within the tooltip. So it appears that the page properly places left quotes in when processing the page, but the raw html has broken text.
    Hence a garbage in, garbage out situation.
    William Wegerson (www.OmegaCoder.Com)

  • Not right data when row_number used in inner-view sql query...

    Hi ,
    I use the below sql statement which displays the right data
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)The data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA ROW_NUMBER()OVER(PARTITIONBYCO
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5                              1
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30                              1
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45                              1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6                              1
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2                              2
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                        21                              1
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                         2                              2However , when i use the below statement , in order not to display the row_number (so i use row_number function in inner-view) the data are different--in different order... why is that????
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA from
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)
      )and its data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                        21
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                         2
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1NOTE :Sorry, I tried to pose some sample data using the "with" statement but i couldn't...the error ORA-32035 : unreferenced query name defined in WITH clause was displayed..
    Regards,
    Simon

    The optimizer has, well, optimized out the row_number because you never refer to its value in the outermost query.
    sql>select deptno, cnt, row_number() over (order by cnt desc) rn
      2    from (select deptno, count(*) cnt
      3            from emp
      4           group by deptno);
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- here because we include rn in the outermost query,
    -- the results are still ordered based on the analytical function result
    sql>select deptno, cnt, rn
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- but if we don't include rn in the outermost query,
    -- the optimizer leaves out the window sort and the results are in a different order
    sql>select deptno, cnt
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT
           10         3
           20         5
           30         6
    3 rows selected.This just reinforces the point that if you want your results in a particular order, you need to provide an ORDER BY clause - don't rely on execution plans to do your sorting for you.

Maybe you are looking for

  • IPod wont Restore!!! Help please!

    Just recently my ipod displayed "Use iTunes to Restore" I connected it to my computer and tried restoring it but as soon as it completed restoring, once it connects to my computer again it tells me that it detected an ipod in recovery mode. I have tr

  • Deleting movie clips in the "my video" section.

    How do I delete the videos in the videos section of Itunes. I have tried left click and right click but none of them have the normal delete section so I can permanently remove the picture and the video. If anyone can help with this i would appreciate

  • T-code for reports

    Hello, We have OARP - AA reports KSBB- CCA reports What are the other t-codes for AR,AP,GL, etc reports

  • Can i buy items from the American ITunes store?

    I live in Australia and would like to buy an item from the American ITunes store. Is this possible without needing an account for that country?

  • Dynamic table with JSF

    Hi, ALL! I need to create the dynamic table which should be able to automatically add th e rows after getting command from server without redrawing the whole page. Is it possible to do it with JSF ? Or I have to use smth else? Thank you