Multiple Lenovo X1 issues

I really love my Lenovo x1 but there has been multiple problems with it so far that hopefully can be resolved, if not I will probably send it in.
1. Backlit keyboard: There is an almost blotchy like lighting. Some parts are really bright, some a dim, some are average and there are some random keys that a just really dim.a
2. Keys are unresponsive: The R and A specifically require alot of pressure to actually work and it gets really aggrivating when taking notes. Many other keys have the same problem such as the G, M, P, I, and some more.
3. The battery is deteriorating: I've had my notebook for about 3 months now, and for the first two months I would charge to 100 and always unplug it  right afterwards. But my Thinkvantage kept saying that my battery's capacity would be at 92% to 90% to 81%. I would occasionaly  perform a reset only to see it drop back down to a low original capacity. So recently I used the "optimize battery health" and kept my battery charged at 50% and always plug it in. It hasn't went down any further from 91% since I reset the gauge but isn't that quite the steep deterioration from only 3 months usage for a battery thats supposed to last for 3 years?
4. Lag time when alternating between the nub's left and right click and the click-pad: At first i wasn't bothered too much by this, but it really stood out the more use the nub's clickers (the left and right click right above the click-pad) following with the click-pad. Everyone knows how the left and right clicks on the click-pad isn't super accurate so i used the ones up top, but the only problem is that when I do click, it require a 2 second pause and within those 2 seconds I cant use the click-pad to move. It gets quite aggravating while surfing reddit or anything for a long time.
5. Dust under the screen: Somehow there has been an accumulation of, what I assume to be, dust. I cant wipe it off and its under the screen and I don't know how to get rid of it.
6. SSD cover: the cover for the SSD is wobbly and it doesnt sit flush with the bevel of the laptop.
7. Lenovo Lid: When I close the lid of the laptop it doesn't seems to sit flat and theres awkard gaps when its closed. Magnet issue?
8. Battery life: I've read that some people get an average of 4hrs for normal tasks, but when I take notes in school I always use the maximum battery life setting in the advanced settings and get an average of 2hrs and 30mins (if I'm lucky 3 hrs). All I have on when taking notes is one note and nothing else. Should I assume my battery is defective (because I've only had it for 3 months).
So yeahhh, should I just send this off to lenovo?

1. This is my backlight keyboard.
2. I think your keyboard problem maybe related, try to take off the keyboard and replug back everything to see whether there is an electrical connection problem.
3. Battery firmware may need to updated.
http://leadorg.wordpress.com/technology/thinkpad-x1-battery-firmware-update/
4. As per above try to reseat the keyboard.
5. That requires disassembly of the laptop top case to remove.
6. hdd cover shouldn't wobble, at least not in the machine that i have seen. 
7. Magnet doesn't keep the entire lid closed only part of it. Where is the gap appearing?
Regards,
Jin Li
May this year, be the year of 'DO'!
I am a volunteer, and not a paid staff of Lenovo or Microsoft

Similar Messages

  • Lenovo G560 - Issue with won't boot and black screen after HDD upgrade

    Lenovo G560 - Issue with won't boot and black screen after HDD upgrade.
     What happen: My laptop was working fine, no blue screen issue, no funny business at all. I bought a new SSD Intel 120 GB and thought it would be a good idea to replace the HDD. I shutdown and disconnected the power adapter, waited a couple of minutes and removed the battery. I opened up the back case and replaced the HDD. And put all the screws back and put the battery back in.
    Problem: The very first time I turned the power on, nothing happens besides a black screen. I pressed the dvd drive it works and opens up and closes. I waited for about 30 mins and still has blac screen. When I mean black screen, no bios menu, no logo, just a black screen with the fan sound on.
    I have tried these:
    1. Unplugged everything - battery, adapter, and pressed the power on button for about 60 seconds, nothing, the laptop turns on with the LED display on for both on and battery LED's. But nothing but black screen, no sound of windows loading just the fan and black screen.
    2. I tried putting back my old 2.5" and nothing but black screen.
    Thoughts and suggestions?
    Solved!
    Go to Solution.

    Hi Autoexit173,
    Welcome to Lenovo Community!
     As per the query we understood that you are facing issue with system not booting in your Lenovo G560 laptop.
    As you have mentioned that the system not booting, please try to remove the RAM and  turn on the system and check if you can hear any beep sound. Also try to clean the RAM slots and check for the issue.
    Click here for the steps to remove the RAM and refer page number 40.
    Hope this helps. Do post back if issue persists!
    Best regards,       
    Ashwin.S
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Compilation of Lenovo X120e issues and solutions

    Just thought a compilation of issues may be beneficial for folks who own an X120e.
    Screen adjusts brightness automatically without user input depending on content on screen:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/X100e-screen-brightness-increasing-by-itself/td...
    This is caused by Vari-Bright being enabled in the Catalyst Control Center.  With this option enabled, the screen will automatically adjust its brightness depending on what is shown on the screen.  The display brightness is increased when the screen is predominantly white while the display brightness is decreased when the screen is predominantly dark.  An easiest way to see this effect happening is to have two tabs opened in a web browser window.  Set one tab to display a website that is mainly filled with white pixels (such as this Lenovo Forum) and another tab to display a website that is mainly filled with dark pixels (such as http://www.krijtenberg.nl/ ).  Switch between the two, pausing a few seconds in each tab.
    Solution:
    Open the Catalyst Control Center and select the PowerPlay option in the Power section.  Uncheck the Vari-Bright option (or adjust the slider) and click Apply.  Verify that the automatic adjustment is no longer occuring by doing the two tab experiment described above.
    Function keys for brightness control not working after waking from sleep / hibernation in some instances:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-Funtion-keys-for-brightness-not-working/t...
    For my X120e, whenever I have it sleeping or hibernating and change the power source (such as initiating sleep when on power and then waking it up while on battery, or vice versa), the function keys for brightness controls do not work.
    Solution:
    Restarting the machine will bring back functionality of the brightness control keys...
    A way to prevent this from happening in the first place is to wake the X120e in the same power state that the X120e was put to sleep in (wake up from power adapter if slept while connected to power adapter, or wake up from battery if slept while on battery).   
    All we can do now is wait for Lenovo to come up with a fix on their side of things.
    AMD SATA Controller and TRIM for SSD:
    The AMD SATA Controller provided by Lenovo does not support passing of TRIM command according to http://www.hardwarecanucks.com/forum/450343-post35.html for SSDs.  The Lenovo provided AMD SATA Controller is 1.2.1.197, before the official TRIM support in 1.2.1.263.  If you're using a HDD, this is of no concern.
    Solution:
    In order to have support for passing of TRIM command, one has to update the AMD SATA Controller to any version above 1.2.1.263 ( http://sites.amd.com/us/game/downloads/Pages/integrated_win7-64.aspx#3 for Windows 7 64-bit, for example) or uninstall the AMD SATA Controller to revert back to Microsoft's Standard AHCI 1.0 Serial ATA Controller. 
    Disclaimer:  Since the AMD SATA Controller driver linked is not from Lenovo themselves, I'm sure they won't provide any support if something is to occur so try at your own risk.
    As HP79 mentions below, at least according to the update notes, TRIM implementation is implemented for Hudson chipsets as of 1.2.001.263.
    Audio Stutter / Slurring occuring during playback of video/audio:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-Stuttering-Audio/td-p/389023
    This issue can be reproduced (at least on my X120e) by waking the X120e after putting it to sleep.  The symptom is the audio repeating a sound over a span of a second or two during playback and is quite noticable. 
    Solution:
    uEFI Bios version 1.11 seems to deal with the audio stuttering issue.  So far, results lead to positive outcomes.
    Old Solution:
    PWMTR64V.DLL that is loaded at Startup seems to be causing this issue.  Disabling it from launching when starting up seems to cure the Audio Stutter (even after waking up from sleep which was seen to be a pretty reliable way to get the issue to repro).  Start Menu > Launch MSCONFIG from the Search Bar > Select Startup Tab from the System Configuration window > Uncheck Thinkpad Power Manager > Restart. 
    This does not seem to turn off the power manager application itself so settings in Power Manager can be saved and it seems to still be in effect.  However, opening up Power Manager from the notification / taskbar can cause audio stuttering and mouse movement slowdown while it is launching and/or when applying settings.  This is only temporary and is gone when Power Manager is closed. (Thanks kns7977 for the find)
    Pending to see if those who uninstalled Power Manager are able to turn off the offending startup .dll.
    Mouse seems to stutter or stay in place for a moment when moving:
    This seems to be caused by the same issue causing the Audio Stutter / Slurring.  At least at this time, the cause of the issue and solution seems to be the same.
    Emulating Middle Mouse Button with Trackpoint:
    One can set up the middle button between the left and right click button for the TrackPoint to act like pressing a middle mouse button on a standard mouse by changing the scrolling type to Smooth instead of the default Standard. 
    Control Panel > Hardware & Sound > Mouse > UltraNav Tab > Setting for TrackPoint > Setting for Choose Scrolling or Magnifying Glass Function > Smooth.
    Trackpad's two finger gesture being hit or miss:
    The trackpad's two finger scrolling is very hit and miss.
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/X120e-Touchpad-issues/td-p/393751
    Solution: Turning off Gesture Filtering may alleviate the problem.  As mentioned in http://forum.notebookreview.com/lenovo-ibm/561751-x120e-owners-thread-24.html#post7323293, it seems that the Gesture Filtering is counteracting any sort of two finger input.
    Get to Mouse Properties by Fn + F8, select Manage Settings.  At Mouse Properties, select the UltraNav tab > Settings for TouchPad.  Expand the Smart Check Settings, highlight Gesture Filtering, and uncheck the Enable Gesture Filtering box and Apply. 
    Screen flickers lines:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-Flickering/td-p/389523
    Had this issue occur on me once, but never seen it happen again.  Unsure what caused or cured it.
    Solution:
    If the flickering is occuring, a restart is all that is needed to alleviate the problem.  Haven't tested if hibernation fixes it, but neither sleep nor turning off the screen with the Power Manager dealt with the flickering.
    3-Cell Battery mentioned as a 40Wh in the Order Page of Lenovo X120e when it is actually rated as 32Wh according to Power Manager:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/X120e-3-cell-40Wh-battery-reported-as-32Wh-by-P...
    Yeah...
    Solution:
    Accept that it's a 32Wh you will get when selecting 3-Cell or go for the 6-Cell if you want more than 32Wh.
    2x2 ABGN Driver from Lenovo triggering Error Code 10:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/X120e-ABGN-Driver-issue-in-Windows-7-Pro-x64/td...
    The Wireless driver from Lenovo's site seems to not work with the 2x2 ABGN wireless when installed on a fresh copy of Windows 7 x64.
    Solution: 
    Not really quite a solution, but one can bypass this by either installing the 32-bit Windows 7 and installing the 32-bit driver, or using the factory recovery disc to install 64 bit windows 7 to have it install drivers that work for x64 windows 7.
     X120e bluescreens after installing LAN Realtek 7.26.902.2010 drivers from Lenovo's Driver download site.
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-bluescreen-when-installing-lan-drivers/td...
    The drivers doesn't seem to work and it causes a bluescreen on fresh installed Windows 7 x64.
    Solution:
    As Clicq suggests, Realtek's own drivers from http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTy... seems to deal with the issue. 
    Screen quality on the X120e:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-poor-LCD-quality-viewing-angles/td-p/3945...
    The quality of the screen on an X120e is below expectations.
    This is common with low-quality TN panels not helped by glossy displays.  My personal X120e screen likes to bleed certain colors of red.
    Solution (not really): 
    One can use the Windows 7 built-in color calibration tool to adjust the colors to make it more tolerable.  Adjusting your own viewing angle in relation to the screen might deal with some color issues (hard to figure out what's the correct viewing angle because of TN panel's small range of optimal viewing angles).  Also, changing the refresh rate to 60Hz may deal with some headaches due to the screen (as it did for me).
    HDMI Overscan to HDTV issue:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/HDMI-overscan-to-HDTV-issue-on-x120e/m-p/395335
    There is a black border when outputting to HDTV through HDMI.
    Solution:
    AMD's CCC by default sets a specific value for overscan / underscan.  One can http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/Output-to-TV-via-HDMI-port-black-border-on-the-... while the device is connected via HDMI (the option is hidden if the HDMI port is not used) and adjust the slider to an acceptable value.
    Skype asserts after 10-20 seconds of video chat:
    http://forum.lenovo.com/t5/X-Series-ThinkPad-Laptops/x120e-Skype-quits-after-10-20-seconds-of-video/...
    When doing a video chat, the video feed will freeze and then skype will crash to desktop.
    Solution:
    Version 5.3 of Skype seems to be the culprit.  Until Skype itself is fixed, one can use Skype 5.2.60.113 from http://www.filehippo.com/download_skype/changelog/9465/ to bypass this issue.  Just reject any offer to update to 5.3 after installing 5.2, for now.
    If there is anything I missed, please respond and I'll update this post with new information.  These are the ones that I have encountered so far with my Lenovo X120e.  Don't get me wrong, I like my X120e... it's just been a "learning" experience lol
    For a compilation of most X120e issues:
    Compilation of Lenovo X120e issues and solutions

    About the AHCI driver, if you download and open the install file, it'll extract files to where you instructed it to. Look in AMD SB7xx/W764A directory, and there are the AHCI files along with a text file. In that text it shows 
    AMD AHCI controller driver distribution list
    Version 1.2.001.0275, 11/11/2010
    Supported chipsets
    SB700 family
    SB800 family
    Hudson-1/2/3 family
    Revision History
    1.2.001.0275
    -          Memory usage optimization
    -          ZPODD power on incurred 10 sec delay workaround
    -          Potential DMA overrun bug fix
    1.2.001.263
    -          Performance optimization
    -          Boot Optimization
    -          TRIM implementation
    1.2.001.0238
                Renamed
    -     amdsata.inf -> amd_sata.inf
    -     amdsata.cat -> amd_sata.cat
    -     amdsata.sys -> amd_sata.sys
    -     amdxata.sys -> amd_xata.sys
    Added
    -     Zero Power ODD support (if enabled in BIOS; Windows 7 only); the ZPODD is powered off after 60 Sec w/o media inside and tray closed (for tray type ZPODDs)
    -     DAPS support
    -     DIPM Setting Index 3 added to AHCI Link Power Management Settings (in addition to existing Active(0), HIPM(1) and HIPM+DIPM(2) ) and can be chosen to any Power Scheme using the inbox utility powercfg.exe
    1.2.0.197
    -     Robustness improvement during hibernation / de-hibernation

  • Multiple App syncing issues...

    Hello, all.
    I am having multiple application synching issues. I have a half dozen devices and have never had any of these issues before about a week ago. May have had an iTunes update? Here are the issues.
    1.     Some Apps re-installing even though no update was available.
    2.     Some apps not completely installing and showing with an empty progress bar through the icon.
    3.     Apps that are not supposed to sync to a particular device are.
    4.     Apps re-installing outside of their designated folders.
    Anyone having any of these issues? It is pretty frustrating since I never know what I am going to end up with after a sync.

    Sure.
    Only select the apps that you want to sync.
    It will only sync what you tell it to sync to each device.

  • Lenovo T60 issue - security center does not accept my password anymore??

    Hi to all and thanks in advance for any help given.............Lenovo T60 issue
    Everything was working as it should then a popup box came up when i was logged in and informed me that "I" had changed the password that is connected to my finger reader (online passwords have also been changed and do not work online using the finger reader) and could i now type my password into the popup on the screen.
    When i do this it still does not work - wrong password - i have tried all of the passwords i use - so i have had to uninstall the part that deals with that, i then reinstalled it just in case it was an application issue but after re-installation it was the same as before.??
    I can still use the finger reader but i do not like to rely on one secure form of login, and if it fails it could take a while to find out how to login otherwise, 
    thanks
    DigitalVein

    I had a similar problem, but it was becuase I deleted the user account that the PC was set up with.  Security Center would not work with any Administrative account.  So I had to put the user back in the system with the same original name.   Hope that helps.

  • Multiple certificates on Issuing CA server

    Hi,
    Due to errors multiple certificates were issued from Root CA server for SubCA. Although old certificate was revoked from Root, but I see 2 certificates on Issuing CA. Also, because of 2 certificates, 2 CRLs are getting published everytime for each. Although
    when I see web server certificate issued for IIS, it was signed by new certificate of Issuing CA. Also, in PKIview, I see CDP path for this CA with new CRL.
    But my questions is that how shall I remove old one from Issuing CA as I am not gettign that option. Also, in AD i see 2 certficaates published for that CA. Will that cause any issue.
    Thanks
    Neha Garg

    This is actually a normal state in PKI. When you renew a sub CA with a new key pair, ot will result in multiple CRL files.
    - there is no need to remove the previous subca cert
    - there is no need to revoke the previous subca cert (unless there are config or security issues)
    - make sure the AIA paths use %4 in the paths to keep separate versions
    - make sure that the CDP paths use %9 in the paths to keep separate versions
    - make sure you publish *all* versions of .crts and .crls to *all* publication points
    You need to leave all versions of the CA certs in play so that both current and previously issued certs can be validated
    Brian

  • Multiple monitor DPI Issues (Desktop not Metro)

    Hi,
    I have a Lenovo Yoga 2 pro with Win 8.1, which has an ultra high resolution (3,200X1,800) and I am using it with a Targus docking station.  In order to see things, I have the custom DPI scaling set at 250%.  Here is the problem, when i use the docking
    station with an external monitor that has a maximum of 1900X1200, Metro looks nice, but anything on the desktop (office and other desktop only programs), everything is HUGE and unusable.  If I try to set DPI scaling for multiple monitors, I can no longer
    use my custom 250% DPI for the Lenovo, instead, I am given a slider that makes the external monitor look nice, but when the laptop is removed, it is so small that I'd need a magnifying glass to see.  If I want to use a docking station, I have to change
    the DPI scaling every time I switch between being docked and as a standalone, which requires me to go through all of the steps to switch and then log out and log back in.  Is there a way to have custom DPIs for each monitor?  I think this will only
    become a bigger problem as more companies develop higher resolution devices.
    Thanks,
    Dean

    Same issue here. I have looked on a lot of forums, and there are a lot of people who just don't understand the issue - offering completely irrelevant advice!
    As with a number of others on this thread, I have a Surface Pro 3... fantastic machine, and beautiful display. But connect my external 1080x1920 24" display, and everything is too large on the external... so as with everyone else, I have to set the
    Change the size of all items option in display settings, set it to the smallest value, then log out, and log back in. That fixes the external display, but...
    Having to make this setting change every time I connect or disconnect to an external monitor is annoying enough... but having to log out, and then log back in to see the change is ridiculous!
    But what REALLY annoys me is that I like to use extended display mode - I love to work with two monitors - my lapyop and external display side by side. With the scaling set to lowest, so that the external display looks correct, the Surface Pro 3 screen is
    just unusable - its too small, and gives me a headache trying to use it. It makes me feel like an old man complaining that "owwww its too small for my old eyes!".
    I realise that this is a Windows issue - but heck, if the Surface Pro 3 is really the tablet to replace my laptop, this flaw in Windows makes the SP3 a NON laptop replacement. Using dual monitor setups with my portable is essential to how I work.
    I almost can't believe that in 2014 Windows still does not have proper per monitor PPI settings. Technology has landed a probe on a bloody comet for crying out loud - why can't Windows have proper UI scaling per monitor??!!
    What really scares me is that I dont think this is a simple fix for MS, and it may be some time before we see this resolved... but here's hoping Microsoft are already working on s solution.
    I'd like to see a Microsoft representative give us an official update on this issue... Hello? Are you out there?

  • Mc.9 Multiple storage location issues

    Hi,
    I am fetching data from mc.9 in my program but if the use enter multiple storage  in selection only 1st value is printed following is code and how will i come to know which material is for which storage location since mc.9 data is not getting stored anywhere
    SELECT-OPTIONS : SLOC LIKE S031-LGORT.
    SUBMIT RMCB0300 WITH SL_WERKS-LOW = PLNT
                        WITH SL_LGORT IN SLOC
                      WITH SL_MTART = 'HALB' WITH SL_MTART = 'VERP'
                        WITH SL_MTART = 'ROH' WITH SL_MTART = 'FERT'
                        WITH SL_SPMON-LOW = FPERIOD
                        WITH SLV_NO = 'STK'
                        WITH SL_SPMON-HIGH = FPERIOD EXPORTING LIST TO MEMORY AND RETURN.
    while append to internal table  even if i specify both high and low value it prints low and high incorrectly how will this problem will solved
    itab-lgort = sloc-low.
    Help required for same.
    Thanks
    Shruti

    Hi Shruti,
    I simulated the code given by you and all the storage locations are being populated in the backed.
    You can check this by putting a breakpoint at the below code in RMCB0300 and checking the value of sl_lgort[]. You will receive the number of SLOC inputs provided.
    AT SELECTION-SCREEN OUTPUT.
      FLG_FOUND = FALSE.
      PERFORM SPEZIAL_AT_SELECTION_SCREEN_O IN PROGRAM (LIS_PROGNAME)
                                            CHANGING FLG_FOUND
                                            IF FOUND.
    This is a data issue and you may not have any records for the selected input.
    Regards,
    Jovito.
    Edited by: dsouzajovito on Dec 29, 2010 5:56 AM

  • Oracle Ad-hoc report with multiple queries creating issues

    Hi Guys,
    I have been having multiple issues (one after the other) in trying to generate a report for Business user. Let me start with my test cases and yes, this time I have made sure by testing and dirtying my hands that the test cases work properly and commit into the database (I will be more than happy to provide screen shots of the same).
    Test Case:
    Tables:RETURNS & RETURN_LINE_ITEMS
    CREATE TABLE RETURNS
      ID                    NUMBER(12),
      PROG_PROGRAM_CD       VARCHAR2(2 BYTE),
      ACCT_ID               NUMBER(12),
      ACPE_ID               NUMBER(12),
      JENT_ID               NUMBER(12),
      PREV_RTRN_ID          NUMBER(12),
      ENTP_ABN              NUMBER(9),
      ACCT_OCCURNC_NBR      NUMBER(4),
      SOURCE_TYPE           VARCHAR2(30 BYTE)       DEFAULT 'BLANK',
      RECEIVE_DATE          DATE,
      AMEND_IND             VARCHAR2(1 BYTE)        DEFAULT 'N',
      CMPLT_IND             VARCHAR2(1 BYTE)        DEFAULT 'N',
      PENALTY_OR_IND        VARCHAR2(1 BYTE)        DEFAULT 'N',
      RETURN_STATUS         VARCHAR2(12 BYTE),
      STATUS_DATE           DATE,
      STATUS_USERID         VARCHAR2(8 BYTE),
      PERIOD_START_DATE     DATE,
      PERIOD_END_DATE       DATE,
      NOTICE_STATUS         VARCHAR2(12 BYTE),
      NOTICE_STATUS_DATE    DATE,
      NOTE_TEXT             VARCHAR2(2000 BYTE),
      PENALTY_OR_BY         VARCHAR2(8 BYTE),
      PENALTY_OR_TMST       DATE,
      FILING_ID             NUMBER(12),
      CASE_ID               VARCHAR2(49 BYTE),
      DOC_CONTRL_NBR        NUMBER(29),
      LOCTR_NBR             NUMBER(10),
      STATUTE_BARRED_DATE   DATE,
      MEDIA_TYPE            VARCHAR2(30 BYTE),
      DISPSTN_TYPE          VARCHAR2(30 BYTE),
      AMEND_TYPE            VARCHAR2(30 BYTE),
      CALC_MODE             VARCHAR2(30 BYTE),
      PROCESS_PASS_CNT      NUMBER(1),
      CONVRTD_IND           VARCHAR2(1 BYTE)        DEFAULT 'N',
      LOSS_PERIOD_END_DATE  DATE,
      MF_SYNC_CD            VARCHAR2(1 BYTE)
    CREATE TABLE RETURN_LINE_ITEMS
      ID                       NUMBER(12),
      RTSC_ID                  NUMBER(12),
      RTRN_ID                  NUMBER(12),
      SCLI_ID                  NUMBER(12),
      LITM_ID                  NUMBER(12),
      ENTP_ABN                 NUMBER(9),
      PROG_PROGRAM_CD          VARCHAR2(2 BYTE),
      ACCT_OCCURNC_NBR         NUMBER(4),
      ACPE_END_DATE            DATE,
      SCHED_NBR                VARCHAR2(3 BYTE),
      SCHD_VERSION_YR          NUMBER(4)            DEFAULT 0,
      SCHD_VERSION_NBR         NUMBER(3),
      RTSC_OCCUR_NBR           NUMBER(3),
      LITM_LINE_ITEM_NBR       VARCHAR2(3 BYTE),
      SLIN_LINE_ITEM_ID        NUMBER(12),
      OCCUR_NBR                NUMBER(3)            DEFAULT 1,
      PREV_VAL_MOD_IND         VARCHAR2(1 BYTE)     DEFAULT 'N',
      VIABLE_IND               VARCHAR2(1 BYTE)     DEFAULT 'N',
      ACTIVE_IND               VARCHAR2(1 BYTE)     DEFAULT 'Y',
      ACTION_CD                VARCHAR2(1 BYTE),
      PREV_VAL_AMT             NUMBER(15,2),
      REVISE_VAL_AMT           NUMBER(15,2),
      PREV_VAL_TEXT            VARCHAR2(100 BYTE),
      REVISE_VAL_TEXT          VARCHAR2(100 BYTE),
      DISPLAY_SEQ_NBR          NUMBER(3),
      SYS_VAL_AMT              NUMBER(15,2),
      LITM_INNER_PASS_SEQ_NBR  NUMBER(3)
    Inserting data into RETURNS table
    INSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    3715944,
    '01',
    139048,
    3587419,
    9518324,
    NULL,
    401377197,
    1,
    'TAXPAYER',
    TO_DATE('4/7/2009','mm/dd/yyyy'),
    'N',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('4/30/2009','mm/dd/yyyy'),
    'TRAPROD2',
    TO_DATE('2/1/2008','mm/dd/yyyy'),
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('4/30/2009'     , 'mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6045574495,
    NULL,
    'RSI',
    'NOTICE',
    NULL,
    NULL,
    NULL,
    'N',
    NULL,
    NULL);
    NSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    4117092,
    '01',
    57794,
    3864551,
    10566221,
    NULL,
    400571410,
    1,
    'TAXPAYER',
    TO_DATE('6/30/2010', 'mm/dd/yyyy'),
    'N',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('7/27/2010','mm/dd/yyyy'),
    'TRAPROD2',
    TO_DATE('1/1/2009','mm/dd/yyyy'),
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('7/27/2010','mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6053117120,
    NULL,
    'RSI',
    'NOTICE',
    NULL,
    NULL,
    NULL,
    'N',
    NULL,
    NULL);
    INSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    4382179,
    '01',
    498210,
    3957251,
    11264174,
    3727534,
    405079963,
    1,
    'TAXPAYER',
    TO_DATE('4/26/2011', 'mm/dd/yyyy'),
    'Y',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('5/12/2011','mm/dd/yyyy'),
    'LOPATS',
    TO_DATE('2/1/2008', 'mm/dd/yyyy'),
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('5/12/2011','mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6058767341,
    TO_DATE('4/30/2015','mm/dd/yyyy'),
    'RSI',
    'NOTICE',
    'LOSS CARRY BACK (SIMPLE)',
    'LOSS CARRY BACK',
    NULL,
    'N',
    TO_DATE('1/31/2011', 'mm/dd/yyyy'),
    NULL
    Now inserting data into 2nd table i.e. RETURN_LINE_ITEMS
    RTRN_ID means RETURN ID
    This is for RTRN_ID =3715944
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    277707088,
    8022477,
    3715944,
    NULL,
    1585,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1,
    1,
    NULL,
    NULL,
    115,
    1 ,
    1);
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    277707106,
    8022477,
    3715944,
    NULL,
    1603,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1069336,
    1069336,
    NULL,
    NULL,
    200,
    1069336,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    (277707109,
    8022477,
    3715944,
    NULL,
    1539,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    NULL,
    1000,
    'NULL',
    'NULL',
    215,
    1069336,
    200);Now for RTRN_ID = 4117092
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    319820214,
    9028477,
    4117092,
    NULL,
    1585,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    3,
    3,
    NULL,
    NULL,
    115,
    3,
    1
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    319820233,
    9028477,
    4117092,
    NULL,
    1603,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    790068,
    790068,
    NULL,
    NULL,
    200,
    790068,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    319820236,
    9028477,
    4117092,
    NULL,
    1539,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    NULL,
    790,
    NULL,
    NULL,
    215,
    790068,
    200
    Now finally for RTRN_ID = 4382179
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462584,
    9694297,
    4382179,
    NULL,
    1585,
    405079963,
    '01',
    1,
    TO_DATE(1/31/2009, 'mm/dd/yyyy'),
    '000'
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1,
    1,
    NULL,
    NULL,
    115,
    NULL,
    1
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462602,
    9694297,
    4382179,
    NULL,
    1603,
    405079963,
    '01',
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    672738,
    643304,
    NULL,
    NULL,
    200,
    NULL,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462605,
    9694297,
    4382179,
    NULL,
    1539,
    405079963,
    01,
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    672738,
    643304,
    NULL,
    NULL,
    215,
    643304,
    200
    );OK. Now once this data is all inserted, comes the real problem and that is:
    a) based on the following requirements
    Requirements: Adhoc Report for Audit on CIT Income Allocation
    1. Select from the RETURNS table:
    • Id > 3600000 and
    • Prog_program_cd = '01' and
    • Return_status in ('ASSESSED', 'DU") and
    • Tax year ending in 2009 (i.e. year portion of the Period_end_date is in 2009)
    2. Retrieve the following fields from the RETURNS table :
    • Id
    • Entp_abn
    • Acct_id
    • Prog_program_cd
    • Period_start_date
    • Period_end_date
    • Amend_ind
    • Return_status
    • Status_date
    • Loctr_nbr
    3. If there are multiple entries from the same account and tax year, only retain the latest record: From the records selected in step 2, if there are multiple records with the same Acct_Id and Period_end_date, only retain the record with the most recent Status_date (i.e. MAX value on the date).
    4. Using the results from step 3, link to the applicable RETURN_LINE_ITEMS table where:
    • RETURNS.Id = RETURN_LINE_ITEMS.Rtrn_Id
    5. From the selected return on RETURN_LINE_ITEMS table, retrieve records where (value on Sch 000 Line 062 > 500,000) and (value on Sch 000 Line 066 < value on Sch 000 Line 062) :
    • Sched_nbr = '000', and Litm_line_item_nbr = '062', and Active_ind = 'Y', get Revise_val_amt as 'ab_taxable_income'
    • Sched_nbr = '000', and Litm_line_item_nbr = '066', and Active_ind = 'Y', get Revise_val_amt as 'amt_taxable_in_ab'
    • Retain the return only if (ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income)
    I utilized the following query and I am getting 4 rows (line item numbers 062 and 066 where in ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income) and this is correct
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB
    from returns r1, return_line_items rtlnms
    where
    r1.id = rtlnms.rtrn_id and
    r1.prog_program_cd = rtlnms.prog_program_cd and
    r1.entp_abn = rtlnms.entp_abn and
    r1.id > 3600000 AND r1.prog_program_cd = '01' AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('062')
    AND nvl(decode(litm_line_item_nbr, '062',  REVISE_VAL_AMT),0) > 500000
    and NVL(RTLNMS.REVISE_VAL_AMT,0) >( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR = '066'
                                                           AND SCHED_NBR='000'
    UNION
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB
    from returns r1, return_line_items rtlnms
    where r1.id = rtlnms.rtrn_id
    AND r1.prog_program_cd = rtlnms.prog_program_cd
    AND r1.entp_abn = rtlnms.entp_abn
    AND r1.id > 3600000 AND r1.prog_program_cd = '01'
    AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('066')
    and NVL(RTLNMS.REVISE_VAL_AMT,0) <( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR = '062'
                                                           and  NVL(RTLNMS2.REVISE_VAL_AMT,0)>500000
                                                           AND SCHED_NBR='000'
    order by IDHowever there is another condition after "5c" i.e. after Retain the return only if (ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income)
    and that is:
    For those returns meeting the criteria in step 5, also retrieve the following from RETURN_LINE_ITEMS table and that is:
    sched_nbr = '000' and Litm_line_item_nbr = '029' and ACTIVE_IND ='Y', get Revise_val_amt as "corp_type"
    and in order to go about this, I utilised the following query:
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB,
    decode(rtlnms.litm_line_item_nbr, '029',  RTLNMS.REVISE_VAL_AMT)CORP_INCOME
    from returns r1, return_line_items rtlnms
    where
    r1.id = rtlnms.rtrn_id and
    r1.prog_program_cd = rtlnms.prog_program_cd and
    r1.entp_abn = rtlnms.entp_abn and
    r1.id > 3600000 AND r1.prog_program_cd = '01' AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('062')
    AND nvl(decode(litm_line_item_nbr, '062',  REVISE_VAL_AMT),0) > 500000
    and NVL(RTLNMS.REVISE_VAL_AMT,0) >( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR IN( '066')
                                                           AND SCHED_NBR='000'
    UNION
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB,
    decode(rtlnms.litm_line_item_nbr, '029',  RTLNMS.REVISE_VAL_AMT)CORP_INCOME
    from returns r1, return_line_items rtlnms
    where r1.id = rtlnms.rtrn_id
    AND r1.prog_program_cd = rtlnms.prog_program_cd
    AND r1.entp_abn = rtlnms.entp_abn
    AND r1.id > 3600000 AND r1.prog_program_cd = '01'
    AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('066','029')
    and NVL(RTLNMS.REVISE_VAL_AMT,0) <  ( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR='062'
                                                           and  NVL(RTLNMS2.REVISE_VAL_AMT,0)>500000
                                                             AND SCHED_NBR='000'
    order by ID                                                          
    My output is: 7 rows i.e.
    3 rows of return id = 3715944,
    3 rows of return id = 4117092
    and 1 row of return id = 4382179
    It should only retrieve rows for 3715944 and 4117092; not for row =4382179 and this is because based on question in 5 "c", rows retrieved were for return ids' = 3715944 and 4117092
    I know where the problem is:
    As soon as it retrieves rows for returns 3715944 and 4117092 (because REVISE_VAL_AMT is greater than 500,000), it also finds another record with return id = 4382179 with greater than 500,000 and it blindly brings that as well.
    Is there a way around to ensure that I my results are compared only against the return id's retrieved from 5 "c" = 3715944 and 4117092
    Believe me I have tried every option that I could think of to remove return id = 4382179 but somehow could not.
    Dear Gurus @ OTN, please help me.
    Thanks,
    Sandeep

    Thanks for your words of wisdom guys. Appreciate it.
    Anyways what ever I asked, I was able to get solution for it by using an inline query and it's as follows:
    SELECT id, entp_abn, acct_id, prog_program_cd, period_start_date,                 
             period_end_date, amend_ind, return_status, status_date, loctr_nbr,           
             ab_taxable_income, amt_taxable_in_ab                                         
    FROM   (SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,                
                  r1.period_start_date, r1.period_end_date, r1.amend_ind,                    
                  r1.return_status, r1.status_date, r1.loctr_nbr,                            
                  SUM                                                                        
                    (DECODE                                                                  
                   (rtlnms.litm_line_item_nbr,                                                  
                    '062', rtlnms.revise_val_amt)) ab_taxable_income,                           
                  SUM                                                                        
                    (DECODE                                                                  
                   (rtlnms.litm_line_item_nbr,                                                  
                    '066', rtlnms.revise_val_amt)) amt_taxable_in_ab                            
              FROM   returns r1, return_line_items rtlnms                                 
              WHERE  r1.id = rtlnms.rtrn_id                                               
              AND    r1.id > 3600000                                                      
              AND    r1.prog_program_cd = '01'                                            
              AND    r1.return_status IN ('ASSESSED', 'DU')                               
              AND    r1.period_end_date BETWEEN                                           
                  TO_DATE ('01-01-2009', 'DD-MM-YYYY') AND                                   
                  TO_DATE ('31-12-2009', 'DD-MM-YYYY')                                       
              AND    rtlnms.sched_nbr = '000'                                             
              AND    rtlnms.active_ind = 'Y'                                              
              AND    r1.status_date =                                                     
                  (SELECT MAX (status_date)                                                  
                   FROM   returns r2                                                         
                   WHERE  r2. acct_id= r1.acct_id                                            
                   AND    r2.period_end_date = r1.period_end_date)                           
              GROUP  BY r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,               
                     r1.period_start_date, r1.period_end_date, r1.amend_ind,                 
                     r1.return_status, r1.status_date, r1.loctr_nbr)                         
    WHERE  ab_taxable_income > 500000                                                 
    AND    amt_taxable_in_ab < ab_taxable_income                                      
    ORDER  BY id                                                                      
    *OUTPUT*
            ID   ENTP_ABN    ACCT_ID PR PERIOD_ST PERIOD_EN A RETURN_STATU STATUS_DA  LOCTR_NBR AB_TAXABLE_INCOME AMT_TAXABLE_IN_AB
       3715944  401377197     139048 01 01-FEB-08 31-JAN-09 N ASSESSED     30-APR-09 6045574495           1069336              1000
       4117092  400571410      57794 01 01-JAN-09 31-DEC-09 N ASSESSED     27-JUL-10 6053117120            790068               790
    2 rows selected.Anyways I am stuck in another issue and that is:
    Based on what I have received above - I have been given a new requirement and that is:
    retrieve the corresponding Schedule 002 data (if exist) from the RETURN_LINE_ITEMS table:
    *•     Sched_nbr = ‘002’, and Litm_line_item_nbr = ‘001’, and Active_ind = ‘Y’, get Revise_val_amt as ‘special_allocation’*
    *•     Sched_nbr = ‘002’, and Litm_line_item_nbr = ‘002’, and Active_ind = ‘Y’, get Revise_val_amt as ‘ab_salaries_wages’*
    So in order to do this, I committed 5 additional rows with schedule number 002 and they are as follows:
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '001',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '002',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '004',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '006',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '008',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    );                                              So based on the requirement I ran the following query in the hope that I should see 8 records but unfortunately I saw none, Can any one help again please??? The query is as follows:
    SELECT id, entp_abn, acct_id, prog_program_cd, period_start_date,      
              period_end_date, amend_ind, return_status, status_date, loctr_nbr,         
              ab_taxable_income, amt_taxable_in_ab,
              CORP_INCOME, AB_ALLOC_FACTOR, AB_TAX_PAYABLE,
              special_allocation, ab_salaries_wages
      FROM   (SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,              
                  r1.period_start_date, r1.period_end_date, r1.amend_ind,                  
                  r1.return_status, r1.status_date, r1.loctr_nbr,            
                  SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '062', rtlnms.revise_val_amt)) ab_taxable_income,                         
                  SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '066', rtlnms.revise_val_amt)) amt_taxable_in_ab,
                     SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '029', rtlnms.revise_val_amt)) CORP_INCOME,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '065', rtlnms.revise_val_amt)) AB_ALLOC_FACTOR,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '080', rtlnms.revise_val_amt)) AB_TAX_PAYABLE,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '001', rtlnms.revise_val_amt)) SPECIAL_ALLOCATION,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '002', rtlnms.revise_val_amt)) AB_SALARIES_WAGES
                  FROM   returns r1, return_line_items rtlnms                               
               WHERE  r1.id = rtlnms.rtrn_id                                                     
               AND    r1.id > 3600000                                                    
               AND    r1.prog_program_cd = '01'                                          
               AND    r1.return_status IN ('ASSESSED', 'DU')                             
               AND    r1.period_end_date BETWEEN                                         
                  TO_DATE ('01-01-2009', 'DD-MM-YYYY') AND                                 
                  TO_DATE ('31-12-2009', 'DD-MM-YYYY')                                     
               AND    rtlnms.sched_nbr = '000' 
               AND(rtlnms.sched_nbr = '002' and rtlnms.litm_line_item_nbr in ('001','002','004','006','008') )                                        
               AND    rtlnms.active_ind = 'Y' 
               AND    r1.status_date =                                                   
                  (SELECT MAX (status_date)                                                
                   FROM   returns r2                                                       
                   WHERE  r2. acct_id= r1.acct_id                                          
                   AND    r2.period_end_date = r1.period_end_date)          
               GROUP  BY r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,             
                     r1.period_start_date, r1.period_end_date, r1.amend_ind,               
                     r1.return_status, r1.status_date, r1.loctr_nbr, rtlnms.sched_nbr)
      WHERE  ab_taxable_income > 500000                                               
      AND    amt_taxable_in_ab < ab_taxable_income 
    strangely it's not retrieving any row where as it should have retrieved one row atleast and that is all records pertaining to return_id (return id ) = 3715944
    Can any of the Gurus' please help me out? As said I am really having a bad day on this. Many thanks to any one who can help me see the light today :-)

  • Multiple T61p lockup issues

    If my ThinkPad T61p is sleeping and I re-dock it, 75% of the time, it will turn off. Only way to fix is to remove battery and re-install. Sometimes all I have to do is just press the power button on the docking station and it will actually turn on. But many times, it requires the battery removal.  Other users also have the same issue.  Is this a known issue and is there a fix for it? I have tried a BIOS update but it didn't solve the issue.
    Thanks,
    Brent

    We had this problem with the older docks ... If you have one with little  metal contacts Lenovo will give you rubber shoes to go over them and it fixes this.
    Newer Docks have plastic litlle contacts.
    Check this out...
    http://www-307.ibm.com/pc/support/site.wss/MIGR-67382.html 

  • Multiple video playback issues

    Hi All,
    I would dearly appreciaty any light anyone could shed on this issue - I have run into a couple of Flash bugs that have stumped me for quite a while, and my deadline is aproaching fast.
    Essentially, I would like to play back 3 reasonably high res videos (On2 VP6-S) simultaneously in one Flash App (using flash.video, netstream and netconnect - code only). Unfortunately, when I do this, the video playback drops a lot of frames, however, CPU usage does not go much above 50% - spread over both cores. I'm using a Core2Duo. If I play the same 3 videos simultaneously in 3 separate flash apps (FP10), they play much better (and use close to 100% CPU). I even tried creating it as an AIR app with 3 separate windows (NativeWindow), but that made little difference. I have lodged this as a bug via the Flash Bug Reporting System (http://bugs.adobe.com/jira/browse/FP-2341).
    And yes, I do need to be doing something as crazy as this - it is for a pretty cool kiosk app, so I know what hardware will be used (and it has a good Graphics Card).
    One promising workaround appeared to be playing back a single NetStream in multiple Video instances, as it is NetStream that does the decoding, so I could decode once and present it in 3 places. Two of my video objects are actually the same flv (on different monitors), so there would be a 33% saving right there. If necessary, I could encode both flvs into a single 1920x1200 flv (I've checked - it would play back ok) and then use video.mask to show the relevant bits.
    However, another bug has been reported at http://bugs.adobe.com/jira/browse/FP-920 saying this does not work - Video in the object that last called attachNetStream(ns) will play, all others will freeze. They do mention a workaround that gets both videos to play - reset the size of freezed videos on ENTER_FRAME event. However, I cannot get this workaround to work - my first video is empty (not even frozen).
    So there are a couple of things I would love any feedback on. Firstly, if anyone has insights on how I could get this to work. Secondly, if anyone could try the "multiple videos on one netStream with workaround" code below (simply copy, paste and point to a relevant flv) and let me know if it works and the versions of software they used, I'd be very thankful.
    ---------------Code Begins-------------
    import flash.events.Event;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    showRedrawRegions(true); // both the placeholders and the entire window redraws every frame.
    // When only video1 is attached, only video1's region is redrawing
    // When both videos are attached, both video's regions are redrawing, BUT video1 is empty.
    trace ("Capabilities.version = " + Capabilities.version); // = WIN 10,0,22,91 // in Flash CS4 10.0.2
    //var nc:NetConnection = new NetConnection( null ); // Got Eror: 1137: Incorrect number of arguments. Expected no more than 0.
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    // Connect nc here ...? Unnecessary in this case?
    var ns:NetStream = new NetStream(nc);
    ns.client = new Object(); // Simplest way to deal with cuePoints and metaData by doing nothing. For more, see http://blogs.adobe.com/pdehaan/2006/07/playing_back_flvs_with_actions_1.html
    var stream:String = "test.flv";
    var video1:Video = new Video(); // Defaults to size of 320x240
    var video2:Video = new Video(); // Defaults to size of 320x240
    video2.x = 320;
    addChild(video1);
    addChild(video2);
    ns.play(stream);
    video1.attachNetStream(ns);
    video2.attachNetStream(ns);
    // PROBLEM: Video in the object that last called attachNetStream(ns) will play, all others will freeze.
    // See WORKAROUND below for solution:
    //WORKAROUND to stop the first split stream from freezing:
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    function onEnterFrame(e:Event){
    video1.width = 320;
    video1.height = 240;
    trace ("video1.videoWidth = " + video1.videoWidth);
    trace ("video2.videoWidth = " + video2.videoWidth);
    // When only video1 is attached, video1.videoWidth = 1920, video2.videoWidth = 0
    // When both videos are attached, video1.videoWidth = 0, video2.videoWidth = 1920
    ---------------Code Ends-------------
    Letting me know what exact versions of the following software was used would help a lot:
    - Windows/OS (e.g. XP SP3).
    - App code was written in. (e.g. Flash CS4 IDE 10.0.2, Flash Develop 3.0.1).
    - App code was compiled in. (e.g. Flash CS4 IDE 10.0.2, Flex SDK 3.4.0.6955).
    - Type and Version of Flash Player used (e.g. Standalone Debug Flash Player v10,0,22,91).
    The versions I used are listed above.
    Lastly, for what it is work, I found three interesting/informative results, but they didn't help me:
    - When only video1 is attached, video1.videoWidth = 1920, video2.videoWidth = 0
      When both videos are attached, video1.videoWidth = 0, video2.videoWidth = 1920
    - When only video1 is attached, only video1's region is redrawing
      When both videos are attached, both video's regions are redrawing, BUT video1 is empty.
    - var nc:NetConnection = new NetConnection( null ); // Got Eror: 1137: Incorrect number of arguments. Expected no more than 0.
      So I had to change it to:
        var nc:NetConnection = new NetConnection();
        nc.connect(null);
      Does this mean my NetConnection class is different and maybe incompatible with this workaround?
    Many, many thanks,

    How to view/hear pretty much everything:
    Assuming you already run OS 10.4.9 or above and have Quicktime 7.2, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer from http://uk.real.com/player/
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx (Windows Media Player for the Mac is no longer supported, even by Microsoft)
    Perian from http://perian.org/
    Adobe FlashPlayer from http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash
    In Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them).
    The world should now be your oyster!
    You should also have the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.

  • Multiple unidentifiable display issues

    I am running an Nvidia GTX 680 with two monitors connected to the DVI ports.  When I log in I will get a screen flash similar to that of when you plug a second monitor in or change your display settings.  It just goes off for a second or two once
    or twice in a row and then it's fine.  Occasionally however it will do this flicker 3 or 4 times and then the screen turns a bright green and the whole PC is locked up tight.  It has to be force powered off.  It happens seemingly randomly though
    there are a few things I can do that cause it 9 time out of 10:
    Changing from a window containing video to any other window including the desktop.
    Running any sort of video editing software.  I tested it with After Effects CC 2014 and Premiere CC 2014.
    I have taken some steps to resolve:
    >Updated and downgraded Nvidia driver as well as let windows choose the driver to install in hopes of finding a working one.  They      issue continued.
    >Installed the manufacturer monitor drivers as well as let microsoft choose a proper driver.  Neither worked.
    >Tried multiple DVI cable/Monitor configurations.  It actually seemed to happen more often with one monitor than with two.
    >Ran all updates in Windows
    Any and all help would be greatly appreciated.

    Hi,
    I checkec GeForce website about this Graphic Card information and found its latest driver was released at Thu Jan 22, 2015. I just want to confirm have you tried this latest driver for test? In case this is driver compatbility problem, it would be better
    to use the latest driver for test.
    On the other hand, please make sure other hardware driver, such as motherboard firmware to be latest.
    If problem persists, if your computer contains another integrated graphics, please try to disable it in BIOS settings for test.
    Roger Lu
    TechNet Community Support

  • Multiple iPod Touch issues

    I received my iPod Touch last Thursday and then spent most of Friday just trying to get the blasted thing to accept my wireless password. Note: I have multiple wireless devices, (one router) all of which use the same password with no problems. Finally, it accepted the password, allowed me to set up my ID and account, only to almost immedialy lose the wireless connection. Over the weekend, the iPod couldn't even find the wireless network. Finally, this morning I lugged myself to the Apple store (40 minute drive), waited for 45 minutes and finally got someone who knew what he was doing. Surprise - the iPod couldn't find the store's wireless network! After messing around a bit the "genius" (not a slam, this is what they call the techs) accepted that the problem was with in the iPod, not the user. He then replaced the iPod. Flash forward a few hours: I'm at a Panara Bread and decide to see if the iPod will work - nope, nada, nothing. It could not find the network! Came home and tried again - nope, nada, nothing! I keep getting the same error message: cannot connect/wrong password. I use the same password for multiple devices, none of which have this problem. My wireless router (Linksys) has only this one password programmed. My laptop (Windows), printer, phone all recognize and accept this password. The iPod will not. What do I do? I'm getting ready to scream because this is taking way, way, way too much time. I've never had this much trouble with a device before and really have no clue as to how to resolve this issue once and for all. Any help, any one can offer will be extremely appreciated. Thank-you.

    I am so incredibly disappointed in Apple!! I have owned my Touch for less than a week and have already been given two replacement units - neither of which have worked. I have visited three Apple stores, worked with 4 different techs and had two long telephone contacts with tech support. Yet, I still am unable to get a Touch that actually works!
    I did manage to get the third iPod to recognize the network, but the way I did it makes no sense to me - perhaps it will to someone with more knowledge. This is what I did after the store appointments and after the long phone tech support incident: Using the USB cord, I connected the iPod to my PC, accessed the Apple site, registered with my user name/password, went to the i-Tunes store, attempted to set up an account (more on this in a moment) and when the store recognized the iPod and accepted the registration, I unplugged the iPod from the PC and suddenly it found the network. Incidentally, I did this myself, with no input from the experts, it was simply an idea and it seems to have worked, at least somewhat. Now, as to why I say "somewhat": while the iPod can find my home wireless network, it cannot find any other network, including the Apple store network. No matter where else I take the iPod, it reads "network not found" or "no network access". On the iTunes setup: I managed to get all the way through the account setup before the iPod lost the wireless network, but at the last screen, the system kicked me out saying I was using an invalid password. BTW: this is the exact same password the same system had accepted less than five minutes before this error message appeared.
    The final blow to all this incredible hassle happened just a bit ago: I tried accessing tech support, using the same serial # I've been using (the latest serial # from the latest iPod they have given me) and received a message saying that I must now pay for support!! Okay - so let me get this straight: I buy an iPod. It doesn't work. I take the iPod to the Apple store, where they confirm that it won't work. I am given a second iPod - which fails within hours. I return to the Apple store, am given a 3rd iPod - that also fails within a few hours. Now, I've used up my free support?!! Interesting.

  • Multiple Internet Connection Issues

    Hi there, long time reader first time poster.
    I figured I should post this as, while having read through hundreds of similar posts I still can't figure out how to solve my connectivity issues.
    I just bought a new iMac 21.5 inch 3.2Ghz i3 model and while I am happy with the machine overall, it is the second one in a month - the first had a faulty ethernet port and refused to connect to the internet out of the box. Apple replaced it without question - almost as if they knew.
    The replacement has now seemingly developed the same issue.
    Some background info. The computer was connected both through ethernet and through the TC I bought to back it up until yesterday. So I was getting both a wireless signal from the TC and one through ethernet.
    I have a hub that has 5 devices connected to it ( Printer, Cable TV, iMac and TC - now a PS3 ) That hub is served a signal by a simple NTT modem connected to a phone line. That modem is now nearly 5 years old but has always given great net speeds so I don't believe the problem to be the modem - I could be wrong though.
    I just bought a PS3 and tried connecting it yesterday but had multiple problems. Despite me entering the correct PPPoE information to the letter, the PS3 refused to connect, saying the password and username was incorrect. I could connect it via a Bluetooth signal but no hard wired connection would work.
    So I unplugged everything from the hub, shut down all the machines, turned off the modem and let it sit for 10 minutes and then plugged the ethernet cable from the PS3 straight into the modem, giving it a direct line. Switched on modem, rebooted PS3 and tried again - this time it connected through ethernet. I still don't know how or why. I can guess but I'm sure you guys know much more about this than I do.
    So then I tried connecting the iMac back to the net, reconnected all the hub, followed the same procedure. Off, sit for a bit, on etc. This time the PS3 has no connection and now the iMac has no connection either!
    The TC gave a green light though so I was able to get wireless. I tried removing all net locations from the iMac, installing new ones, renewed the DHCP lease, but no matter what I did (PPPoE info 100% correct) it just refused to establish a connection.
    The the bloody TC light flashed amber and I couldn't get wireless either despite being plugged into the hub and getting a signal! The PS3 is now working and the cable is fine so I am starting to think either I have cluster ****** the whole setup or something is wrong with the iMac.
    I go away for an hour then come back and the stupid TC has somehow picked up a connection! The light is green again?! But now the time connected display is scrolling repeatedly. I've got net but what the **** is wrong with all this?
    Bottom line - not ethernet connection for the iMac but TC seems to be working and all other devices have a connection.
    Please help me if you can! I just can't figure any of this out.
    Message was edited by: Zildog
    Message was edited by: Zildog

    Your description is a bit confusing, but I use English as a second language, so it may be just me.
    1. How is the hub connecting to your modem, by ethernet cable or wirelessly?
    2. Which device is negotiating the internet connection with your ISP, the modem?
    3. Does the device that negotiates the connection use PPPoE?
    4. How are the other devices being handed their internet connection? DHCP only?
    Only one device should be connecting directly to your ISP using the PPPoE protocol and configured with your account username and password. This device is preferably the modem. This device should be configured to hand out internal IP addresses to the other devices on your LAN using DHCP. All of the other devices should be configured to request an IP from that device, whether by ethernet or wi-fi, just with DHCP.
    Dah•veed

  • Multiple Collapsible Panel Issues

    When I have a single collapsible panel on my page it works
    just fine. However, once I start to add more panels I start to get
    issues. The panels are not nested or anything, I just have the
    following problem:
    With a single panel, the entire tab area is clickable as the
    control to open/close the tab.
    With multiple panels the first panel is as above but any
    subsequent panels lose haveing the entire tab area as clickable.
    What I mean is you can only open or close the tab by clicking on
    the text within the tab itself, rather than any area of the tab.
    I am using 1.6 and ensuring my div id's match the
    corresponding script insert at the bottom of the page etc for each
    new panel.
    Any help would be greatly appreciated
    TIA

    nvm, i had a funny margin value set that was throwing things
    our of whack for some reason, found it totally by accident.
    thanks anyway

Maybe you are looking for