How to perform grouping like a daisy chain

Hi:
I have a database table of Building Inspections (InspectionID) for each Building Permit (PermittingID).  Sometimes the inspections fail and have to be re-inspected. I do not relate each re-inspection to the original inspection.  I relate each re-inspection
to the inspection being re-inspected.  I am using daisy chain logic. 
For example:
PermittingID     InspectionID     ReinspectionRequestNum     InspStatus
       3                     3591                                                              
F
       3                     3843                          
3591                            F
       3                     4437                          
3843                            F
       3                     4777                          
4437                            F         
       3                     5069                        
  4777                            F       
       3                     5204                          
5069                            F
       3                     5242                          
5204                            F
I have been asked to create a report of ONLY the inspections/re-inspections that have failed and continue to fail (like above example). This includes any inspections that failed and were never reinspected. 
For example:
PermittingID     InspectionID     ReinspectionRequestNum     InspStatus
       17                     8                                                                  
F
       17                     11                        
                                        F
       17                     16                          
                                      F
       17                    236                          
                                     F         
       17                    237                       
                                        F       
       17                    238                          
                                     F
I must Exclude any inspections that have failed, but ultimately passed. 
For example I would exclude ALL below:
PermittingID     InspectionID     ReinspectionRequestNum     InspStatus
     105                     38                                                              
F
     105                     76                          
38                                P
PermittingID     InspectionID     ReinspectionRequestNum     InspStatus
       3                     3480                                                             
F
       3                     3669                          
3480                           F
       3                     3942                          
3669                           P
Any help is greatly appreciated with a query to filter out all inspections that have eventually passed.
Thank you.
Carmelita

Hi CKCOMPUTER,
Regarding your description, are you trying to exclude the records which has the  'P' InspStatus? I am confused by the last sample with the PermittingID 3, I noticed that at the very above the records with 3 were mentioned not being excluded. If that
is a typo, you may reference the below query to achieve your requirement.
CREATE TABLE BuildingInspection(PermittingID INT,InspectionID INT,ReinspectionRequestNum INT,InspStatus CHAR(1));
INSERT INTO BuildingInspection VALUES(3,3591,NULL,'F');
INSERT INTO BuildingInspection VALUES(3,3843,3591,'F');
INSERT INTO BuildingInspection VALUES(3,4437,3843,'F');
INSERT INTO BuildingInspection VALUES(3,4777,4437,'F');
INSERT INTO BuildingInspection VALUES(3,5069,4777,'F');
INSERT INTO BuildingInspection VALUES(3,5204,5069,'F');
INSERT INTO BuildingInspection VALUES(3,5242,5204,'F');
INSERT INTO BuildingInspection VALUES(17, 8 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(17, 11 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(17, 16 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(17, 236 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(17, 237 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(17, 238 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(105, 38 ,NULL,'F');
INSERT INTO BuildingInspection VALUES(105, 76 ,38,'P');
SELECT * FROM BuildingInspection BI WHERE NOT EXISTS(SELECT 1 FROM BuildingInspection WHERE InspStatus='P' AND PermittingID=BI.PermittingID );
DROP TABLE BuildingInspection;
If the records with 3 are in the same table with the 3s above, please clarify the correlation.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support

Similar Messages

  • How to Perform Group By operation in OBIEE 11g

    Hi,
    I have created a report for the "Nationality count in department wise manner", since for this i need to give 'group by department' for getting correct answer...
    But in OBIEE 11g on presentation service how i need to give "Group BY" operation....for viewing correct count in nationality wise......
    Regards,
    Harry...

    Hi sai,
    U mentioned, but i couldn't clearly able to understand that.......Since to perform Group By i need to make some setting changes in content in Advanced Tab setting like that it is mentioned, but i need to perform in the following manner
    select count(nationality), nationality
    from per_all_people_f, per_all_assignment_f, hr_all_organization_units
    group by department
    Note: per_all_people_f-----------> dimension table, per_all_assignment_f--------------> fact table
    nationality from per_all_people_f and count(nationality) from per_all_assignment_f
    But department is from hr_all_organization_units--------->dim table
    I dont want to see the departments but i need to group the result in department manner that i was taking from the table hr_all_organization_units.....
    How to perform Group BY in OBIEE 11g.......
    Thanks,
    Harry.........

  • How can I write to multiple daisy-chained network serial addresses through a single COM port?

    I have a VI to write to 3 PI Mercury motor controllers using daisy chained RS232 connected via a Prolific USB-to-Serial adapter. I know that it is possible to talk to the individual controllers because the PI terminal that I have recognises the addresses of multiple controllers and designates them Device 1,2,3. The VISA resource name when configuring the port just comes up as COM5 most of time, with seemingly no way to specify an address on that COM port. Occasionally the VISA resource is ASRL5::INSTR and as this is disconnected and re-connected, this address moves up a number (e.g ASRL7::INSTR). Can anybody tell me how I can configure my serial communication to allow me to individually communicate with the different devices through a single COM port?

    What does the manual say about addressing? RS-232 is not multidrop, the resource name is correct, and there is no additional configuration needed. There would have be a specific write in order to address a certain controller.

  • How many FW devices can you daisy chain?

    Have a new iMac w/ one FW800 port. Need to daisy chain eight FW800 hard drives, two FW400 hard drives, and one FW400 DigiDesign Digi002 ProTools mixing board. I was planning on daisy chaining all the FW800 drives then coming out of the last of those with a FW800 to FW400 cable into the first FW400 drive, daisy chaining to the 2nd FW400 drive, then daisy chain from it into the FW400 ProTools mixing board. I know that's a lot of chaining but at the moment those are the devices I have to work with. I have A LOT of video and audio information I need to retain. Seems to me that I read somewhere about a maximum length a firewire daisy chain could be but haven't found any more reference to it when I just looked. All of the devices have their own power supplies so I don't believe they will be drawing much, if any power from the chain. Anybody know of any problems with this setup?

    Thanks for the info.
    I've tried several scenarios and combinations what I've found is that I can put all the FW800 drives in a daisy chain then put the 1st FW400 drive in and lastly the Digi002 mixing board (which is FW400). When I try to add to this any more drives I get unpredictable results. I have therefore bough another 2TB external drive and hooked it up through USB 2.0 and copied many files to it from the older FW400 drives as well as the only FW800 drive that ever game me headaches. It should be noted that it is a Western Digital My Book drive. It seems like it would be a great drive having FW800, FW400, and USB 2.0 connections. In practice, however, I have had LOTS of problems both on my Macs and PCs I tried using it on. I recommend strongly that you avoid using any MY Book drives. I'm having better luck with practically any other manufacturer, including what I would normally consider no names like SimpleTech and Buffalo. Those drives seem much more stable.

  • How many firewire drives can I daisy chain on the mac mini

    How many firewire g-drives can I daisy chain on my mac mini

    edalexjr wrote:
    How many firewire g-drives can I daisy chain on my mac mini
    From personal experience, if they are bus powered portable drives,
    the answer is none.  For what ever reason, they are draw a lot of
    power and are probably near the edge of the bus powering specs.
    Then again, these were the fastest of all the portable FW drives that
    I have (Iomega and Seagate being the others), which may have
    something to do with it.
    I had also noticed an issue with them even with USB.  Plugging one
    into the Mini or even a powered USB hub would be fine, but 2 would cause
    both to be inaccessible, unless I used a couple of USB "Y" cables
    that would distribute the power across other ports.
    If they are externally powered, you could string a bunch.

  • How Do I Stop Aggregator from Daisy Chaining My Movies?

    Aggregator's default configuration shows all the movies in a project back to back (daisy chaining),but I want the user to be able to control the navigation. How do I stop Aggregator from doing that? There don't seem to be any configuration options in Aggregator itself, so I assume that each project must be configured separately in Captivate. If that's the case, and if there's a solution to this problem, what configuration setting or settings need to be set in the projects before they're imported into Aggregator?

    Hi there
    Indeed it would appear that Aggregator simply consecutively plays through the listed movies in order. This seems to occur regardless of how you have specified each individual project as far as the Start and End actions.
    One way past it is to ensure you insert a Click Box or Button object on the last slide of each of the Captivate projects that are part of the Aggregator. By adding the Click Box or the Button the project should just remain paused until some other interaction causes the playhead to resume.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How to perform Excel like function in Sql

    TABLE_NAM             ROWS_IMPACTED_ACTUAL            OPERATION_TIMESTAMP                              TIME_ELASPED
    END_OF_DAY       0                         06-SEP-12 04.37.18.328927000 PM     
    TAXL                           0                         06-SEP-12 04.37.18.337675000 PM     
    TRANSACTION      0                         06-SEP-12 04.37.18.430409000 PM     
    PORTFOLIO       0                          06-SEP-12 04.37.18.430984000 PM     
    I have a table similar to the one above, how do i get time elasped above , for each operation?
    That is how long each table completed an operation.
    Thanks
    Edited by: user8375449 on Sep 14, 2012 4:09 AM

    No, you cannot attach documents/picture to the forums, that's just not possible (this isn't Oracle Support which you pay for)
    If you read the FAQ that I linked to, it tells you how to post code and data using the {noformat}{noformat} tags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Daisy Chain a second Monitor to Thunderbolt Monitor

    I purchased a new Dell S2040L HDMI Monitor and I would like to Daisy Chain to my Thunderbolt. I plugged the Dell Monitor into the back of the Thunderbolt monitor and my Mac Book Pro (OX Version 10.9.4) will not reconize the Dell monitor as a second monitor. Is there a display setting that needs to be changed?

    You could use a USB to DVI converter
    <http://eshop.macsales.com/item/NewerTech/VIDU2DVIA/>
    but performance will be severly limited by USB and some functions won't work
    <http://www.displaylink.com/support/mac_downloads.php>
    "Please note: This driver does not support 3D acceleration. Some features of Mac OS X-based applications that require hardware OpenGL acceleration, such as Keynote presentations and iPhoto* slideshows, will not function properly."

  • Daisy chain two MI424WR routers?

    I've been googling but have been unsuccesful and my friendly automated Verizon CR pop up box has no clue what I'm asking him :-)
    Given the configuration in our house, we can only hardwire into the FIOS Internet in one location (with a MI424WR router), and I need a hard connection at a 2nd location to activate my slingbox.
    I have a 2nd MI424WR that I'd like to daisy chain to the 1st one, at the secondary location where I have the slingbox.  Once I have internet access at the 2nd location, I assume I can then get the slingbox working off of that internet signal at the 2nd router.
    So....can anyone explain simply, step by step, how I can daisy chain the routers such that the 2nd router can piggyback on the 1st router's internet access?
    Thanks so much - and the simpler and more straightforward the instructions, the better - I'm not the strongest techie in the world!

    wOw! how confusing.   
    Actually, Your 2nd Verizon Router can be turned into just a basic switch, so no need to go purchase anything. - To make it act like just a switch instead of a router, You need to access that router's configuration page and turn off the 'DHCP Server' function.
    to do that you need to connect a computer to that 2nd router via an ethernet cable (Plug the power cord in for that router, but do NOT connect that router to the internet)  plug the cable from your computer into one of the 4 LAN ports on that router (not the WAN port)
    open your internet browzer on the computer connected to that router and type in 192.168.1.1 in the address bar <- that should connect you to the page to enter the configuration pages of that router.
    NOTE:  If you hold in the reset button on the back of that router for 15 seconds, then let it go and wait about 2 minutes before you try the above process,  you will have reset the default access codes on that router to make it easiest to gain access to....  the default login name = admin, and the default login password = password (or password1)    You may be directed to change the password the first time you access the router, but that is up to you if you want to change it.
    Any way, log into the router    choose 'advanced' at the top, choose 'yes' you want to proceed, then look for 'IP Address Distribution' in the main part of the screen, open that,   you should see something like 'Network (Home\Office)' and on that same line out to the right you see a box labled 'Action'  - click on that 'Action' box and another box opens.  AT the top of that new box you see a listing for 'Services' and under that the only service listed should be 'IP Address Distribution'  with a drop down menu to the right.  By default it should say "DHCP Server".   Click on the drop down menu and choose 'disable'.   Then click on 'APPLY' at the bottom, then choose "logout" on the left.    
    NOTE:   If you ever need to reset that router, it goes back to the default settings, which makes it a DHCP server again.  (There is a way to 'save' your current configuration to the computer the Router is attached to, so that you can 'restore' the current settings in the future without needing to go through all the steps here.) 
    after you have completed this, you need to connect the ethernet cable coming FROM your 1st router (which is the one assigning IP addresses) [plugged into one of the 4 LAN ports on the first router]  to the second router by plugging that into the WAN port of the second router.    Then connect an ethernet cable from one of the LAN ports on the 2nd router to your device.
    Your device will then receive an IP address.
    NOTE:    The easiest, fastest way to have all this 'just work', will be to turn off the first router BEFORE you connect the second router to it.    Turn off all devices connected to the first router.   Have your 2nd router turned off as well as whatever you are going to be connecting to the 2nd router.   TURN everything off.    Then make all the connections.  Then FIRST turn on the first (main) router.   wait until you have the internet light is green on that first router before you turn anything else on.  SECOND, turn on the second router and wait until the internet light on it is green on it before you turn on anything else.    Then turn on whatever devices.   It should all just work.
    cjacobs001

  • Daisy-chaining firewire 400 and firewire 800?

    I would like to daisy-chain two Western Digital MyBook Pros to a Macbook:
    - FW 400 from Macbook to first drive
    - FW 800 between the drives
    Would this work or not? I have one of those, they have 2 x FW 800, 1 x FW 400, 1 x USB at back.
    (If not, I'll buy a 'Premium' which has 2 x FW 400, and 1 x USB..)

    JoeyR wrote:
    I'm not sure if the hardware in the first drive, that's connected by firewire 400 is "smart" enough to jump the data over to the FW800 connectors for daisy chaining.
    Just pulled this from the WD site. I would say this indicates it would work. You won't get more speed but they should work daisy chained. This indicates the drive is smart enough to do this.
    +Question: Will Western Digital FireWire 400 (1394a) external hard drives work connected to a FireWire 800 (1394b) port?+
    +Answer: The FireWire 800 Specification (1394b) states that FireWire 400 devices will work while connected to a FireWire 800 (1394b) port. The FireWire 400 cable (4-6 pin or 6-6 pin) will not connect to a FireWire 800 port (9 pin) therefore you will need to connect the hard drive using a FireWire 400 to FireWire 800 cable (1394a to 1394b cable). These cables are available at most computer stores.+

  • Fw800 daisy chain problems - crashing MBP

    I just had two massive crashes on a 6-month old MCP with new external FW800 drives daisy-chained.  The first crash happened when I tried to hook and "old" (5 years) FW400 hard drive within the daisy-chain of newer FW800 hard drives.  The second happened when all 3 of my new (8-months old) FW800 drives were connected:  one of the drives just spun its wheels and never showed any data.  After shutdown / reboot it's ok - but there are 1.3TB of info on it.
    Questions:  How many FW800 drives can you daisy-chain out of the one FW800 bus on a MacBook Pro?
    Or is it a length of cable issue?  Or is hooking up the older FW400 into the chain the problem?
    I researched online and found multiple posts that said you can daisy-chain Sixty-Three hard drives.  This sounds impossible and unbelievable given what I have just experience with THREE hard drives.

    The problem is that this could be tough to troubleshoot if it is a power supply, as the offending drive will attempt to pull the juice it needs to keep running from the FireWire bus.

  • Daisy-chain internal drives temporarily???

    Hello! So after a western digital 1TB external drive failed on me I am looking to recover the data on my own. I have taken out the drives from external casing. Call them DRIVE A. I would like to daisy chain them through my iMac's current internal drive which we'll call DRIVE B. I have no need to copy the data from A to B. I just want to be able to get my computer to recognize A as another internal just temporarily so I can copy it all thru to a NEW external fire wire drive, DRIVE C.
    So the goal is to just copy the data on DRIVE A to DRIVE C via a Drive B.
    I have never daisy chained internal drives before and would really appreciate the communities guidance on accomplishing this. Thank you!

    You should not open up your iMac, when there are far easier ways to do what you desire.
    1. You can get an empty external drive (either FireWire or USB 2.0 or one that has both interfaces). Put A in that case. Copy off the data to B. Swap out A for C. Copy off the data from B to C.
    2. You can get one of these USB to IDE/SATA adapters for $30.
    http://eshop.macsales.com/item/Newer%20Technology/U2NV2SPATA/
    Connect A to this adapter and connect to USB. Connect your new external drive with C to FireWire. Copy off data from A to C. You don't need the intermediate copy on B.

  • How to perform operations on table control

    hello experts,
                         will u plz tell me how to perform operations like delete and update on tablecontrol in module pool.
                                thanks in advance,

    Hey Aravind,
    In case you want to delete just from your table control and not from database table, then you can use the commands:
    clear <workarea_name>
    delete <workarea_name>
    for your selected rows.
    And for deleting from database tables also, use:
    Delete from <Database_table_name> where <where_clause>.
    clear <workarea_name>
    delete <workarea_name>
    This will delete both from the table control and database table also.
    Reward if it proved useful to you.
    Regards
    Natasha Garg

  • Can I use NI 8451 for daisy chained SPI? How?

    Hi Experts,
    I am new to Labview and now I am trying to find a solution how I can read and write SPI commands on a daisy-chained configured master-slave. The system I am using has 2 slaves. Each slave would need 24 bits per command frame and SCLK is at 400 kHz. Is it possible to use NI8451 for this problem? I would like to know because we would like to purchase this module if it can do the job.
    I hope you can help me.
    Thanks.

    If you go to NI's website (ni.com) and search for USB-8451, you will find a lot of information about this device.  The user manual specifies that it has 8 chip select lines, so it can handle up to 8 slave devices.  The document shows how to hook it up and how to use it.  There is a Labview driver library for this device to make your programming easy.
    - tbob
    Inventor of the WORM Global

  • I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    Hall Palm Desert,
    if your Mac monitor has Thunderbolt ports, and the PC monitor is on the end of the daisy chain, then you might be able to do it by connecting your PC monitor’s VGA cable to a Mini DisplayPort-to-VGA adapter (e.g. Apple, NewerTech), connecting that cable’s Mini DisplayPort end to one of the Mac monitor’s Thunderbolt ports, and then connecting a Thunderbolt cable between the other port on the Mac monitor and your MacBook Pro.

Maybe you are looking for

  • One ID for apps and one id for match

    Hey Since I have my phone throug work I have a small problem. I use one work account (for buying apps for work) but I want to use my personal account for iTunes match. Is this possible, since I don't want my work to have to pay for my match and my mu

  • IMac DV G3 firmware/OS 9 install

    Just wondering if anyone can advise me on this as I'm getting a little lost as to what I need to do or how to do it. I've just got my hands on an old but mint condition iMac DV (G3 M5521) 500Mhz with 30Gb HD and 256 RAM (it also has the slot-loading

  • STATSPACK ANALYSIS TOOL

    hi guys, I need to analysis my statspack report of my own. Is there any free tool provided to analyse the report of my own. TIA,

  • Problem creating a join in a MultiCube between an ODS and an InfoCube

    Hi there, I have a MultiCube that I am trying to Build a Report from. The MultiCube links together an ODS and an InfoCube. The difficulty I am running into is that the ODS contains Document Change Data and Header Level Data and the InfoCube holds dat

  • Shortcut editor

    This might be a tangent, but I would be more tempted to ask for a better built in method of managing keyboard shortcuts.  The way this is done in Premiere works well as one station can handle different preferences for multiple users and I know that I