9.0.3 Bug - getServletContextName returns incorrect value

getServletContextName is returning "current-workspace-app"
even though I have set the J2EE Web Context Root to something else, e.g. "mywebapp".
Running the app does in fact load the correct URL, with "mywebapp", but all the links that are built using getServletContextName are broken and contain, "current-workspace-app".

getServletContextName is returning "current-workspace-app"
even though I have set the J2EE Web Context Root to something else, e.g. "mywebapp".
Running the app does in fact load the correct URL, with "mywebapp", but all the links that are built using getServletContextName are broken and contain, "current-workspace-app".

Similar Messages

  • Bug-fix needs your vote: queries w/ joins against SQLite return incorrect values because Adobe treats PK col as alias for rowid when it should not

    For someone new to Adobe the forums and products can be bewildering. I've been advised to repost something I posted in Flash Data Integration in this forum.
    Here is the link to the post I put there:
    http://forums.adobe.com/message/2363777#2363777
    I have reported this bug: http://bugs.adobe.com/jira/browse/FB-23750
    I gather bugs get fixed if people vote for them to be fixed. Please vote for it to be fixed. It is serious, and you might not even realize you're suffering from it because the incorrect values returned by the query will seem perfectly plausible.
    If the link above doesn't work, here it is again:
    When I execute the following query in Flex and/or Lita:
    select wrdid, uspelling from WRD WHERE uspelling = 'wingeard'
    the results are:
    uspelling...wrdid
    wingeard   3137
    Look at what comes back when I execute this query using .NET provider by  Robert Simpson for SQLite and SQLite Manager by Mrinal Kant:
    SELECT     rowid, wrdid, uspelling
    FROM         WRD
    WHERE     (uspelling = 'wingeard')
    rowid.......wrdid...........uspelling
    3137........3042............wingeard
    No wonder none of my queries with joins is working correctly in Flex.
    wrdid is defined as "int" not INTEGER.
    http://www.sqlite.org/lang_createtable.html (see INTEGER PRIMARY KEY section):
    "The special behavior of INTEGER PRIMARY KEY is only available if the type name is exactly "INTEGER" (in any mixture of upper and lower case.)  Other integer type names like "INT" or "BIGINT" or "SHORT INTEGER" or "UNSIGNED INTEGER" causes the primary key column to behave as an ordinary table column with integer affinity and a unique index, not as an alias for the rowid."  [emphasis added]
    Now, I happen to think the SQLite developers made a mistake here in failing to follow standards, preferring not to break legacy code. They'd rather break current code instead???  I would not characterize this as a "corner case" and the bug-at-hand is de facto evidence of that.

    Did you try running the queries I posted? What were your results with those?
    What I am seeing is that when I use "int PRIMARY KEY" in a CREATE TABLE statement, that column becomes the special "rowid" column. I believe this is also what you are seeing.
    However, what confuses me is how you're getting a table with three columns "rowid", "id", and "name" in the first place. When I run this SQL...
    CREATE TABLE test
    id int PRIMARY KEY,
    name String
    ...I get a table with two columns: a normal column named "name", and a special primary key column named "id", which for this table is identical to the column represented by the rowid identifier.
    However, if I understand correctly, your table has three columns, "id", "name", and the special primary key column (i.e. "rowid"). Is that right? Can you give me the SQL that was used to create the table, or tell me how the table was created (e.g. if you used a tool like Lita) so I can try to re-create your exact situation? That would really be very very helpful -- it was the only detail that was missing in your last post, so I had to guess on that one detail.
    I tried something else to re-create your situation. I ran the following statement:
    CREATE TABLE test
    id int
    name String
    That gave me a table with two real columns plus the rowid column. Then I ran the three insert statements on that table, and when I ran the select statement I got the expected result:
    id     name
    1     one
    2     two
    7     seven
    Again, I'm guessing that your table was created differently than my test table, and that's the explanation for the difference.
    Some other possibilities to consider:
    The screen shot doesn't show a SQLResult object, so it seems that you're using some wrapper library or code to execute the query, or at least that you've copied the SQLResult.data Array to another variable named results. Although it seems less likely to me, it's possible that somewhere in that code something is getting scrambled. (But I'd rather rule out AIR as the underlying cause first before attempting to explore those paths.)
    As a side note, if you really want the database to have three columns (the special rowid column and your two columns id and name), and you don't want id to be the special rowid column, then it sounds to me like you don't actually want to define id as the primary key. If you just want the id column to have a constraint that prevents duplicate values, you can define it as a UNIQUE column:
    CREATE TABLE test
    id int UNIQUE,
    name String
    That gives you the same database-enforced constraint of not allowing duplicate values, but it tells the database explicitly that id isn't the same thing as the rowid primary key. (You can still join another table to the id column even if it's not defined as the primary key.)
    P.S. I'm sure you don't mean it this way, but using gigantic red text comes across like shouting -- it's very "loud". I'm trying my best to understand the issue you're having and help you resolve it, and using multiple colors and font sizes doesn't really make your post any more or less clear. Just because I ask you questions, or say that I'm seeing different results than you, doesn't mean I don't believe that you're seeing the results you're seeing. I've definitely seen strange variations and cases where something happens on my computer but others can't duplicate it on their computers -- so I believe that you are getting the results you're getting. I'm just trying to figure out how to make it so that I can also get those results, so that I can pass that on to the engineers who are in a position to make changes.

  • Java returning incorrect values for width and height of a Tiff image

    I have some TIFF images (sorry, I cannot post them b/c of there confidential nature) that are returning the incorrect values for the width and height. I am using Image.getWidth(null) and have tried the relevant methods from BufferedImage. When I open the same files in external viewers (Irfanview, MS Office Document Imaging) they look fine and report the "correct" dimensions. When I re-save the files, my code works fine. Obviously, there is something wrong with the files, but why would the Java code fail and not the external viewers? Is there some way I can detect file problems?
    Here is the code, the relevant section is in the print() routine.
    * ImagePrinter.java
    * Created on Feb 27, 2008
    * Created by tso1207
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.print.PageFormat;
    import java.awt.print.PrinterException;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.FileImageInputStream;
    import javax.imageio.stream.ImageInputStream;
    import com.shelter.io.FileTypeIdentifier;
    public class ImagePrinter extends FilePrintable
       private final ImageReader _reader;
       private final int _pageCount;
       private final boolean _isTiff;
       //for speed we will hold current page info in memory
       private Image _image = null;
       private int _imgWidth = 0;
       private int _imgHeight = 0;
       private int _currentPage = -1;
       public ImagePrinter(File imageFile) throws IOException
          super(imageFile);
          ImageInputStream fis = new FileImageInputStream(getFile());
          Iterator readerIter = ImageIO.getImageReaders(fis);
          ImageReader reader = null;
          while (readerIter.hasNext())
             reader = (ImageReader) readerIter.next();
          reader.setInput(fis);
          _reader = reader;
          int pageCount = 1;
          String mimeType = FileTypeIdentifier.getMimeType(imageFile, true);
          if (mimeType.equalsIgnoreCase("image/tiff"))
             _isTiff = true;
             pageCount = reader.getNumImages(true);
          else
             _isTiff = false;
          _pageCount = pageCount;
       public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
          throws java.awt.print.PrinterException
          int drawX = 0, drawY = 0;
          double scaleRatio = 1;
          if (getCurrentPage() != (pageIndex - getPageOffset()))
             try
                setCurrentPage(pageIndex - getPageOffset());
                setImage(_reader.read(getCurrentPage()));
                setImgWidth(getImage().getWidth(null));
                setImgHeight(getImage().getHeight(null));
             catch (IndexOutOfBoundsException e)
                return NO_SUCH_PAGE;
             catch (IOException e)
                throw new PrinterException(e.getLocalizedMessage());
             if (!_isTiff && getImgWidth() > getImgHeight())
                pf.setOrientation(PageFormat.LANDSCAPE);
             else
                pf.setOrientation(PageFormat.PORTRAIT);
          Graphics2D g2 = (Graphics2D) g;
          g2.translate(pf.getImageableX(), pf.getImageableY());
          g2.setClip(0, 0, (int) pf.getImageableWidth(), (int) pf.getImageableHeight());
          scaleRatio =
             (double) ((getImgWidth() > getImgHeight())
                ? (pf.getImageableWidth() / getImgWidth())
                : (pf.getImageableHeight() / getImgHeight()));
          //check the scale ratio to make sure that we will not write something off the page
          if ((getImgWidth() * scaleRatio) > pf.getImageableWidth())
             scaleRatio = (pf.getImageableWidth() / getImgWidth());
          else if ((getImgHeight() * scaleRatio) > pf.getImageableHeight())
             scaleRatio = (pf.getImageableHeight() / getImgHeight());
          int drawWidth = getImgWidth();
          int drawHeight = getImgHeight();
          //center image
          if (scaleRatio < 1)
             drawX = (int) ((pf.getImageableWidth() - (getImgWidth() * scaleRatio)) / 2);
             drawY = (int) ((pf.getImageableHeight() - (getImgHeight() * scaleRatio)) / 2);
             drawWidth = (int) (getImgWidth() * scaleRatio);
             drawHeight = (int) (getImgHeight() * scaleRatio);
          else
             drawX = (int) (pf.getImageableWidth() - getImgWidth()) / 2;
             drawY = (int) (pf.getImageableHeight() - getImgHeight()) / 2;
          g2.drawImage(getImage(), drawX, drawY, drawWidth, drawHeight, null);
          g2.dispose();
          return PAGE_EXISTS;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since version XXX
        * @return
       public int getPageCount()
          return _pageCount;
       public void destroy()
          setImage(null);
          try
             _reader.reset();
             _reader.dispose();
          catch (Exception e)
          System.gc();
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public Image getImage()
          return _image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgHeight()
          return _imgHeight;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgWidth()
          return _imgWidth;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param image
       public void setImage(Image image)
          _image = image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgHeight(int i)
          _imgHeight = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgWidth(int i)
          _imgWidth = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getCurrentPage()
          return _currentPage;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setCurrentPage(int i)
          _currentPage = i;
    }Edited by: jloyd01 on Jul 3, 2008 8:26 AM

    Figured it out. The files have a different vertical and horizontal resolutions. In this case the horizontal resolution is 200 DPI and the vertical is 100 DPI. The imgage width and height values are based on those resolution values. I wrote a section of code to take care of the problem (at least for TIFF 6.0)
       private void setPageSize(int pageNum) throws IOException
          IIOMetadata imageMetadata = _reader.getImageMetadata(pageNum);
          //Get the IFD (Image File Directory) which is the root of all the tags
          //for this image. From here we can get all the tags in the image.
          TIFFDirectory ifd = TIFFDirectory.createFromMetadata(imageMetadata);
          double xPixles = ifd.getTIFFField(256).getAsDouble(0);
          double yPixles = ifd.getTIFFField(257).getAsDouble(0);
          double xRes = ifd.getTIFFField(282).getAsDouble(0);
          double yres = ifd.getTIFFField(283).getAsDouble(0);
          int resUnits = ifd.getTIFFField(296).getAsInt(0);
          double imageWidth = xPixles / xRes;
          double imageHeight = yPixles / yres;
          //if units are in CM convert ot inches
          if (resUnits == 3)
             imageWidth = imageWidth * 0.3937;
             imageHeight = imageHeight * 0.3937;
          //convert to pixles in 72 DPI
          imageWidth = imageWidth * 72;
          imageHeight = imageHeight * 72;
          setImgWidth((int) Math.round(imageWidth));
          setImgHeight((int) Math.round(imageHeight));
          setImgAspectRatio(imageWidth / imageHeight);
       }

  • Applescript returns incorrect value with blank cell

    Imagine there is a column of numbers, some which might have the value 0.0 and some which are blank. Imagine wanting to append a data set at the first blank cell using Applescript. As Applescript is currently implemented in Numbers, this is not possible. See the following test.
    1. In Numbers, create a new blank spreadsheet.
    2. Select cell "A1".
    3. Format as text.
    4. Execute the following line of Applescript,
    tell application "Numbers" to get value of cell "A1" of table 1 of sheet 1 of front document
    It returns "0.0".
    I would expect a return "" since it is a empty cell formated as text, no less.
    Because of this, there is no way to find a blank cell since a blank cell returns a value of 0.0 which might be a valid entry.
    Anyone have any ideas for a work around?

    The value of a blank (empty) cell IS zero.
    The value of a cell containing a string whose length is zero contains "".
    Given that, I will post a report because I'm not sure than the value returned in AppleScript is the good choice.
    In AppleWorks for a blank cell, the returned value was "".
    Yvan KOENIG (from FRANCE dimanche 11 janvier 2009 16:31:35)
    +Your tracking number for this issue is Bug ID# 6487875.+
    Hello
    +(1) May I know if the fact than+
    +set v to value of cell "B12"+
    +returns 0.0 when the cell is blank is the designed result.+
    +In AppleWorks in this case, we are accustomed to get an empty string.+
    +(2) In version 1, a cell containing an empty string was accepted in an arithmetic operation.+
    +In version 2, it is rejected.+
    +Is it a design choice or is it a bug ?+
    +Your tracking number for this issue is Bug ID# 6487879.+
    Hello
    +In Numbers, as long as we are referencing cells of the current row (200 for instance), we may use short references like:+
    =(BC)*(DE)
    +When we save as iWork '08 document, the formula is expanded as+
    =(B200C200)*(D200E200)
    +Is it a design choice or a bug ?+

  • Sequence.Type returns incorrect value

    TestStand 2010 SP1
    Sequence.Type and/or Sequence.GetEffectiveType() seems to be returning 0 no matter what sequence I call them from.  Anyone know what I could be doing incorrectly?
    You can run the attached sequence file and see it.
    Thanks,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    SequenceType.seq ‏6 KB

    I cannot see any other values.
    Interesting observation on my part: The Process Model I had tried it in before was one I copied over from 4.1.1 and had saved as 2010 SP1.  However, when I use the default model that ships with 2010 SP1 I get the correct behavior.  ODD??  BUT, when I create an empty sequence file from 2010 SP1 and try it I don't get the right values.
    I'm with you.  I think these values aren't getting updated correctly in the sequence object.
    Thanks for the help,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • JCO call to RFC returns incorrect value

    Hello Experts,
    I am using JCO to call an RFC from java.
    One of the returned fields is a timestamp.
    When I invoke the RFC from within the SAP system, I get a correct timestamp value.
    But, when I invoke the RFC using JCO, the timestamp value returned has less 2 hours.
    Does anybody know what might be the reason for that?
    Regards,
    Effi.

    It might be the problem with the RFC. You need to check by keeping the External break point in the RFC and check the output of the RFC.
    Regards,
    Raju Bonagiri

  • Querying list items of document libraries returns incorrect values.

    I have several document libraries. I am trying to get only the documents that the a selected user has however it is returning other authors documents. Attached is my code. Any help would be greatly appreciated.
    CamlQuery camlQuery = new CamlQuery();
    string query = "<View Scope='Recursive' /><ViewFields><FieldRef Name='File' /><FieldRef Name='FileLeafRef' /><FieldRef Name='LinkFilename'/><FieldRef Name='LinkFilenameNoMenu' /><FieldRef Name='Modified' /><FieldRef Name='Created' /><FieldRef Name='Author' /></ViewFields>" + "<Where><Eq><FieldRef Name='Author' LookupId='TRUE'/><Value Type='Integer'>" + user.Id + "</Value></Eq><AND><Eq><FieldRef Name='ContentType' /><Value Type='Computed'>File</Value></Eq></And></Where>" +
    "<OrderBy><FieldRef Name='Created' /><FieldRef Name='Modified' /></OrderBy><QueryOptions><RowLimit>" + count + "</RowLimit></QueryOptions></View>";
    camlQuery.ViewXml = query;
    listItems = list.GetItems(camlQuery);
    clientContext.Load(listItems);
    clientContext.ExecuteQuery();

    Hi,                                                             
    The CAML statement below can filter the documents created by a specific user,
     please test it in your environment:
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='Author' />
    <Value Type='User'>Display Name</Value>
    </Eq>
    </Where>
    </Query>
    <ViewFields>
    <FieldRef Name='FileLeafRef' />
    <FieldRef Name='Author' />
    </ViewFields>
    </View>";
    Best regards
    Patrick Liang
    TechNet Community Support

  • JCTerminal.getState() returns incorrect value

    I am using Eclipse SDK301 including the latest JCOP plugin.
    I am running on target (so not using the simulation).
    PROBLEM
    I want to make my offline terminal aware of card removals and insertions.
    Therefore, I want to check before I send an APDU to the card that my connection is still valid
    by checking the 'JCTerminal.getState()' function.
    But this function always returns 285286916 instead of an expected 4 (JCTerminal.CARD_PRESENT)
    or 2 (JCTerminal.SLOT_EMPTY).
    Is this a bug somewhere ??? .. or should I use another function ??
    Further, another question.
    Isn't there a listener, so that I can subscribe myself somewhere on card state changes, instead of
    a polling like way that I'm using now ??
    Thanks beforehand.

    Hi.
    I had recently some problems with JCTerminal.getState(), too but in a different way. (Eclipse 3.01, JCOP 3.1 pre, one emulator and one real reader):
    I was using JCTerminal via the OCFJCTerminal implementation. For creating the terminal I did not use JCTerminal.getInstance() but directly the public constructor of OCFJCTerminal:
    JCTerminal terminal = new OCFJCTerminal();Every time I called getState() of this terminal I got an Exception (do not remember what exactly).
    After some tests I found out how to avoid this Exception:
    OCFJCTerminal terminal = new OCFJCTerminal();The only difference is the type of the variable that holds the reference to the terminal-instance.
    By my understanding of polymorphic classes it should not make any difference but in reality it makes a difference.
    May be is somehow related tou your getState() problems?
    Jan

  • PDETextGetBBox returns incorrect value with Italic font

    Hello,
    I use PDETextGetBBox to retrieve the BBox of PDETextRun which are created with an italic font (in my case Arial Italic). Unfortuantely the returned AsFixedRect is not correct because it doesn't take into account the skewing of the char.
    Is it normal? A bug? A wrong usage of the SDK method?
    Thanks in advance,
    Joe

    Ok but the bounding box should contain all the TextRun. By the way I have the same behavior with the Quad.
    The solution is to use the PDEElementGetBBox but in this case it's too large.
    Any idea?
    Thanks in advance,
    Joe

  • Insert into .. sql return incorrect value for 2 columns,sometime no value

    Hello,
    Oracle 10.2.0.3 , sol 10. (recently upgraded from oracle9i & sol8)
    sql query is used to populate a table. sometimes it is populating same values for all the records in 2 columns. Sometimes not populating or partially populating 1 other column. other times its running fine.
    SQL is not changed at all. When run again , it populates correctly.
    any help is highly appreciatied.
    --pooja                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    no ORA errors while execution. Its completing successfully.
    and its an intermittent issue. when the SQL is run manually its gives perfect results. Rerunnign the entire process is also fine. Conclusivly, data & SQL has no problem.
    its an insert into table <SQL>
    SQL contains left outer join.
    example:
    Expected output:
    1 john texas
    2 smith MA
    3 rob michigan
    Actual Output
    1 john texas
    2 smith texas
    3 rob texas

  • The Report returning incorrect Invoice values

    Hi,
        When we are executing a  particular report in BEX, it is returning incorrrect values for a few PO numbers for the field  invoice values .The rest of the PO's have correct invoice values.
    I have checked in the cube and ODS and it has the same incorrrect values for these PO's.But in R/3 system, when i check the respective PO ,it has correct values in the TCODE ME23N.
    But in BW system , it is showing incorrect values.I tried to view the same PO Number in the datsource in RSA3. But here when i extract the data and check the output list, I could not find the PO which i am looking for.
    Also, can you please tell me.How can i check the respective PO's in RSA3.Is there any different approach.
    Do provide soem inputs.
    Thanks,
    Samir

    Hi Samir
    In RSA3,do you have selection on PO,if so then you can give that particular PO and extract and crosscheck.
    Orelse if you have selection on 0FISCPER,and if you know when this PO has been created then give that period and extarct,there you can able to find that particular PO
    If  the values in ODS and cube are incorrect,then you need to crosscheck first in PSA( in the staging layer),since in PSA you will get the raw data exactly the same as in the source system
    Regards
    Jagadish

  • [svn:fx-3.x] 18471: bug fix for 2749575 The API -- mx.messaging.messages. MessagePerformanceUtils; associated attributes/ properties like totalTime are returning negative values

    Revision: 18471
    Revision: 18471
    Author:   [email protected]
    Date:     2010-11-05 10:22:11 -0700 (Fri, 05 Nov 2010)
    Log Message:
    bug fix for 2749575 The API -- mx.messaging.messages.MessagePerformanceUtils; associated attributes/properties like totalTime are returning negative values
    Change adding set method for receive time to avoid it override the value set by detecting it is an OUT infoType
    BlazeDS checkintests pass
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanc eInfo.as

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • Oracle returning incorrect day of the week

    Hi there,
    I have a table named Performance, which includes a date field named PDATE, some other attributes such as title, etc, and a field named WEEKDAY, which includes the numerical value for the day of the week. Here is an example:
    PER#
    P#
    THEATRE#
    WEEKDAY
    PDATE
    PHOUR
    PMINUTE
    COMMENTS
    1
    1
    1
    1
    02-MAR-10
    19
    30
    Normal evening time
    2
    1
    1
    2
    03-MAR-10
    19
    30
    Normal evening time
    58
    6
    6
    3
    04-MAR-10
    19
    30
    Normal evening time
    5
    1
    1
    4
    05-MAR-10
    19
    30
    Normal evening time
    I went to verify the day of the week in a calendar (in fact I checked more than one) and I noticed that the Weekday value seems incorrect. For instance, the 2nd of March was a Tuesday so I would expect WEEKDAY to say 3 (considering Sunday to be the 1st day of the week, which is the universal norm), or perhaps 2 (considering Monday to be the 1st day of the week).
    First thing that came to mind is, since the WEEKDAY is a number field which has been pre-populated, the person who populated it made a mistake.
    So I went to verify this by running a query that would give me the correct day of the week by extracting it from the PDATE field:
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,
    to_char(to_date(pdate,'DD/MM/YYYY'),'DY') weekdaycalc, weekday
    FROM ops$yyang00.Performance
    ORDER BY pdate
    And to my astonishment, I got the following table as a return:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    SUN
    1
    03-MAR-10
    2010
    MON
    2
    04-MAR-10
    2010
    TUE
    3
    05-MAR-10
    2010
    WED
    4
    06-MAR-10
    2010
    THU
    5
    07-MAR-10
    2010
    FRI
    6
    08-MAR-10
    2010
    SAT
    7
    09-MAR-10
    2010
    SUN
    1
    10-MAR-10
    2010
    MON
    2
    As you can see, all of the above WEEKDAYCALC values are incorrect, and seem to match the incorrect values in WEEKDAY.
    I could perhaps understand some weird WEEKDAY numbering if there is some general database setting where I could specify any day of the week to be the first day. However, I can't think of any logical explanation on why Oracle would call a Tuesday Sunday.
    Could someone please advise what I mght be doing wrong? This is driving me insane!
    Thank you in advance for all the help and support.
    Regards,
    P.

    Hi,
    1bded5c7-e555-4306-ac86-45da83dff439 wrote:
    Thanks both Frank and Solomon for the help. I am quite new to Oracle and I feel you folks went the extra mile on the explanation
    Based on your explanations, I changed the formula so the date format would be processed as YY rather than YYY.
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,   
    to_char(to_date(pdate,'DD/MM/YY'),'DY') weekdaycalc, weekday   
    FROM Performance   
    ORDER BY pdate  
    And I got the correct values now:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    TUE
    1
    03-MAR-10
    2010
    WED
    2
    04-MAR-10
    2010
    THU
    3
    05-MAR-10
    2010
    FRI
    4
    06-MAR-10
    2010
    SAT
    5
    07-MAR-10
    2010
    SUN
    6
    08-MAR-10
    2010
    MON
    7
    The interesting bit here, is the original WEEKDAY field, which clearly has been created with the same mistake I did (this whole table wasn't created by me). I reckon I spotted a design bug.
    Regards,
    P.
    No; you're still calling TO_DATE on something that is already a DATE, and you're still using an implicit conversion (only now you're using a format such that the current NLS settings don't cause you to get punished.  If your DBA changes the NLS settings next week, then you will have similar errors again.)
    If you want to see what day of the week pdate is, then use:
    TO_CHAR (pdate, 'DY')
    or, to make it NLS-independent:
    TO_CHAR (pdate, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH')
    This is simpler than what you posted, it's more efficient and easier to debug and to maintain, and it also gets the results you want in all cases.
    One more time: TO_DATE, as the name hints, converts something (a VARCHAR2, to be precise) TO a DATE.  If pdate is already a DATE, then what do you need to convert?  You're implicitly converting a DATE to a VARCHAR2, then explicitly converting that VARCHAR2 back to a DATE, and then calling TO_CHAR.  That's 3 function calls (1 of them error prone) where only 1 is needed.
    Also if you ever have to reconcile 2-digit years with 4-digit years (and, again, in this problem you don't) the correct way is to convert the 2-digit year to a 4-digit year, not vice-versa.
    Calling Tuesday the 1st day of the week could make sense in a particular application.

  • Multitouch.maxTouchPoints giving incorrect values for Google Nexus S

    Just testing out the Adobe multitouch example application (http://www.adobe.com/devnet/flash/articles/multitouch_gestures.htm_phases-16569.html) and have discovered that Multitouch.maxTouchPoints is giving incorrect values (2) for my Google Nexus S (5+).
    If any devs are listening, can you give me more information? Should I report a bug?

    The runtime team is aware of this issue.  I believe it may return 2 for many if not all devices.

  • 3.1 EA3 - Column value filter dropdown returns duplicate values

    Hello,
    SQL Developer 3.1 EA3 introduces a regression: the column value filter in the table data editor dropdown (filter column) now shows duplicate values. Previous versions (at least 3.0) returned unique values to select from.
    Since this is EA3 and not yet production, should I file a bug for this?
    Best Regards and many thanks for this tool,
    Olivier.
    Edited by: user9378013 on Jan 9, 2012 1:08 PM

    Yes it's a regression. Fixed it recently. In the next released build it should work properly.
    -Raghu

Maybe you are looking for