Just need the record from the right (many) table with the max value for the Record on the left (one) side table

SELECT
  ADHOC.ATS_ESH.Entry_Num
  ,ADHOC.ATS_ESH.Importer
  ,ADHOC.ATS_ESH.Version AS [ATS_ESH Version]
  ,ADHOC.ATS_ESL.Version AS [ATS_ESL Version]
FROM
  ADHOC.ATS_ESH
  INNER JOIN ADHOC.ATS_ESL
    ON ADHOC.ATS_ESH.Customs_Entry_Num = ADHOC.ATS_ESL.Customs_Entry_Num
I just need to see the MAXIMUM version number in the ESL table for each Entry_Num in the ESH table. ESH is the one side, ESL is the MANY side.

Do you understand what this query is doing? Did you check the blogs I pointed you to?
The query I provided gets the latest ESL version for each custom number. So, if max ESL version is higher than ESH version, it's just a coincidence. If you only want to see rows where versions do not match, just add an extra where condition, e.g.
SELECT * FROM cte WHERE Rn = 1
AND  [ATS_ESH
Version] <>  [ATS_ESL
Version]
BTW, what is the type of these version
columns and what kind of data in them? If they are character columns, sorting them in DESC order will not necessary return the latest version. Can you show some samples of the data in these two columns?
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles

Similar Messages

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • So im about to buy a mac pro, I just need help cause im not sure if it's worth paying more for instance, a hi-res screen compared to the stock screen, and will i really miss the .2 ghz and the upgraded video card if I get the 2.0 ghz mbp?

    So im about to buy a mac pro, I just need help cause im not sure if it's worth paying more for instance, a hi-res screen compared to the stock screen, and will i really miss the .2 ghz and the upgraded video card if I get the 2.0 ghz mbp?

    The_Tiger92 wrote:
    So im about to buy a mac pro, I just need help cause im not sure if it's worth paying more for instance, a hi-res screen compared to the stock screen, and will i really miss the .2 ghz and the upgraded video card if I get the 2.0 ghz mbp?
    It appears the 15" 2.2 ghz isn't worth spending $400 more for, but you get the 1GB Radeon 6750M that has four times the VRAM than the 15" 2.0Ghz model and about 167% more performance. High settings on all current games with over 50 fps.
    If your not into 3D gaming or just light weight, then the 2.0 Ghz (last years performance) will suffice on low-medium settings at about 30 fps.
    The 13" is rather poor as it has integrated graphics. 30 fps on only some games.
    The high res screen is a excellent choice and the anti-glare is great for viewing just about anywhere.
    No messy films to replace at $30-$40 a pop.
    A lot of people bring the glossy screens back once they hear about the anti-glare.
    http://www.pcpro.co.uk/blogs/2011/05/23/glossy-vs-matte-screens-why-the-pc-indus trys-out-of-touch/
    Here's my 17"
    In my opinion the extra $400 for another 2-3 years of use out of the computer is worth it.
    Quad cores are more than enough for most uses for most people for many years, it's just a slow card is going to make the machine feel slow in rendering graphics in the future.

  • I reset my apple ID password here on the website, but my computer isn't recognizing my new password. what should I do? I just need to update my adobe flash player but it keeps asking me for my password but won't take my new password I just updated.

    Model Name: iMac
      Model Identifier: iMac12,1
      Processor Name: Intel Core i5
    I reset my apple ID password here on the website, but my computer isn't recognizing my new password. what should I do? I just need to update my adobe flash player but it keeps asking me for my password but won't take my new password I just updated.

    "If you've forgotten the Apple ID password how did you log in to make the last post?"
    Exactly! The password I used to log on here and write my post I figured was the same Apple ID password I would use to reset my computer login password. But my computer isn't recognizing it as the correct password so it wont let me update my login password. I have 2 user accounts on my computer.
    As far as the link you provided, I already looked to that for help earlier. It states:
    Choose Apple menu > System Preferences, click Users & Groups, click the lock to unlock it, then provide an administrator name and password. Select a user, then click Reset Password.
    I did these steps, but I don't remember my admin password. The question is: How do I reset my admin password so I can reset my log in password.
    Is my admin password the same password I use to log onto this website to post questions? If so, like I said previously, I already reset that password and my computer isnt recognizing it.

  • How do I get the contacts from my mac to syn with icloud? I need to back up my phone and don't want to lose my contacts when I get a new phone.

    How do I get the contacts from my mac to sync with Icloud? I need to back up my phone since I will be receiving a new one tomorrow and the icloud contacts are not the same as the ones on my mac.  Help me

    OS X Lion. 10.7. Your profile says your running 10.6.8, which is Snow Leopard. You need 10.7 to use iCloud with your Mac.

  • I just purchased a 24" iMac A1225 without a hard drive.   Can I transfer the drive from my old 17" iMac, with OS 10.68 installed on it, or do I have to clone, migrate or reinstall?

    I just purchased a 24" iMac A1225 without a hard drive.   Can I transfer the drive from my old 17" iMac, with OS 10.68 installed on it, or do I have to clone, migrate or reinstall?
    Hal

    Aha OK then, that should work fine.
    The only snag might be, if your missing the original thermal sensor from the original 24" Hard Drive.
    Then again, you should be able to use the one that came from the original 17" Hard Drive.
    image courtesy of > iMac Intel 24" EMC 2267 Repair - iFixit

  • Which of the Versions from Adobe elements has a gradations curve tool.  PSE 10, 12, 13 or which one ?

    Dear community,
    which of the Versions from Adobe elements has a gradations curve tool.  PSE 10, 12, 13 or which one ?
    Your comment will be appreciated.
    Regards
    Hermann

    ~bridge_mastero~ a écrit:
    Yeah right ,
    gradients tools are present in all these version
    and curves are not present in any of these officially .
    Curves are present with their own interface.
    One big problem is that you'll never find them logically where they are : under the menu 'Enhance/color correstion', it's the 'adjust color curves' option.
    Add to that problem the fact that this kind of adjustment is not about colours (no R,G,B channels) and you'll see why it is missed by everybody.
    The interface is meant to help beginners understand how curves work : you choose the effect you want and you see the curve being drawn. Excellent for pedagogy but users of the traditionnal curves manipulations don't understand the new way.
    If you want the old curves interface, you can add many free or affordable add-ons like Elements+. The most powerful and free one is the smartcurve plugin for Windows 32 bits.
    Other ideas:
    - if you don't use curves for colour correction, you can use the gradient tool adjustment layer (black to white) in luminosity mode. That's how you deal with curves in adjustment layers. Note that using gradient maps instead of curves is only a graphical way to determine the inflexion points. Same parameters, different inferface.
    - Using curves intensively was the way to edit ten years ago. Now, you can use the ACR basic tag to achieve quickly much better tone and colour correction, that way you won't need curves most of the time.

  • Help!  I transferred the data from my old Macbook pro with some success, but now my new Macbook Air contents think they are the remote disc and that the old Mac Pro is the hard drive.  What did I do and how do I fix it?

    I transferred the data from my old 2006 MacBook Pro 17".  Thanks for the help on that.  I thought that I was doing it right.  Used a backup hard drive and time machine.  Problem:  Now my new macbook air thinks it is the old machine and that the remote disc is the mb air.  Clicks want to take things to mobile me instead of iCloud, old applications launch instead of the new ones.  How do I fix the mess I have made?  Like I said before,  I am a software user and don't really know what I am doing when I start into the guts of the software, but I am able to learn.  Thanks for any help.

    iTunes- How to move the library to an EHD
    After you move the library you need to open iTunes by first depressing the OPTION key then launching iTunes. You will be given a choice of which library to use. This can then be made a permanent change, if you wish, in the Advanced section of iTunes preferences.

  • Sold my Logic 9 - Do I just need to delete from my MB Pro?

    I've sold my version of Logic Pro Studio 9 and want to make sure the purchaser has no problems. Do I just need to delete from my macbook pro of is there anything else I need to do? I cant see how to deregister. Hard times so had to sell sadly. Any advice appreciated. Thanks Phil

    Try use Image Capture (in your Applications Folder). IIRC you couldn't selectively import from anything with v6 or earlier.
    Regards
    TD

  • This is going to sound dumb but I just got a call from someone claiming to be with Microsoft Windows tech dept. Apparently something malicious attacking my computer.  I hung up because I don't believe Mac uses Microsoft Window Operating System - right?

    This is going to sound dumb but I just got a call from someone claiming to be with Microsoft Windows tech dept. Apparently something malicious attacking my computer.  I hung up because Mac doesn't use Microsoft Window Operating System - right?  I have Mac OS X.  I have loaded Microsoft Office 2011.  Can that allow something malicious or is this guy a scammer and I was right to hang up???

    Actually you can install Windows on your MBP via Bootcamp.
    You should have kept the individual on the phone for as long as you can tolerate.  The time he wastes with you is time he cannot spend scamming an innocent victim. 
    You can always politely ask the caller to hold while you 'answer the front door' or the like and just set down the phone and go about your business.  The caller will eventually hang up. 
    But your analysis was 100% correct.
    Ciao.

  • Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online   Right now there is no app store for

    Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online
    Right now there is no app store for Filemaker Go.   Filemaker Forgot about us.
    So I want to create a simple native iPhone App that all it does
    is launch
    fmp://~/filename.fmp12?$VariableName=value
    This URL will launch the Filemaker Go App
    Filemaker Go is a app that the user will have to have
    downloaded already on the device..
    The Simple Native app will launch the Filemaker Go.
    The fmp  URL has the information where the Filemaker Pro database is hosted
    and get  the user where they need to be..
    Help Me please
    iPhone 5s, iOS 8.1.3

    That would be software. And, you said "upload." That's "uploading software." Why do you question what you stated?
    I don't know where you even want to upload this software. The only way it can be downloaded to a device is through the iTunes store. Do you even know what you want to do?

  • My old computer crashed how do i get the music from my ipod to sinc with my itunes library?

    My old computer crashed how do i get the music from my ipod to sinc with my itunes library?

    You should be able to copy iTunes purchases to your computer's iTunes via File > Transfer Purchases. For music that you've bought from other sources or copied from your own CDs then have you not got a backup of them on, for example, an external drive that you can copy onto the computer ? If not then you will need to find a third-party program to copy them off - this post mentions some that were around a couple of years ago, whether they still exist and work I don't know.

  • I just updated my Firefox browser to Firefox 8. I am a college student and practice with HTML and CSS for class assignments. The fonts in all my html documents are being overwritten online by your script typeface. How do I resolve this issue?

    I just updated my Firefox browser to Firefox 8. I am a college student and practice with HTML and CSS for class assignments. The fonts in all my html documents are being overwritten online by your script typeface. I did not have this issue in the older version. I use an iMAC running OS10.6.8. How do I resolve this issue?

    Starting with this, you have errors in your CSS code.
    body {
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
      margin-left: 0px;
      color: 151515;
      font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
      background-color: EFF5F8;
    body {
      margin:0;
      color: #151515;
      font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
      background-color: #EFF5F8;
      font-size: 100%;
    Related links:
    Windows Chrome, why do my fonts look so bad? - Lee Green
    css3 - Bad font rendering Chrome - Stack Overflow
    Nancy O.

  • Can I transfer the photos from mac to external hard disc which is used for pc too

    can I transfer the photos from mac to external hard disc which is used for pc too

    A FAT32 drive can't store files which are 4GB or larger. You need to reformat or repartition the drive to include an exFAT, NTFS, or Mac OS Extended volume, or use a different drive, or use a way other than an external drive to transfer it.
    (105483)

  • Hi, i purchased and downloaded the lr6 desktop app (update), and used my serial number from the email from adobe but it said it was only eligible for lr5. thanks, rich

    hi, i purchased and downloaded the lr6 desktop app (updating from lr5, paid 80. for the update), and used my serial number from the email from adobe sentbut it said it was only eligible for lr5. thanks, rich

    If you purchased an upgrade from LR5 to LR6 then after you enter your LR6 serial number, you will need to enter your LR5 serial number, unless LR6 finds LR5 on the computer.  This also assumes that you've purchased the perpetual license of both LR5 and LR6, not a cloud license for LR5 which doesn't use a serial number for licensing.  If entering a LR6 then LR5 serial number into LR6's serial-number area isn't working, then is there something special about the LR5 that would make it ineligible for an upgrade?

Maybe you are looking for

  • IPod not recognized by iTunes, Windows Vista prompts to format iPod drive

    Hello, I have IPod 80GB which I rarely use. Yesterday  when I wanted to use it, I went to add a few new audios to it, connected to my computer and launched iTunes. I added the folder which contained audios to iPod, synced it and wanted to disconnect,

  • How to get the jclass from a jmethodID

    Hello guys, i'm new in jvmti. My first project, for my own, is a simple profiler. I want to trace every method enter and exist, so i impl. a static void JNICALL     cbMethodEntry(jvmtiEnv *jvmti, JNIEnv* env,                 jthread thread, jmethodID

  • Reg:package code to refresh materialized views

    i am new to pl/sql packages and procedures.i want it to execute for running mappings in informatica which takes 0 and gives 1 when executed successfully create or replace PACKAGE BODY pkg_refresh_mv as procedure prc_mv (p_mv_name varchar2) is begin d

  • Garbled music playback in 9.0.3 - anyone else experiencing this?

    I updated to iTunes 9.0.3. Now many of the tracks in my library sound garbled when played; it's as if they were recorded at a very low bit-rate. It's affecting a high percentage of the tracks. It started after sleeping and awakening my laptop. I susp

  • Order Recommndation process with due dates

    Hi, I am having little difficulties with MRP and recommendation I donu2019t  know if there is way I can turn off the lead time on MRP process. The situation is that when I have a blanket purchase order which is due in future and when a new recommenda