Order by date rather than year

Hi,
I am printing a report which pulls data from Oracle 8i through JSP.
My SQL query is:
String sql="SELECT first_name,last_name, to_char(birth_date,'MM/DD/YYYY') as smthng";
sql+=" FROM personnel";
sql+=" ORDER BY birth_date";
Now this query orders the results by year, then month and then day.
What I mean is If I have values(mm/dd/yyyy format):
06/20/1978, 06/15/2002, 06/01/1990
it will show them as:
06/20/1978,06/01/1990, 06/15/2002
What I need is this form(order by days only and not to worry about year)
06/01/1990,06/15/2002,06/20/1978
Any idea if I can do that without storing them into array and parsing them and then comparing.

I don't know if Oracle will let you sort by an alias but you might
try...
"ORDER BY smthng"

Similar Messages

  • Can you sort albums by release date, rather than year, in album view?

    I love the new album view in iTunes 11, but the only problem I have with it is sometimes albums are in the wrong order.
    For example, last year Green Day released a trilogy of albums called ¡Uno!, ¡Dos! and ¡Tré! but since they were released in the same year, they're ordered as ¡Dos!, ¡Tré, ¡Uno! when sorted by artist and then year which really doesn't sit right with me.
    In short, the sorting options for albums view are very limited, is there any way to extend them?
    Also I'm aware that I could, as a cheap fix, change the sorting in album to the release date backwards, but I'd rather not do that as it would make it a bit more troublesome for me to navigate my albums on my iPhone.
    Thanks!

    I agree that Apple should improve the year field to be an actual date.
    I am not 100% happy doing this, but when you have multiple albums from a single artist for the same release year, a temporary solution is to chage the album title by adding an outline type letter before album titles for that year, so that they appear in the correct order:
    David Bowie
    1977
    a. Low
    David Bowie
    1977
    b. "Heroes"
    etc
    This could help in the short term until Apple changes that field.

  • How do I get items from itunes U to display in order by date rather than in alphabetical order?

    The podcasts I listen are automatically organized chronologically. I downloaded something from itunes U and it is organized by date in itunes but alphabetically on my ipod so I have no idea which one actually comes first. I'd appreciate some help in knowing how to put them in order by date. Thanks.

    Hi Richard,
    Based on my experience, I don't think drill-down links can be included in alerts/messages.
    Thanks,
    Gordon

  • Can i upload  first  Transaction data rather than master data what will hap

    hai,
    can i upload  first  Transaction data rather than master data what happends going in bw regarding performance issues like indexes
    let me know
    regards,
    murali

    Hi Murali,
    you can load the transaction data before master data. The main impact will be, that the system has to generate sid's and has to populate the sid-table of the master data objects while loading the data to a data target (cube or ods that is activated for bex reporting). This basically means that your data loads will take some more time. Additionally, if you need the master data attributes somewhere in your update or transfer rules, you will not get the correct information.
    So basically it is always a good approach to load and activate the master data before loading the transactional data. But anyway, specially in the development environment I usually don't load all the necessary master data.
    regards
    Siggi
    PS: navigational attributes of the data targets will not be available until you loaded the master data and scheduled the attribute and hierarchy change run.
    Message was edited by: Siegfried Szameitat

  • Hover Card is showing US formated date rather than UK formated date

    The HoverCard in the search results is showing the last modified date in US culture i.e. MMM/dd/yyyy rather than UK dd/MMM/YYYY. The culture of the search site collection is UK. 
    jamtoday

    When you say culture you mean locale? Might be worth re-checking the time / calendar options as sometimes switching the locale doesn't switch out the remainder of the options in that config page.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • How do I set all photos in a project to the same date (rather than simply time-shifting)?

    I have a bunch of old scanned photos in Aperture (current version - 3.5.1), and am trying to tidy up the metadata, especially the dates.
    This is turning out to be quite a task, as the date gaps between scans are all over the place. For example, in one project I might have photos scanned between 2004 and 2007 that all took place on one day in 1999.
    This means the native "adjust date and time" function in the metadata menu doesn't work, as it is a little too clever in its timeshifting. If I highliht the whole project and change it all to 1 June 1999, the 2004 shots get changed to that date but the 2007 scans are dated 2002, with Aperture "cleverly" preserving the inaccurate three year gap in the original scans' metadata.
    This is making the process of fixing my data far more arduous than it needs to be.
    I feel like my situation can't be that unusual, and their must be a way to override this behaviour. I'm not fussy about preserving logical time gaps between shots  but I'd like them to have the right year and month (so a "dumb" solution that gave them all idntical date and times would be fine).
    Can anayone help? Thanks in advance!

    What is your Aperture version?
    If it is compatible with iPhoto, open the Aperture library in iPhoto and use iPhoto's Batch Change to adjust the date of your scans:  (File > Open Library in iPhoto)
    In iPhoto select the photos in the event and go to the main menu bar:
    Photos  > Batch Change > Set Date:
    Select the initial date and time of your photos and a very small gap, e.g. 1 second. All photos will set to the same date, stepped by one second to preserve their time order.
    Afterwards switch back to Aperture using "File > Open Library in Aperture).
    this works very well with Aperture 3.5.1 and iPhoto 9.5.1.
    -- Léonie

  • Looking for a method that reads in a whole row for data rather than using getString();

    Hi,
      I'm using java to read from oracle and Netezza and I'm wondering:
    Is there a method for capturing a row in a variable in order to print that entire row out to a data file or a UNIX file in this case.
    Right now I have this code I'm working with:
      //STEP 4: Execute a query
      System.out.println("Creating statement...");
      stmt = connection.createStatement();
      String sql;
      sql = "SELECT SRC_ID, SRC_CD, SRC_DSC, CKA_SUB_ID FROM SRC";
      ResultSet rs = stmt.executeQuery(sql);
      //STEP 5: Extract data from result set
      while(rs.next()){
    //Retrieve by column name
    String SRC_ID  = rs.getString("SRC_ID");
    String FIRST_ROW  = SRC_ID+", "+SRC_CD+", "+SRC_DSC+", "+CKA_SUB_ID;
    //Display values
    System.out.print("SRC_ID: " + SRC_ID);
    System.out.println(", FIRST_ROW: " + FIRST_ROW);
    Is there a way I can replace the getString with a "getRow"?
    Right now the best I can do is to create and use the FIRST_ROW variable. However I want to be able to do this generically so I can read different tables and write them to data files.
    Thanks!

    Is there a method for capturing a row in a variable in order to print that entire row out to a data file or a UNIX file in this case.
    Is there a way I can replace the getString with a "getRow"?
    No - there is no such 'ROW' entity in Oracle.
    Download and use Oracle's free Sql Developer and you can use a simple query like this:
    select /*csv*/ * from SCOTT.EMP
    That will produce a comma-delimited result set with one record for each row. Then you can save the result set to a file.
    Oracle SQL Developer Downloads
    See this article by Jeff Smith that shows how to get result sets as CSV (and several other) formatted data.
    http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/

  • Can't seem to draw a chart (line chart) using dates rather than numbers

    I'm trying to draw a Line Chart but rather using numbers i want to use dates for example: Switzerland 23/06/2008 - 23/08/2008. Can't seem to get it to work? it seems to all go wrong when I change the cell format to 'date'
    Can anyone help?
    Thanks
    PS. I can do it easily in Excel

    Hello
    From my point of view, it's not surprising.
    In XL, a date is a number to which a date format is applied. So, it may be charted.
    Same thing with the good old AppleWorks.
    With Numbers, a date is NOT a number, it IS a specific class of data.
    The consequence is that it can't be charted directly.
    Happily, we may easily convert a date into a number.
    In column B the formula is
    =A-$A$1
    which calculates the numeric difference between stored dates and the date stored in A1.
    So, we may chart the results.
    I know that it's far from perfect but we have to live with the choices made by Numbers's designers.
    Yvan KOENIG (from FRANCE vendredi 18 avril 2008 18:44:14)

  • Can you purchase photoshop permanently rather than yearly?

    I want to buy photoshop, but I don't want to pay for creative cloud every month/year, so is there a way that I can purchase photoshop and pay 1 flat fee?

    I'm not trying to influence you one way or another.  Just some things to think about:
    Given that Photoshop CS6 is about $700 (Extended is $1000), you may want to think about the $9.99 Photographer's deal as a comparison...
    Creative Cloud free trial & plans : Adobe Creative Cloud
    If you plunk down $700 now, you get an already outdated version of Photoshop.  Photoshop CS6 works, but there actually are some very good things that have been implemented in Photoshop CC.  And Photoshop CC is more efficient (outside of a few folks who are having problems with it).
    If you subscribe to that Creative Cloud deal I mentioned, you plunk down $120 for the first year.  You could save the additional $580 and use it to pay for the subscription in the future, in which case you'll be able to use Photoshop CC for more than 5 years at the current rate.  Or you could invest it in ADBE stock.
    The term "Perpetual License" is kind of a misnomer...  You're not really guaranteed to be able to run it forever into the future on the latest operating system release of the day.  How long is your computer going to last?  Will you decide to upgrade to a new version of your OS under which Photoshop CS6 will not run?  Will Adobe one day take their CS6 activation servers offline?  We can't know.  If Adobe were to lose its business it's possible you won't be able to run any version of Photoshop beyond the day that happens.  No one can predict the future, but I'm just pointing out that you're at the mercy of Adobe's online activation process either way.
    If you choose to get a computer of the other platform (e.g., Mac vs. PC), your CC license allows you to use Photoshop in both places.  With Photoshop CS6, though Adobe does currently offer a "crossgrade", you can only use it on one platform or the other exclusively.
    If Adobe had continued to offer new version releases every couple of years, would you likely have upgraded at some time in the future?  If you've had an older version already, how many versions did you skip between upgrades?
    Some folks simply feel negatively about subscribing vs. buying a license to use, and I fully respect that.   I'm just giving some things to think about.
    -Noel

  • Import Folder by Current Date Rather Than Date Shot?

    Does anyone know if it is possible to request on Import for LR to put images into folder created on the day you download as opposed to the date the photos were taken? Aperture and Photo Mechanic allow this but I can't seem to find this specific ability in LR. I hope it is there.

    Unfortunately, you can't.
    The best you can do is, select the "Into single folder" option on Import and enter the name of the folder manually.

  • Push Data rather than Pull

    I am using Linux with Oracle 11GR2.
    I don't think what I need to do is possible with datapump but wondered if anyone has figured out how to do it. Currently I pull data from the target database using impdp going from database to database without any dump files. I found out today that they want to push the data to the target database. They do not want the target database to have access to the source database. Has anyone figured out how you can get the source database to push data to the target database without dump files? Reading the documentation on network_link, it only looks like the data can be pulled from the source into the target.
    Thank you for any suggestions!

    >
    Currently I pull data from the target database using impdp going from database to database without any dump files.
    >
    So exporting data from source into dmp files is still a restriction? Following seem to be the only options:
    <li> Using Data File Copying to Move Data
    <li> Using Direct Path to Move Data
    <li> Using External Tables to Move Data
    <li> Using Conventional Path to Move Data
    <li> Using Network Link Import to Move Data
    Check this out:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/dp_overview.htm#SUTIL100

  • Is there any way to get iMessage to display the absolute date rather than the relative date of a text message?

    Sometimes I need to document when a text message exchange occurred and taking a screen capture is a nice and efficient way of doing this.  However, since iOS7, iMessage has used relative dates for recent text messages and will simply say "Today 1:31 PM" when I would prefer it if it said, "Wed, Nov 12, 1:31 PM".  I can reasonably figure out whether November 11 was "Yesterday" if need be.

    No.

  • Concurrent porgram warning out and showing XML data rather than PDF.

    Hi All,
    I have a XML report which should produce output in PDF.
    But when i submit for certain parameters the program is ending in Warning
    and in xml output it gives following error
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'http://.............
    Luminaire colour: SW302F Gris 900 Sabl
    The actual value Luminaire colour: SW302F Gris 900 SablÂÂÂÂÂ
    Because of these junk chracters this issue is raising. But THE THING I AM NOT UNDERSTANDING IS. The same value in other report is getting printed without any warning.
    Please through any ideas.

    Hi,
    In the report where I have no issues with the junk characters the Encoding format is
    <?xml version="1.0" encoding="iso-8859-1" ?>
    In the report where I am getting this issue have following format.
    <?xml version="1.0" encoding="UTF-8" ?>
    Please let me know , what should I do now or where should I change this to get that output with out warning or invalid character issue.
    I use Report builder 10g and XML publisher for the RTF templates.
    Thanks.
    Edited by: 834095 on Mar 28, 2011 8:51 AM

  • Is there any way to force iPhoto to present faces by folder for identification rather than randomly?  Would provide better context for identification especially if a huge number of images is involved.

    Before I commit the time and energy required to load and tag faces in 25,000 images within iPhoto, I need some questions answered;
    Is there any way to force iPhoto to present faces by folder for tagging rather than randomly?  When so many images need tagging, over many years, the context of a folder helps with the identification. The work around is to load the images into iPhoto one folder at a time and do the tagging then.
    How do I get iPhoto to present the tagged faces by last name rather than first name? When so many faces will be identified, it is much easier to find people by surname, particularly when I share the library within the family. The work around is to enter names as last name and first name.  Being able to toggle the sort is much more desireable.
    Is there a way to export a portion of the library including faces?  I want to pass on portions of this huge 125 GB library to my family members.
    Since my family members will need an Apple computer to view the images and faces, they will likely have their own photo library.  So is there any way to combine two libraries and merge the faces?
    About 2/3 of my images have been scanned, so the date of creation is the scanned date rather than the date the photo was taken.  Will this mess up any sequencing or the retrieval of faces?

    If I want to carve off part of a library, I presume the way to do this is to make a copy of the library using PLM then go into iPhoto and delete what I don't want.  The result is the carved off portion.
    You don't need Library Manager to delete the portion you don't want.
    As a general rule: when deleting photos do them in batches of about 100 at a time. iPhoto can baulk at trashing large numbers at one go.
    If I want to merge two libraries, PLM implies that it will do this but will the Faces be merged too?
    I believe so.

  • To filter data acording to year of  date field of a table

    Hi i have a table
    TABLE  T1(ID NUMBER, SET_DATE DATE)I want to select id values from this table by comparing year present in set_date field.
    For that i wrote
    select id from t1 where set_date like '%2010%' ;It's returning no rows.
    But the following code is working
    select id from t1 where set_date like '%10%' ;Though second code is working there is a demerit in both these code because i am not specifying to match year.It's quite possible that 10 may be present any where else, and this query will return all those rows.So how to filter rows according to year?

    You should be careful that applying a function to your date column will bypass any indexes - unless it is an appropriate function based index. It is often better to convert your criteria to a match your data rather than convert your data once for every row in the table. The following example will allow the optimizer to use an index if appropriate;
    with  t1 as(
       select 1 id, sysdate set_date from dual union all
       select 2, add_months(sysdate,-12) from dual)
    select id
    from t1
    where set_date between to_date('01-jan-2010', 'dd-mon-yyyy') and
          to_date('31-dec-2010 23:59:59', 'dd-mon-yyyy hh24:mi:ss');
            ID
             1

Maybe you are looking for

  • ORA-06502 trying to load a long raw into a variable.

    Hi. In my table "banco_imagem" the bim_src column is a long raw type. I´m using oracle forms 6 (not 6i), so I can´t use blob type to save my images. Now I´m trying to load the long raw column into a variable in a package that runs on 10g. I´m trying

  • My iMac is starting with a safe boot

    Why is my iMac starting up with a safe boot?

  • Airport extreme-hook- wirelessly to airport timecapsel?

    I have an airport time-capsule hooked to modem. It it possible for an airport extreme to hook up wirelessly with the time-capsule to create an extended network for printing off the extreme?

  • Old iPhone, Old Computer, New Hard Drive

    My wife's hard drive crashed in her PowerBook G4. I want to sync her iPhone 3GS to the new hard drive in the old computer, but iTunes warns me that it is going to sync and overwrite all her apps. I have succeeded in syncing contacts, calendar, music,

  • Viewing privileges for a Role

    Hi , I have a role R. I want to see what privileges have been granted to this Role R. Where should i query? Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production "CORE    11.2.0.3.0    Pro