Query to retrieve latest version

Hi,
I am trying to create a query that retreives the latetst version of a product. There are 2 tables I query from, one has the product number and one has the version- a varchar2(60) datatype. The versions are listed A,B,C..... etc. So I want the query to give me one row for each product with its latest version. This is the query I have thus far,
SELECT A0.Prod_num, A0.version
FROM (SELECT A0B.Prod_num, A0.version
     FROM tb_1 A0,tb_2 A0B
     WHERE (A0.tb_1pk=A0B.tb_2pk)) A0
order by A0.Prod_num
This returns duplicate rows of products and versions.
Thanks.

sybrand_b wrote:
SELECT A0B.Prod_num, A0.version
FROM tb_1 a0, tb_2 A0B
where a0.tb_1pk = a0b.tb_2pk
and a0.version =
(select max(version)
from tb_1 a0a
where a0a.tb_1pk = a0.tb_1pk
Question: This aren't the real table and column names, hopefully, are they?
They are so cryptic the chance for erroreneous statements is 99.9 percent!
Sybrand Bakker
Senior Oracle DBASybrand,
If you think these names are cryptic, the actual names names are much, much worse. This a COTS application and the datatbase object names, for some reason, are completely random and counter-intuitive.
Thanks for the query solution!

Similar Messages

  • Query to retrieve latest five transactions for each account

    hi,
    I have a table containing transactions of all account holders (this table contains thousands of records). My requirement is to retrieve recent five transactions from the table for all the account holders. Can anyone help me to retrieve the required data.
    Note: Each account holder may have more than one account e.g. savings account, current account etc.
    Regards,
    N Madhavan

    Hi,
    try something like
    select * from (select row_number() over (partition by holders order by transaction_date desc) r, t.* from t) where r<6;
    HTH
    Laurent Schneider
    OCM DBA

  • Retrieving Missing Sync Settings When Upgrading From an Older Version of Firefox to the latest version.

    I initially set up my Sync account using an add-on for an older version of Firefox and have since upgraded to the latest version. But now my browser acts as if I don't have a sync account set up at all. When I attempt to create a new account, it says that my email address is already being used which tells me that my sync information is still on the the servers. So how do I retrieve my sync settings when settings are missing within my browser?

    I resolved the problem in Snow Leopard by logging out of my (admin) account and logging into my daughter's account on the same machine. She doesn't have admin privileges, so when I tried to install Firefox 4 in her account, I had to authenticate with my admin identity and PW. Installation went smoothly after that. My guess is that you could also simply create a new account on the same machine and install Firefox 4 from that. I have no idea why this works.

  • I run OSX 10.6.8 The latest version of Safari has been downloaded in error. How can I retrieve Safari with all old bookmarks etc?

    I run OSX 10.6.8. Latest version of Safari has been downloaded in error. What is the best metod of retrieving Safari with all bookmarks etc intact?

    Thank you very much indeed.

  • Workbook doesn't pick up latest version of query automatically

    Hi all
    has anyone come across the problem in BI7 where an alteration to a query already existing in a workbook is not automatically picked up.
    My workbook continues to use the old version of the query, unless I remove it and respecify it within the workbook.
    Is there something I should be doing to tell the workbook to pick up the latest version?
    Thanks
    Hayley

    Hayley,
    No worries - when you select Properties you should get a dialogue box with four tabs. Display - Interaction - Column Width and Information. Select the Interaction one, looks like the Return to Global Definition on refresh is not selected (which is the default).
    If you select it, save your workbook and then refresh your query - you should see the current version of your query in the workbook.
    Regards
    Gill

  • Why does "Check for Updates..." show that there are no updates available while I'm using Firefox 3.6.18 and latest version is 5.0.1?

    First and foremost, I'd like to clarify that I hardly have any technical knowledge. So pardon me if this comes across as a silly question to the professionals. Here are the details pertaining to this problem as per the best of my limited knowledge:
    I'm currently using Mozilla Firefox 3.6.18; previously it was 3.6.13. It was updated to 3.6.13 from 3.6.9 after I clicked on Check for Updates... and it told me that it'd be done when I reboot my system. When I restarted my PC, I was surprised to find that it was downloading the version 3.6.18. I didn't know how much it'd progressed in the process, so I let it finish it. After that, I disabled the option that enables it to download and update on its own, and turned it off. Next time when I started it, it was 3.6.18, but wasn't updating on its own anymore.
    Now I wanna update it directly to the latest version 5.0.1. But when I leave it to "'''Automatically download and install the update'''" option under Tools>Options>Advanced>Update, it downloads and updates the versions as per their release order. So if I leave it to it, then when I start it next time, it'll start downloading the version next to 3.6.18 and update to it instead of updating directly to 5.0.1. It'll keep doing so until it reaches there. For reasons of my own, I don't like that. So I '''unchecked '''the "Automatically download and install the update" option and chose the "'''Ask me what I want to do'''" option (so that it doesn't keep repeating the "downloading and updating" process on its own every time I start my PC). Then I went to Firefox site and thought of downloading and updating to the latest version on my own. But then I was informed that if I do so, '''I'll get the latest version, but I'll lose all my saved bookmarks unless I follow some hectic procedure to save them and load them again after installing the latest version of Firefox'''. I don't want to let that happen either. So, can anyone suggest me a way out of this situation without losing my bookmarks?
    Almost forgot. I tried several times by going to '''Help>Check For Updates...''', but every time it returned the same result: "There are no updates available. Firefox will check periodically for updates." How come no update is available while the version I'm using is 3.6.18 and the latest version is 5.0.1? In short, '''Check for Updates...''' didn't help either. (Even when I updated it last time, shouldn't it have updated itself from version 3.6.13 to 5.0.1 directly?)
    So, can anyone suggest a way by which I won't lose my bookmarks and would be able to update to the latest version directly too? An answer that wouldn't involve removing the current version and installing the latest one, but directly update to it (it's okay if it needs downloading) would be more welcome. I know that the bookmarks can be saved in a file and all, but I'd like to know if it's possible as it happened for my current version from previous version. (It downloaded and updated itself on its own, disturbing nothing, not even logged me out of certain accounts where I stay logged in. The only problem there was that it wasn't updating directly to the latest version.)
    I hope the aforementioned details make sense and are helpful enough for others to help me. Thanks.

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • Why doesn't latest version of pdf have a visible signature, only blank fields

    I'm C# user and tried both createUrlWidget and createPersonalUrlWidget to send a test document, and after it signed by signer, I used both getLatestDocument and getDocuments, but only get a pdf without seeing signature like this:
    I can get signed doc using the link in email sent to signer:
    So, I'm confused, can anybody answer me where did I missed?
    1. the method I used to create url widget:
    public static bool createUrlWidget(string fileName)
                FileStream file = File.OpenRead(fileName);
                com.echosign.secure.FileInfo[] fileInfos = new com.echosign.secure.FileInfo[1];
                fileInfos[0] = new com.echosign.secure.FileInfo(fileName, null, file);
                SenderInfo senderInfo = null;
                //string[] recipients = new string[1];
                //recipients[0] = recipient;
                RecipientInfo[] recipients = new RecipientInfo[1];
                recipients[0] = new RecipientInfo();
                recipients[0].email = "[email protected]";
                RecipientRole role = new RecipientRole();
                role = RecipientRole.SIGNER;
                recipients[0].role = role;
                WidgetCreationInfo widgetInfo = new WidgetCreationInfo();
                widgetInfo.name = "Test Docx";
                widgetInfo.fileInfos = fileInfos;
                //widgetInfo.counterSigners = recipients;
                WidgetPersonalizationInfo personInfo = new WidgetPersonalizationInfo();
                personInfo.comment = "Test sign of doc";
                personInfo.email = recipients[0].email;
                personInfo.reusable = false;
                UrlWidgetCreationResult result = ES.createPersonalUrlWidget(APIKey, senderInfo, widgetInfo, personInfo);// ES.createUrlWidget(APIKey, senderInfo, widgetInfo);
                if (result.success)
                    DocumentKey2 = result.documentKey;
                    urlWidgetReturn = result.url;
                else
                    return false;
                return true;
    2. the method I get the documents, there's only 1 content in returned DocumentContent[]:
    public static void getDocuments(string documentKey)
                GetDocumentsOptions opts = new GetDocumentsOptions();
                //opts.versionKey = "latest version";
                //opts.participantEmail = "[email protected]";
                opts.combine = true;
                opts.attachSupportingDocuments = true;
                GetDocumentsResult result  = ES.getDocuments(APIKey, documentKey, opts);
                if (result.success)
                    DocumentContent[] contents = result.documents;
                    foreach (DocumentContent dc in contents)
                        FileStream file = File.OpenWrite(string.Format("c:\\{0}.pdf", Guid.NewGuid()));
                        file.Write(dc.bytes, 0, dc.bytes.Length);
    This is my first time to use this api, so maybe I missed some important steps to cause this. I appreciate anybody which could see this and help me.
    Thanks a lot!
    Kenny

    I figured it out myself, I should use the shorter keys parsing from formDataCsv in GetFormDataResult to retrieve the latest version.

  • How to Find the Latest Version of Cluster Binary Files available at Microsoft website

    How we can find the latest version of Cluster binary files available for download at Microsoft Website and which Cluster Binaries should be update to make the Cluster services stable healthy.

    @AnatolySV : I believe you need to put some efforts to understand what he is asking.
    You may find the latest version of Cluster Binaries by entering the required keywords for Microsoft Failover Clustering. Some of the main Cluster binaries(Keywords) are:-
    Clusres.dll (For Cluster Resources like Disk, Application or Service, Cluster IP)
    Clussvc.exe (Cluster Service)
    TCPIP.sys (If the Storage is presented to the cluster Nodes via ISCSI Network).
    MPIO.sys / ISCSIprt.sys (If we are using Multipathing for the disks to be presented).
    RHS.exe (Resource Host Subsystem)
    So, the Answer to your question is: You need to enter the binary name "Clusres.dll" and mention the Operating System you want to install your binaries to "Windows Server 2008 R2 Sp1" on Bing (Preferred for Microsoft Hotfixes). In Result you will get the
    list of hotfixes for clusres.dll
    You need to try this multiple times in order to get the latest version as Microsoft does not have a single Link.
    Hope this answers your query. Feel free to leave a message incase you need more help.
    Maybe) 
    But hey, you`ve got +1 from me for clarification) 
    Anyway, I still think that the initial question could be more clear and exact. 

  • [32282.000367] firefox:2114 freeing invalid memtype c02f2000-c0302000 I get this from system log using latest version of Firefox: What kind of problem is this?

    I get this from system log using latest version of Firefox:
    [32282.000367] firefox:2114 freeing invalid memtype c02f2000-c0302000
    What kind of problem is this?
    Anyway Firefox seem to be working correct. I would like to be sure that it'snt a security problem.

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • How can I get Recipefox to work with the latest version (16) of Firefox?

    Recipefox worked on previous versions of Firefox. I could use the Grab It feature on many sites & easily retrieve recipes. Now, with the latest version of Firefox, it does not work on any of the recipe websites. Is there a more recent version of Recipefox that works with Firefox version 16, I am using 0.68. Does Recipefox get updated with newer versions of Firefox.

    Hi,
    You can try to right-click and '''Find Updates''' via '''Tools''' ('''Alt''' + '''T''') > '''Add-ons''' > '''Extensions'''. You can also '''Remove''' it, and search and install via the Search box on the top right or from [https://addons.mozilla.org/en-US/ AMO].
    [https://support.mozilla.org/en-US/kb/Using%20extensions%20with%20Firefox Using Extensions]
    If problems persist you can reset Firefox and start afresh with [https://addons.mozilla.org/en-US/firefox/addon/recipefox/?src=search recipefox].
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • HT1349 I had to reinstall my OSX.  I had previously purchased the latest version of Quicktime.  How do I reload it.....

    I had to reinstall my OSX.  I had previously purchased the latest version of Quicktime on line .  How do I reload it.....

    I assume you mean Quicktime 7 pro.
    You may need to download Quicktime again (I can't remember if it's bundled with leopard or not)
    QuickTime 7.7 for Leopard.
    You can retrieve purchased registration keys this way:
    Visit the Apple Online Store.
    Cick "Account" in the upper-right corner.
    Click "Downloadable Software Purchases".
    Enter your Apple ID and password.
    You should see your QuickTime Pro registration key(s).

  • Get Latest Version extremely slow

    Hello,
    When we do a "Get Latest Version" for a project containing about 450 subfolders this operation shows the "Contacting server to get list of items to update..." for a very long time. Eventually it will come up with an error "HTTP code 500: Internal Server Error". The event log indicates a time out. I have already increased the executionTimeout values for the various .config files used by the Web Services. This increases the time it takes for this error to appear (this can take up to 2 hours) but the error still appears. These subfolders each contain about 20 files with a total size in each folder of 180KB. 
    While the "Get Latest Version" is active the server CPU is not busy at all, it stays at 1-2%. It does not matter if we do the get latest from a client or on the server itself, the result is the same. It looks as if Team Foundation is blocked on something.
    When we do "Get Latest Version" on a smaller project (2250 files, 272 folders, total size of all files 134 MB) the operation also takes a long time, but it completes successfully.
    I've only been able to retrieve all files successfully by creating a .cmd file which contains a get command for each individual sub folder:
    tf get Folder1 /force /recursive
    tf get Folder2 /force /recursive
    tf get Folder3 /force /recursive
    etc.
    The execution of this command file takes about 20 minutes. During this time the TF server shows a much more substantial CPU load.
    We are running our Team Foundation Server (single-server deployment) on a Dell PoweEdge SC440 server (3.0 GHz, 1 GB RAM, Server 2003 R2 Standard Edition SP1).
    I have searched the forums for hints on these performance problems, but haven't found anything except instructions to look at the network configuration (half duplex/full duplex/auto detect). This can not be the issue since the issue also appears locally on the server.
    Any help would be appreciated, we really need to improve the performance of the system to make it usable for us.
    Regards,
    Henk.

    I'm sure there is a problem with our domain controller setup. When I had problems installing Team Foundation I found a post which advised to run a dsquery statement which does something similar to what the Team Foundation installation tries to do. When I tried this statement it failed with an error, at that point I decided to switch to using Workgroup accounts for the setup.
    Having said that, I had no problems logging on to the Team Foundation server system using a domain account, but it does appear other parts of the Active Directory functionality are not working correctly. We do not have much Active Directory expertise at the moment, it's something we will look into later.
    Henk

  • Why can't I update latest version of apps. Always request applied . Although I sign in using correct password

    Why can't I update latest version of apps. Always request applied. Although I sign in using correct password. But everytime prompted with incorrect password , retrieve password

    There are plenty of apps still compatible with iOS 4.2.1. Not a majority, necessarily, but they're still out there. If the app you want requires a newer version, find another app the accomplishes the same thing.
    Of course, it may be too late for that now, since you chose to hack/jailbreak your iPhone, and it is currently a brick. As varjak paw stated, this forum will not help you with your hacked phone.

  • Can't access latest version!

    I cannot open my current photo library using my iPhoto 7.1.5( orig.version). There was a latest version that was downloaded(I don't know what version it is) . I can't retrieve it to open my library. What do I need to do(options!) and how can I do it?

    That can be an indication of a damaged library. Try the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select options #3 and #5.
    Click to view full size
    Fix #2
    Rebuild the library using iPhoto Library Manager as follows:
    Using iPhoto Library Manager to Rebuild Your iPhoto Library
    1 -Download iPhoto Library Manager and launch.
    2 -Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
    4 - In the next window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be untouched for further attempts at fixing or in case the rebuilt library is not satisfactory.
    OT
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: The new rebuild option in iPhoto 09 (v. 8.0.2), Rebuild the iPhoto Library Database from automatic backup" makes this tip obsolete.

Maybe you are looking for