UpdateInfoFromFile doesn't work as expected

Hello,
it seems to me, that the command UpdateInfoFromFile() isn't updating changed tags in the MP3 file into the itunes library. I've changed tags outside of iTunes directly in the MP3 music file. Calling UpdateInfoFromFile wouldn't update the track data in iTunes.
Code sample:
iTunesLib.IITTrack itunesTrack = ...;
iTunesLib.IITFileOrCDTrack itunesFile = (iTunesLib.IITFileOrCDTrack)itunesTrack;
itunesFile.UpdateInfoFromFile(); // <-- Doesn't work anymore with no exception error

You are quite right.
I have the same problem.
I'm surprised, that no one have answered this post?
I think this a major blow to the COM library.
Regards
Thomas

Similar Messages

  • ArrayDeque as a stack doesn't work as expected with complex objects

    Trying to use ArrayDeque as a strorage for complex values <PSList<PSol>> (i.e. Arraylists of structured Values PSol), this doesn't work as expected. The code below should produce different values of pSLWk, being stored on bkStack, which are then to be retrieved by pop() to the variables pSL1, pSL2, pSL3.
    However, retrieval only ends up with three identical data sets (variables) pS1,pS2, pS3.
            public PSList<PSol> pSL;
            private ArrayDeque<PSList<PSol>> bkStack=new ArrayDeque<PSList<PSol>>();
            pSLWk=new PSList<PSol>();       // Constructor copies some Array (static field) to the PSLists
            pSL=new PSList<PSol>();
            pSLAux=new PSList<PSol>(pSLWk);   // Constructor copies from existing PSList
            pSLWk.checkResult("pSLWk prior to setDefaults - modifies pSLWk !");
            setDefaults();                                                            // Modifies pSLWk only
            pSLWk.checkResult(" pSLWk after setDefaults");              // .. got changes (o.k.)
            pSL.checkResult(" pSL after setDefaults");                  // .. unchanged  (o.k.)
            pSL.checkResult(" pSLAux after setDefaults");               // .. unchanged  (o.k.)
            bkStack.push(new PSList<PSol>(pSLWk));                      // store changes in bkStack
            pSLWk.getEl(77).setVal(new StringBuffer("4"));              // change pSLWk again (value 4 @ 77)
            pSLWk.checkResult("pSLWk, after PUSH, THEN modify 4@77");   // .. got change (o.k.)
            pSL.checkResult("pSL after setVal 77");
            bkStack.push(pSLWk);                      // store changes in bkStack
            pSLWk.getEl(80).setVal(new StringBuffer("8"));              // change pSLWk again (value 8 @ 80)
            pSLWk.checkResult("pSLWk after setVal 8@80");               // .. got change (o.k.)
            pSL.checkResult("pSL after setVal 80");
            bkStack.push(new PSList<PSol>(pSLWk));                      // store changes in bkStack
            pSL1=new PSList<PSol>(bkStack.pop());
            pSL1.checkResult("pSL1 after 1st pop");
    //      pSL1=bkStack.pop()                                          // Straightforward way doesn't work either...
            pSL2=new PSList<PSol>(bkStack.pop());
            pSL2.checkResult("pSL2 after 2nd pop");
            pSL3=new PSList<PSol>(bkStack.pop());
            pSL3.checkResult("pSL3 after 3rd pSLWk=..pop()");Here the result from the code above:
    debug:
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSLWk prior to setDefaults - modifies pSLWk !
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2   63 <C.R.> pSLWk after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSL after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSLAux after setDefaults
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  463 <C.R.>pSLWk, after PUSH, THEN modify 4@77
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 77
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSLWk after setVal 8@80
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 80
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL1 after 1st pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL2 after 2nd pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL3 after 3rd pSLWk=..pop()
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSLWk prior to setDefaults - modifies pSLWk !
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2   63 <C.R.> pSLWk after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSL after setDefaults
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.> pSLAux after setDefaults
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  463 <C.R.>pSLWk, after PUSH, THEN modify 4@77
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 77
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSLWk after setVal 8@80
    1 8 9   4  5 42 9 7  5  2 6 4 923     1  7   3         86   7 5  3 69     2   63 <C.R.>pSL after setVal 80
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL1 after 1st pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL2 after 2nd pop
    128 96  4635 42 9 7945  2 6 47923     1  7   3 9       86   7 5  3 69     2  4638<C.R.>pSL3 after 3rd pSLWk=..pop()What's the problem with this ?
    Rem: I tried the simple approach as well:
    bkstack.push(pSLWk);
    ...

    Thank you for your comments, although I see we still don't have a common understanding of the problem.
    Firstly, I add the code for the PSList and the PSol classes, so you might find some problem with that:
         public class PSol     {
              private StringBuffer val;
              private int zI;
              private int sI;
              private int bI;
                        // == Konstruktor
              public PSol( StringBuffer v, int z, int s, int b )     {
                   this.val=v;
                   this.zI=z;
                   this.sI=s;
                   this.bI=b;
                        // == Getter,Setter
              public StringBuffer getVal()     {return val;}
              public int getZ()     {return zI;}
              public int getS()     {return sI;}
              public int getB()     {return bI;}
              public int getVSize()     {return val.length();}
              public void setVal(StringBuffer v)     {val=v;}
              public boolean hasVChar( StringBuffer ch, boolean delCh )     {
                   boolean bT=false;
                   StringBuffer fSt=getVal();
                   if (!(fSt.indexOf( ch.toString() )     == -1))     {
                        bT=true;
                        if (delCh)     {
                             setVal(fSt.deleteCharAt(fSt.indexOf( ch.toString() )));
                   return bT;
         }     // PSol
         public class PSList<E> extends ArrayList<PSol>     {
                   /**     Construktor 1: PSList(v,z,s,b) - makes list from single arrays
              private static final long serialVersionUID =  4711L;                         // ### JAVAC Warning! ###
            public PSList (String[] vS, int[] z, int[] s, int[] b) {
                   StringBuffer[] v=new StringBuffer[valDim];
                for (int i=0;i<valDim;i++)  {
                    v=new StringBuffer(vS[i]);
    //ArrayList<PSol> pSL=new ArrayList<PSol>;
                   for (int i=0; i<valDim; i++) {
                        this.add( new PSol( v[i], z[i], s[i], b[i] ) );
    /** Konstruktor2 : makes list from matrix array
    public PSList () {
    for (int j=0; j<nDim; j++) {
    for (int i=0; i<nDim; i++) {
    this.add( new PSol( new StringBuffer(sGuiArr[i][j]), i, j , i/locDim + (j/locDim)*locDim) );
                        /**     ------- Construktor 3 : PSList(PSList pS) - makes list as a copy of an existing one
    public PSList ( PSList<PSol> pX )     {
                   super (pX); // ArrayList-Constructor (Collection)
    // get Element <PSol>
    public PSol getEl ( int i )     {return get(i);}
         public int getCount()     {return size();}
         public int getTValLg()     {
                   int lg=0;
                   for (int i=0; i<getCount(); i++)     {
                        lg=lg + getEl(i).getVal().length();
                   return lg;
                        /**     ------- checkResult()     -     Check if alll elements are single char +dump
         public boolean checkResult(String messg)     {
                   boolean allOne=true;
                   for (int i=0; i<size(); i++)     {
                        if ( getEl(i).getVal().length() > 1 )     {
                             allOne=false;
                             System.out.print(" ");
                   else     {
                        System.out.print(getEl(i).getVal());
                   System.out.println("<C.R.>"+messg);
                   return allOne;
         }     // Class PSList
    Secondly, I don't really see what you mean by pointing out to 'only one "pSLWk" instance of PSList'. The variable pSLWk is the variable to be worked upon; after some change of the contents, I want to save this state of contents to the stack. When I pop that variable from the stack, I wouldn't want to restore it to pSLWK, but to some other variable, e.g. by public PSList<PSol> pSL1;
    pSL1=new PSList<PSol>(bkStack.pop());Again - to my understanding (which comes from old days of microprocessor coding... - there shouldn't be a need to know how the data came there, or what was the name of the variable who stored it there. And  : the implementation of ArrayDeque returns 'elements' of class E, not references !
    Thirdly, you're right, that the method of using a copy constructor for retrieval looks 'weird'. However - I had some other versions that didn't work either, e.g. the straightforward one, as I pointed out.
    And fourthly: yes, I'm almost sure that I'm messing up something somewhere. I went to this forum hoping to clarify that ... :)
    If you don't mind, could you please sketch a few lines of code, how to 'push' a complex variable to a ArrayDeque stack, and retrieve it - by 'pop()' - to some to other variable of the same class later ?
    Might make our discussion much easier, to see how things REALLY work.
    Thank you !                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • VoiceOver navigation buttons doesn't work as expected on latest version of Firefox

    VoiceOver navigation buttons doesn't work as expected on latest version of Firefox. VO+Left/Right not jump from element to element
    Version of OS: OS X Yosemite 10.10.1
    Version of Chrome: 42.0.2311.90 (64-bit)
    Version of Firefox: 37.0.2

    Did this work in a previous version of Firefox?
    There is an open bug to improve accessibility on OS X. (Bug 336306) I'll update that bug with any relevant information you provide here.

  • Connecting to other computers on network doesn't work as expected.

    This is kind of interesting.
    I do this: From Menu Go > Network
    Then I choose either my iMac or MacBook Pro and double click the user name for my home folders on the other computers.
    A window opens up and the bottom right of the window the little twirling busy thing just goes and goes and goes.
    I notice the server icon on the Desktop and double click it and everything is there an access is fast, just like I expected from the first window that popped up. But it's still there, blank, with a little twirly thing (very technical).
    I get what I'm after, but it doesn't work the way it should.

    Try keeping your shares from sleeping during the expected period of use--assuming they are. If this procedure works, then you'll need to decide between the "lesser of the two evils."

  • Finder 'Back' button doesn't work as expected

    Try this in Leopard Finder: In Finder View Options (Command-J), set Applications to always open in icon view, and Documents to always open in list view. Now open a fresh window and click each in the sidebar. They open as expected, one in icon view, and the other in list view. Now click the back button, and you're looking at the folder you just had open half a second earlier, but it's suddenly shifted to a different view - a view you explicitly told the Finder you didn't want this folder to open in. How does this make sense?
    (Thanks to grasshopperus for posting this first at arstechnica: http://episteme.arstechnica.com/eve/forums/a/tpc/f/8300945231/m/982000038831/p/1)

    Back button behaviour can be pretty wierd. I usually use the keyboard combination, but for some reason it doesn't work on PDF's and I have to end up using the graphical back button.
    There are some websites out there that for some reason or another break the Back button's behaviour. Sometimes I have to hold down the mouse button to get the back button menu in order to work around that problem.
    In another case there was this page in Amazon that wouldn't allow me to go back to. Everytime I went to that page the browser to automatically kick me to the next page. I had to disable javascript to work around that problem.

  • Changed AppleID doesn't work as expected - System shows old AppleID

    A friend of mine switched her AppleID in their OS X system. E.g. she changed the respective preference panel.
    Unfortunately, the switch didn't work as expected: If she tries to download application updates in AppStores, the system allways presents the old AppleID. Additionally, she isn't aple to change the AppleID value in the respective dialogs.
    Since she changed all places she is aware of, the system effectively prevents all updates since a far too long time now...
    Questions
    Did someone know how to effectively change the AppleID system-wide?
    Should she delete a certain *.plist file?

    The actual email address doesn't matter. Once it is created as an AppleID, it is just a text string that is used as the username for iCloud, iTunes Store, Mac App Store, etc. It does get used as a contact email, but you can associate any number of email addresses with that AppleID. The password used for the AppleID should be different than the email address, but could be the same if you choose. Regardless, there is really no link between an email account and the AppleID, besides the same text string is used.
    As I stated earlier, AppleIDs cannot be merged or transferred and the purchases on one AppleID cannot be transferred to another. Whatever AppleID was used to purchase the items has to be used to update them or reinstall the OS.
    It doesn't matter that she created a new AppleID. The purchases on the old ID cannot be transferred to the new AppleID. The old email address (which isn't an email address but a username for the AppleID) pops up because that is the AppleID that was used to purchase the OS. Nobody can change that, unless Apple decides to change its position, which I doubt it will due to security concerns.

  • Images in Multicolumn Listbox doesn't work as expected

    In the attached example, the symbols are getting displayed in the correct order but missing the symbol for the first row. I can manually select the symbol but by default only the 2nd symbol from the provided array list appear.
    Any idea what's the issue?
    How to display correct symbol?
    Thanks in advance.
    Cross-post from LAVA: http://lavag.org/topic/15788-images-in-multicolumn-listbox-doesnt-work-as-expected/page__pid__95584#...
    Solved!
    Go to Solution.
    Attachments:
    Images & Multicolumn ListBox.vi ‏10 KB

    Hello, Vidula
    It seems that index 0 is reserved for the empty symbol, no matter what custom symbol you provided. Adding one image in front before setting symbols array and incrementing ItemSyms indexes solves this problem. However, I can't find any information about this in documentation, which would be nice
    Attachments:
    Images & Multicolumn ListBox.vi ‏12 KB

  • XML Error Handling doesn't work as expected

    Hi there,
    we are doing some syncronization szenarios between CRM 5.0 and a legacy system via XI.
    One szenario is an asynchronous XML syncronisation. As there are database locks the messages are errornous and turn to system failure - restartable (red flag). To be seen in SXMB_MONI.
    Regarding to weblog /people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically I configuered the CRM middleware with IS_Retry and also scheduled a job for report RSXMB_RESTART_MESSAGES.
    That worked fine until yesterday our synchronous XML szenario dumped and produced errornous messages type system failure - not restartable (red dot). Since then the IS_Restart doesn't work anymore.
    I've no idea how to handle theese messages. It seems they are preventing IS_Retry from working. If there are red flagged messages I can process them manually or with report RSXMB_RESTART_MESSAGES. But they are not automatically re-processed via IS_Retry.
    I also checked the queues and they look fine in smq2. There are no stucked queues.
    Does anyone have any idea what is going wrong and how I can fix this issue? I could schedule the report to work more than once a day as it is at the moment (night job), but IS_Retry option would be the better szenario.
    Thanks a lot in advance.
    kind regards
    Michael

    Hello Suraj,
    the error log in SXI_MONITOR tells me that the sender/receiver realtion couldn't be found, due to XI had a downtime.
    On Audit log from Message Monitoring on adapter engine I don't have permission, as I am working only on the CRM.
    But i was able to deal with the errornous XML. The deletion job in sxmb_adm (rsmb_delete_messages) with the parameter PERSIST_DURATION_ERROR with Subparameter SYNC Value 1 has removed them from the system.
    According to forum deletion of unprocessed xml messages
    But I still don't know why IS_Retry doesn't work anymore.
    Kind regards
    Michael

  • Webutil: webutil_file.file_open_dialog with filter doesn't work as expected

    Hi
    I just tried to open files by using webutil_file.file_open_dialog. Since I only want to select files with the prefix "brp" (e.g. brp0001.txt, brp0002.lis), I fill the parameter file_filter with the value: brp*.*
    This doesn't work. The dialog only shows folders, but not the brp*.* files. I tried with switching to capitals, which doesn't solve anything. With the filter set to *.* the dialog shows all folders and files, so that seems to work ok.
    Is anyone aware of this problem and know a solution? I'm using webutil 1.0.2 (beta).

    K..here's some logging. As far as I can see it's all normal, but it doesn't work (no matter if I use a last | or not). Should be easy to reproduce.
    2003-okt-29 09:42:44.547 WUF[setProperty()] Setting property WUF_GFN_DIRNAME to y:\data\
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILENAME to false
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILTER to (brp_archief*.*)|brp_archief*.*
    2003-okt-29 09:42:44.587 WUF[setProperty()] Setting property WUF_GFN_MESSAGE to bestandsnaam selecteren
    2003-okt-29 09:42:44.597 WUF[setProperty()] Setting property WUF_GFN_MULTISELECT to FALSE
    2003-okt-29 09:42:44.608 WUF[getProperty()] Getting property WUF_GFN_OPENFILE
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Creating Custom File Filter : Mask=brp_archief*.*, Label=(brp_archief*.*)
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Open File mode
    2003-okt-29 09:45:27.203 WUF[getProperty()] Value of WUF_GFN_OPENFILE=

  • Vi.lib\Utility\config.llb doesn't work as expected in 6.1

    I have to modify part of a LV project written in 6.1. I started of writing a patch/VI for the project in 7.1.1, tested it and it worked fine. Then I save it from 7.1.1 > 7.0 > 6.1 and the code doesn't work. I have attached the 6.1 and 7.1.1 code that simply modifies a config data file.
    Run both the VI version on the attached data file (save copies of it beforehand as the VI overwites/modifies the .dat file) and you should see for e.g.
    4.6.2.1 Name=Pass
    Change to
    4.6.2.1 Name="4.6.2.1 Extend Ground Cycle"
    with 7.1.1
    and no change with 6.1
    Attachments:
    Modify Configuration File.zip ‏52 KB

    The problem is at the very end. The 'Close Config Data.vi' changed between 6.1 and 7.0. The input 'Write Configuration File' on 7.0 and higher is default to True, any version before that was default to False. With this set to false, the file is not actually written.
    So on 6.1, you need to connect a boolean constant or control set to True to this termianl to write the file.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Save link as option doesn't work as expected anymore

    When I formerly right clicked a link to a file (to download) and chose the option '''Save link as''', I was able to save the file to the location I specified.
    At the moment this doesn't work anymore. When I click the same link as before and choose save link as, firefox wants to save the .htm page instead of the .csv file.

    You can try "Reset Download Actions": http://kb.mozillazine.org/File_types_and_download_actions

  • Gmail archiving in iOS doesn't work as expected

    Hello,
    In the IOS Mail app I can use archive to move my mails to an archiving folder so I can review them afterwards. This works for Outlook.com or exchange accounts but not for Gmail.
    In mail advanced options I can set an archive mailbox, for example "Archive" instead of "All Mail".
    But then whenever I archive an email it disappears from my inbox but it's not moved to the archive folder I selected ("Archive").
    If I check the Gmail website I can see the "inbox label" is removed for that mail but the "[imap]\archive" label isn't added, forcing me to go to the All Mail folder to recover the mail. I understand that's the way archiving works in the Gmail website but having an option to choose an archiving folder in Mail and then not using it gets confusing.
    Archiving in OSX Mail works as expected (archive button moves mail to a mailbox called [imap]\Archive).
    Also, in iOS, when browsing mailboxes from the settings app the Archive icon is next to the archive mailbox but in the Mail app it's next to the "All Mail" mailbox. That seems like an inconsistent behavior to me.

    When you archive email in Gmail, it gets moved out of the In Box. Gmail uses "All Mail" to archive mail, not a folder called "Archive". My experience is that the Mail app on iOS devices exactly mirrors the folder structure of my Gmail account. My interpretation of that setting was that you chose to move the mail to deleted or to whatever folder the mail service uses to archive its mail. And, "All Mail" is that folder for Gmail. I would find it terribly disconcerting if the Mail app on my phone created a folder that didn't exist in my Gmail account.
    I haven't used the Mail application on my Mac in years because I hate it so I can't comment on that.
    Submit your feedback directly to Apple using the appropriate link on the Feedback page:
    http://www.apple.com/feedback

  • (SOLVED) Lock screen suddenly doesn't work as expected

    It doesn't matter which lock screen (PIN, swipe, etc.) I choose, after the first unlock (after a reboot or change of lock screen), the phone no longer locks. Using the power button to lock doesn't work and I have the phone set to lock right away on sleep. It was working fine a few hours ago and there wasn't anything new I did to the phone.
    Any ideas?
    Solved!
    Go to Solution.

    Hello, I feel pretty dumb. I must've hit the "Disable lock screen" option in the BatteryBot Pro app by accident...I forgot it even had that option.
    If anyone's curious how I solved this, I inspected system messages using OS Monitor while reproducing the problem (ie, flipping through lock screen options and turning off/on the screen) and kept seeing the app's name coming up as well as a few others. I'm not sure why it started disabling the lock screen today though; I'm pretty sure I didn't touch the app in the last couple days.
    Anyway, sorry for any inconvenience.

  • Solaris installation doesn't work as expected on both PCs I've tried it on?

    Hi there, I have just tried to my Solaris 10 download on two PCs and it doesn't seem to go the way expected in the installation instructions: No Grub menu appears. It does say Grub at the top of the screen, tells me about base and extended memory, then it gives me a little prompt about being able to press Tab for a list of commands. A list of commands appears when I press Tab but having typed them one after another, it doesn't seem to be working. Is this normal?

    Oops, sorry, my fault. Just checked the download instructions: I didn't concatenate the files. Sorry.

  • MAX function to get recent date doesn't work as expected

    Hi,
    I recently started working on Oracle and came across this problem. I coded below given query to get the latest date from table and compare it with Sysdate + 1 timestamp. I am not able to understand what I coded wrong but the query gives me wrong results as explained below :
    select NVL(MAX(to_char(max(last_update),'mm/dd/yyyy hh12:mi:ss AM')), to_char(sysdate + 1,'mm/dd/yyyy')||' 12:00:00 AM')
    from Audit_Table_Name
    where col1 = 'AA'
    and location_type = 'STATE'
    and original_flag = 'Y'
    group by col1,location_type,original_flag;
    Here Max(last_update) from Audit Table Contains value --> 08/25/2009 12:00:00 AM
    Note : Data type of last_update is Date
    so ideally speaking it should give 08/26/2009 12:00:00 AM but surprisingly it is giving 08/25/2009 12:00:00 AM as output. Anyone can explain why this is happening and what we need to do to get correct results?
    Regards,
    Amol

    1) Why would you expect this to return a date of 8/26? NVL returns the first parameter unless it is NULL. If the first parameter is NULL, it returns the second parameter. Since
    MAX(to_char(max(last_update),'mm/dd/yyyy hh12:mi:ss AM'))returns a non-NULL value, that value will be returned. Oracle never needs to evaluate the second parameter
    to_char(sysdate + 1,'mm/dd/yyyy')||' 12:00:00 AM'You state that you want to compare the MAX( last_update ) to SYSDATE + 1. Your code isn't doing a comparison now. And it's not clear from your description what comparison you actually want to do. Can you elaborate a bit on what you want to compare and what the output should be depending on the result of that comparison?
    2) You almost certainly want to do as much of the logic as possible using dates and only convert to a string at the very end. Otherwise, you risk comparing two strings that represent dates using string comparison semantics and getting a result you don't expect.
    3) My guess (and it is just a guess) is that you want something like
    SELECT GREATEST( max(last_update), trunc(sysdate+1) )or
    SELECT TO_CHAR( GREATEST( max(last_update), trunc(sysdate+1) ), 'mm/dd/yyyy hh12:mi:ss AM' )Justin

Maybe you are looking for