Grab a list of the latest note for each job when/if they start with set text

How would I look only to the latest [01-JobComment].[Creation_Date] where [01-JobComment].[text] starts with the text "AB001:" for each [05-Job].[Job_ID]?
SELECT [05-Job].Job, [01-JobComment].[CREATION_DATE], Mid([01-JobComment].[TEXT],1,6) AS AB001, [05-Job].Name, [05-Job].Owner, [05-Job].Type, [01-JobComment].CREATED_BY, [01-JobComment].CREATED_BY, [05-Job].Status, [05-Job].Owner
FROM [05-Job] INNER JOIN [01-JobComment] ON [05-Job].Job = [01-JobComment].JOB_ID
WHERE ((([01-JobComment].[CREATION_DATE])>[05-Job].[AsBuiltProof]) AND ((Mid([01-JobComment].[TEXT],1,6))="AB001:"))
ORDER BY [01-JobComment].[CREATION_DATE];

I'm not sure this is what you want:
SELECT [05-Job].Job, (SELECT Max(T.CREATION_DATE) FROM [01-JobComment] AS T WHERE T.JOB_ID=[01-JobComment].JOB_ID AND Left(T.[text],6)='AB001:') AS CreationDate, Left([01-JobComment].[TEXT],6) AS AB001, [05-Job].Name, [05-Job].Owner, [05-Job].Type, [01-JobComment].CREATED_BY,
[05-Job].Status
FROM [05-Job] INNER JOIN [01-JobComment] ON [05-Job].Job = [01-JobComment].JOB_ID
WHERE [01-JobComment].[CREATION_DATE]>[05-Job].[AsBuiltProof] AND Left([01-JobComment].[TEXT],6)="AB001:"
ORDER BY [01-JobComment].[CREATION_DATE];
Regards, Hans Vogelaar (http://www.eileenslounge.com)

Similar Messages

  • Getting the latest area for each case

    dear all;
    I have a table with the following info below
    create table tmp_a
           idv number(30),
           personid number(30),
           Area varchar2(200),
           dateadded date,
           is_close number(2)
    insert into tmp_a
      (idv, personid, area, dateadded, is_close)
    values
      (1, 10001, 'ZONE_A', sysdate, 1);
    insert into tmp_a
      (idv, personid, area, dateadded, is_close)
    values
      (2, 10002, 'ZONE_B', sysdate, 0);
    insert into tmp_a
      (idv, personid, area, dateadded, is_close)
    values
      (3, 10003, 'ZONE_A', sysdate, 0);
    insert into tmp_a
      (idv, personid, area, dateadded, is_close)
    values
      (4, 10003, 'ZONE_A', sysdate, 0);
      Now I would like to get this below
    idv   Personid   Area        Dateadded                           Is_clode
    4       10003   Zone_A     3/3/2011 1:00:37PM               0
    2       10002   Zone_B     3/3/2011 12:17;14PM              0the output is based on the fact, if there are duplicates associated with the area, the query should pick the latest one...In this case, the latest one for zone_A is idv 4.
    kindly note, idv is a primary key. How do I go about doing that? All help is appreciated. Thank you.

    Hi,
    ROW_NUMBER returns a unique number for every row. If you have n rows, it will return the integers 1 through n, without skipping or duplicating any numbers, so you can be confident it will return the number 1 on exactly 1 row.
    ROW_NUMBER (PARTITION BY area ...)     means that a separate set of integers, each starting with 1, will be returned for each distinct value of area.
    ROW_NUMBER (PARTITION BY area ORDER BY idv DESC)     means that the numbers will be assigned in DESCending order by idv. The row with the highest idv for each area will be the row for which ROW_NUMBER returns 1.
    The LAST function, as demonstrated by Solomon, is a good thing to have in your toolbox, but you have to code a somewhat complicated expression for each column (except the GROUP BY column, and the column that determines the order). When you need to pick an entire row, I find it easier to use ROW_NUMBER.
    Also, ROW_NUMBER can easily be adapted if your needs change. Where I work, people are always saying things like "Remember that query you wrote for me, that returns the latest row fro each area? Can you make it return the latest 5 rows?" or "It truns out idv isn't unique. Can you make it return all the rows with the highest idv?" It's easy to change the ROW_NUMBER solution to do things like that.

  • I cannot install the latest update for itunes. After installing an ssd with a dual drive kit, and freshly installing osx lion.

    After downloading the update and restarting to complete the installation, as the restart process begins it is interrupted by this message: Could not install some of the updates. Then it restarts, and i am stuck with itunes 10.6.3. What could the issue be? Mac Mini mid 2011, 500gb HDD, 128gb Samsung 850 pro SSD, 8gb ram. Running OS on SSD.

    First open Disk Utility and try repairing the HD
    Next, I would try installing the 10.7.5 combo update
    OS X Lion Update 10.7.5 (Client Combo)
    Last, post in the iTunes for Mac forum
    iTunes for Mac

  • HT1338 I want the latest software for my Mac, because I am starting to use for a small business, just ordered Snow Leopard 10.6, but thought the latest was on computer. When I say to update, they say have no updates? y I a, at was h

    This is my first time here, so hope this is right.  I am starting to work for a company that does everything on line. I need to find out about several things with my mac. computer. i.e.  creating files/folders, sub folders, skype, thunderbird for mac. Save files, create new mac accts, etc.
    I have been on line all day, looking for all these things, or how to go about it.  I live in a community, that only uses pc's and not a lot of resources. So any help you can give me would be great. Or direct me to the right place.

    Assuming that you're familiar with PCs, see these:
    Switching from Windows to Mac OS X,
    Mac Basics—Tutorials on using a Mac,
    Mac OS X keyboard shortcuts,
    Apple How-To Guides for Mac OS X,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Mavericks Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • No covers for sale for the latest Blackberry Bold 9790. When will they be on market?

    Hey guys, I just got my Blackberry Bold 9790 last month. But when i got it, they told me that the covers haven't arrived here in Malaysia yet. But I was wondering though, are they really for sale in other countries? I mean, we need covers for phones man, or phones are going to be naked. When will we be able to get it?

    you mean a case (to protect the phone)  or the battery cover?
    there are many case makers around online, not sure if they ship to you or not yet.
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • After the latest update for firefox, now when I start firefox up I keep getting a pop up window that is a Java Script Application that says TypeError:Components.classes['@softage.ru/skype/skypeFfExtension;1']is undefined.

    After closing this Firefox seems to work fine but this happens everytime on startup. How can I get rid of this pop up window starting everytime? Can I re-install firefox? Would I lose my bookmarks etc?

    Once I disabled my Ask.com toolbar (that was installed when I installed FoxIt), the error went away.

  • Why will iTunes not sync to my iPod after installing the latest update for iTunes?

    Hi I have a Macbook and I just downloaded the latest update for iTunes and when I plugged in my iPod to sync I keep getting and error message. How do I fix this problem?

    I haven't done one of those for a while. But the following troubleshooting document might still be worth a shot:
    'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod

  • Where to download the latest firmware for Toshiba TL938G

    Can anyone give me a link where to download the latest firmware for TL938G?
    I want to update with USB stick
    Thanks

    Sorry mate, it seems that the link provided in my first post does not work anymore
    however I found the firmware update v7.0.27.14.1 but for Model: *40TL938F*
    http://www.dl.toshiba.com/tsb-dtv/NA/GB/EN/40TL938F.html
    but this is firmware is released ONLY for TV devices released in France.
    The suffix code F means France
    If you cannot find the firmware for your TV device, this means that such firmware is not available or can be updated only via network update.

  • How to determine the time duration of each job for a particular report

    Hi guys,
    I am facing a very interesting problem which I want to share with all of you-hoping to get some input from you
    enlightened fellas :).
    I have vendor and vendor sub-range maintained in one custom table. For each vendor I have got article site combination maintained in another table. The thing is I have to execute this program in background. Now for each vendor I may have only 1 article or multiple articles. So if I schedule the job for 60 min. say then for 1 article the time alloted will be too big and for multiple articles the time alloted may prove to be too small. Another thing from a functional point of view is a vendor which has 1 article today may have more articles added to his name tomorrow (if the customer likes his product the company may buy more from him). So the point is we have to dynamically adjust the time alloted for each job.
    I could not find any utility in ABAP which can do this.
    Can any of you please help me?
    Thanks a lot !
    Hasso.
    Edited by: Hasso14 on Apr 28, 2011 3:06 PM

    Exaactly-only I want to find the best time needed to finish for an article or multiple articles i.e I do not know how many articles will be available for each vendor beforehand before doing a select on the 2 tables. But once I know the number (maybe 1 or more than 1) I want to allot the best time for that article/lot of articles(maybe JOB_OPEN  technique ?).Also the number of articles may vary over time so the algorithm should take care of that too.-quite a tricky prob :)-I would request the others to see this reply which I think will clarify their doubts.
    Edited by: Hasso14 on Apr 28, 2011 9:03 PM

  • Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Trying to install the latest version of iTunes and when it is being installed I get the message "There is a problem with this installer package. A program quired for this install could not be run. Contact your support personel or package vendor."

    I am trying to install the latest version of itunes and when the install begins I get the message "There is a problem with this Windows installer package. A program required for this install could not be opened. contact your support personnel or product vendor". I ran a troubleshooting diagnostic on my computer and nothing flagged as a problem. I uninstalled iTunes and tried again and now I don't have any way to sync my ipod touch. Please help with any suggestions!!!

    Just in case, let's try a standalone AppleSoftwareUpdate.msi install.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe, and select "Extract to iTunesSetup". WinRAR will expand the contents of the file into a folder called "iTunesSetup".
    Go into the folder and doubleclick the AppleSoftwareUpdate.msi to do a standalone ASU install.
    (If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleSoftwareUpdate.msi again.)
    Does it install (or uninstall and then reinstall) properly for you? If not, what error message do you get? (Precise text, please.)

  • Problem viewing forms.This form is not supported with the current version of Adobe Reader.Upgrade to the latest version for full support. That does that mean exactly?

    Problem viewing forms.This form is not supported with the current version of Adobe Reader.
    Upgrade to the latest version for full support.
    What exactly do I need to do?

    That means you were probably using Adobe Acrobat to view PDF's. Acrobat is totally unnessary, you can view PDF's in Preview (Applications - Preview).
    BTW PLEASE complete your profile. It's very difficult to help  someone when they don't provide any information about their system. You can easily do this by clicking Your Stuff in the upper right of this page, then click Profile and fill in the pertinent information.

  • I recently downloaded the latest update for my Ipod Touch and now all the music I had downloaded (not from Itunes)....can I restore those songs now that there were 350 of them and they are gone? Thanks

    I recently downloaded the latest update for my Ipod touch. When I finished all the music that was downloaded to it was gone. I really need help from any one that knows how to restore music - not bought from Itunes - to my Ipod touch. Thank you very much

    Per Rysz' suggestion, configure accordingly:

  • I just got an iPod shuffle yesterday and I have downloaded the latest update for iTunes (10.7) and when I plugin it in it says that I have not got the correct software for the iPod

    I just got an iPod shuffle yesterday and I have downloaded the latest update for iTunes (10.7) and when I plugin it in it says that I have not got the correct software for the iPod

    What is the exact error message you are receiving?  Have you checked to make sure the connections on each end of the USB cable are nice and snug?
    B-rock

  • Trying to download the latest update for Epson printer/scanner but although it starts (up to about 5KB) it stops without completing. The download list shows it is installed ( 8 times!) but there is nothing in Finder downloads

    Trying to download the latest update for Epson printer/scanner but although it starts (up to about 5KB of 26.8MB) it stops without completing. The download list shows it is installed ( 8 times!) but there is nothing in Finder downloads. What can I do to download this update

    Try re-indexing Spotlight.
    Spotlight – Re-index
    If you haven't done so already, try resetting the printing system.
    OS X Mavericks: Reset the printing system  also Yosemite
    Applications/Image Capture or VueScan work?
    VueScan
    VueScan FAQ

Maybe you are looking for

  • Populate a table from a file field

    hi guys im having headaches acheiving this, basically what i want is the following A user can use a file field to browse for a file. Once selected the value will display in the file text field. Then i want an add button that when clicked will add the

  • Getting information about an object from JList

    Hi I have created a movie application and i have a JList displaying all registered movies, it uses a DefaultListModel to display these. I want to be able to click on an element in the JList and then push a button called "Show movie details" to displa

  • Error handling for master data with direct update

    Hi guys, For master data with flexible update, error handling can be defined in InfoPackege, and if the load is performed via PSA there are several options - clear so far. But what about direct update... But my specific question is: If an erroneous r

  • Unable to enable OpenCL in Photoshop CS6

    I have a Radeon HD 5670 card (640sp version) and I'm unable to activate the "OpenCL" option in Advanced Graphics Processor settings. My GPU driver version is Catalyst 13.3 beta 3 for windows 7. The problem occurs in Catalyst 13.2, too.  GPU-z report:

  • HT4528 How do I get iPhone 4S out of portrait screen lock mode?

    Phone is locked in portrait display mode.  How do I get it out of that mode?