Group By and Exclusions

I have a table with these data:

TypeNumberStatus
112345A
112345A
112345Z
112345Z
123456Z
123456Z

and I want my SQL to return this:

TypeNumberStatus
123456Z

Currently my sql is a 'Type' and 'number '.  I want to return the rows where STATUS = 'Z' but exclude the lines where the grouping includes the lines with STATUS = 'A'

Hello

So, you want to exclude lines like

Type Number Status
1 12345 Z

not because of anything on the line itself, but because of certain characteristics of the whole group.

This looks like a job for a HAVING clause.  Here's one way:

WITH MIN (CASE

WHEN status = 'A '.

THEN THE STATUS

END

) IS NULL

If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

Tags: Database

Similar Questions

  • I can't send messages, whatsapp for group discussions and I think that is the update of ios software that is not compatible with my iphone 5 s

    I can't send messages, whatsapp for group discussions and I feel really lost. my friends can't receive my message and I am only able to send individual text messages. I think that its because of the version update of ios which is not compatible with my iphone 5 s. is a solution to this problem?

    I have the same problem, started this morning.

    I'm in iOS 9.1, using the iPhone 6. Don't know what happened, but I have also opened a disturbance with Whatsapp support as well.

    A focus group work, group chat messages cannot be delivered. Individual messages are working properly. I tried to remove and reinstall the application, remove the discussion group and recreate, all has not helped.

    A lack of ideas.

  • What are the differences between the services and site domain group policy and group policy?

    What are the differences between the services and site domain group policy and group policy?

    Server must wonder about the Technet site.  http://social.technet.Microsoft.com/forums/en-us/home

  • Whenever I insert a USB in my PC is not autoplay, I do not have available to all group policy, and I can't read or write CD/DVD

    Original title: "Autoplay, group policy and CD/DVD"

    Hello

    I have two questions actually worry,

    First of all, I have Windows Vista Home Premium Service Pack 1 installed on my PC

    My first problem is that whenver I insert a USB in my PC it doesn't autoplay and the option is not available at all even when I get clich the drive itself, I went Microsoft support and installed security update 950582 and still no hope. I also can't find the NoDriveAutoRun or NoDriveTypeAutoRun in the registry because I don't have the key explore in both policies.

    In addition, I have not available to all group policy.

    My second question is that I can't read or write CD/DVD even if I have the driver installed, I tried the DVD Microsoft repair but it shows that the repair failed.

    Thanks in advance and hope to receive a solution soon.

    SAS ING.

    Hi Sas Eng,

    There are a few solutions to the question of automatic playback on the following link:

    http://Windows.Microsoft.com/en-us/Windows-Vista/Troubleshoot-AutoPlay-problems

    And if the solutions provided for the DVD ROM Lorien did not help, as you say, it is probably a hardware fault.

    Try the steps are on the link and let me know if it helps!

    Cody C
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to get a handle to the window to screen using just group id and the id of the window?

    Hello

    We are trying to develop a video application, and we use ForeignWindowControl to display the video on the screen.

    We have those ForeignWindowControl declared and defined in a QML file that appears as needed.

    Using the CameraAPI, we are able to get local video displayed correctly on the local video ForiegnWindowControl. For this we have just the window group id and the id of the window api camera and it automatically configures the window newly created by the camera to the position API and the size defined in the QML file.

    However, this is isn't the case with the video remotely. Since there is no method/function similar to the createViewFinder of the camera api, we need to create a new window of ourselves that goes under the Group shared by the ForeignWindowControl remotely, using screen_create_window_type and set all the required parameters.

    To view the video, hard-code manually the position and size of the newly created window so that it corresponds to the position and the size of ForeignWindowControl remote in QML file and is displayed correctly.

    My question is how to find the ForeignWindowControl using just the group id and the id of the window? the way in which the cameraAPi done in-house?

    Any help would be appreciated.

    Thank you.

    There are 3 ways to associate a window with a ForeignWindowControl.

    1 tell the ForeignWindowControl to expect a window with a given windowId.  Then after that libscreen allows you to create your window with the same windowId, use screen_join_window_group() to adhere to the same group that uses the FWC.  The FWC should automatically capture this event and associate the window itself.  This is how the camera it.

    2. call the bindToWindow() of the ForeignWindowControl method to associate the FWC a particular windowId/groupId.  Similar to the #1, but doesn't seem more useful if you create the FWC after the window of the screen has been created.

    3. call the setWindowHandle() of the ForeignWindowControl method.  Similar to the #2, but instead of using windowId/groupId, you spend just the actual handle.

    See the FWC docs:

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__foreignwindowcontrol.html

    If you have created the window, you can use one of the 3 approaches.  If the window has been created in a different process (eg. mm-engine rendering, or photo-service device), then generally #1 is the approach you would use.

    See you soon,.

    Sean

  • IOS anyconnect vpn group lock and user restrictions

    Dear Experts,

    I now have two questions about cisco IOS vpn on ISR G2:

    1 is it possible to lock user group in IOS anyconnect VPN we can do in ASA? If so, can someone share the steps for her?

    2 - a customer wishes to restrict the anyconnect user login as it might turn the connection to the user on request. That is to say whenever the user wants to connect via vpn to ask the administrator to allow connection. can we do without deleting the username and create again?

    the other may be on ASA or IOS.

    Please see this guide:

    http://www.Cisco.com/c/en/us/support/docs/security/iOS-easy-VPN/117634-c...

    As he points out, "for the Cisco IOS group-lock and the ipsec: use vpn-group, it only works for IPSec (the easy VPN server)." In order to group-lock specific users in specific contexts of WebVPN (and strategies Group attached), authentication domains should be used. »

    If you lock a user to a policy that authenticates, but does provide real access permissions (say an ACL that blocks all traffic to the private network) then you have essentially made their ability to non-functional connection.

    If you use an external AAA server (for example, RADIUS or LDAP), then you can move in and out of the group which is authorized without disable VPN access / delete their account altogether.

  • Access-list group policy and IPSec tunnel.

    I have an IPSec Site to Site VPN tunnel that ends on the external interface of the firewall. My ftp server is located in a demilitarized zone. The DMZ has an access list applied to the interface. When I created the Group of the tunnel for the Site to Site, I create a group of tunnel with group policy and manage the policy with filters. The filter looks like an access list. Are the filter and the ACL interface work together? The one replace the other? How they work together.

    Once traffic ipsec, acl interface is not used until you have enabled "sysopt conn allowed-/ ipsec vpn. When you add a vpn-filter, it is what will filter the ipsec traffic.

  • Remote access VPN group name and password

    Hi guys,.

    Can someone tell me please the command to display a remote access VPN group name and the password on a firewall version 8.0 of ASA? Any help will be greatly appreciated.

    Thank you

    Lake

    Remote VPN IPsec IKEv1 access are listed as groups of tunnel. If you enter

    more system:running-config | b tunnel-group

    You can see the config sections (starting with the first mention of the tunnel-group) as well as the pre-shared key ikev1 plaintext String.

  • My computer is connected to the Windows 2008 R2 server and some of the users on this computer receive their network drive mapped on group policy and some do not.

    My computer is connected to the Windows 2008 R2 server and some of the users on this computer receive their network drive mapped on group policy and some do not.  I find nothing in Event Viewer that shows that there is a problem.  Please let me know what to do to get the disks appears

    Original title: Network Networking file sharing file sharing file sharing file sharing discovery sharing Fileshare share shared

    Hi,

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    TechNet Forum

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

     

    Hope this information helps.

  • Display the group name and group password

    Hello

    Can someone tell me the commands that will show you the group name and the password for the Group on a PIX 501 6.3 (4) running?

    Thanks in advance!  All the answers have been evaluated.

    Hi Angel-Moon,

    Hope you do well,

    Here are some links that will help you to recover the key provided in advance of the running configuration configuration

    The more command to decrypt the password does not support the old codes of PIX

    The other way is to copy the configuration to a TFTP server running

    http://www.Cisco.com/en/us/docs/security/PIX/pix63/command/reference/TZ.html#wp1027782

    Link below will help you by specifying the TFTP server

    http://www.Cisco.com/en/us/docs/security/PIX/pix63/command/reference/TZ.html#wp1026054

    This issue is also addressed in thread below

    https://supportforums.Cisco.com/message/885007

    Let me know if you have any other questions

    Concerning

    Ashish

  • I try to insert two images in a single document, group them, and then export it to a jpg file but cannot do so can you please help. Thank you

    I try to insert two images in a single document, group them, and then export it to a jpg file but cannot do

    Hello sara,.

    For my part, I prefer to use my German PS in this way (I try to translate the commands):

    Use the same height for both images.

    Open the first image in PS.

    Use Bild > Arbeitsflache (Image > work plan?) See screenshot:

    From there:

    Give him the new with, by clicking on the left or the right indicating the hand playing around (trial and error).

    Now you can insert your second image.

    Hans-Günter

  • Very much a beginner. How can I cut someone on a group photo and move them to another part of the same photo?

    I have a group photo and I would like someone from one side of it to the other. I would like to know how to select this person, cut him and stick him in a different place on the image. Is this possible? If so, how? Thank you!

    Try this

    Using Photoshop | Moving and Patch content-Aware

  • Groups, users, and Provisioning information Migration using LCM

    Hi all

    I need to migrate groups, users and their configuration information from one application to another application with dev server itself. Can someone tell me how can I do this using LCM. I'm getting confused in the options available under applications-> Foundation groups-> Shared Services in LCM.
    There are many options available as the native directory
    Groups a) (b) users) c d) Native directory roles->-> assigned roles planning-> "App name".

    So, what options to choose to migrate groups, users and their configuration information.

    2ndly the application names are different because they are on the same server. In what files I need to change the name of the application (files will be created just by making export FCL like Group.csv etc)

    I'm working on 11.1.1.3 version. My requests are classic planning apps.

    Thank you
    Ashu

    It is possible to copy the provision by right-clicking a Shared Services planning application and select "Copy Provisioning" and then select the application to copy the commissioning to.

    If you want to do through LCM > Foundation > Shared Services > native Directory > planning > PlanningAppName

    ExportSecurity/ImportSecurity planning utilities are only for export/import of planning permissions.
    This can be done using LCM > select the planning application > Security > access permissions

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Hash GROUP BY and sort BY

    Please can someone explain how the hash GROUP BY and GROUP BY sort exactly?
    Thank you.

    Hello

    I think that Tom may have been reference to the file binary sorting method rather than using the values all binary sort.

    In any case, his point is that we should never rely on GROUP BY clause don't you place your order for you (only ORDER BY can ensure that), and it's true, no matter if GROUP BY of HASH or SORT GROUP BY is used internally to the aggregation for the query.

    I hope this helps.

    Best regards
    Nikolai

  • 'group', 'link' and 'the NEST' - difference?

    You can group, link and test video clips on the timeline. The 'nest', one is the only one who really seems to do something similar to what I expect. Two groups and link do not seem to do a gosh darn thing!

    Clips of the Group

    Link and unlink audio and video clips

    Nesting sequences

    Premiere Pro CS5 - CS6 reference

    (12 MB .pdf download)

    http://helpx.Adobe.com/PDF/premiere_pro_reference.PDF

Maybe you are looking for

  • About this mac OS 10.11.6 but app store shows still says download available

    I downloaded the latest update. I used to problems since the first upgrade to El Capitan in what I usually feel a white screen to halfway through the update, closing force downwards and then reopen mode without fail to complete. This time, I see the

  • HP Officejet Pro 8500: Pro 8500 has only scan full page

    Hello, for some reason, my scanner is missing at the bottom 2 inches of the page when I scann sheet A4.

  • Program which tab is visible

    Hello community, I feel that this is a trivial question, but I couldn't find the answer in the search of the forums. How do you control whose tab is visible? I thought there would be a node property or something, but maybe I missed it. I've included

  • "No boot device" trying to reimage dm3-1040us

    I have a HP Pavilion Entertainment PC (dm3-1040us) with a bad hard drive. This PC was originally Windows 7 64 bit I'm getting ' no boot device - insert boot disk and press any key any. " I replaced the hard drive failed (WD3200BEKT-60F3T1) with a Hit

  • Cup printer print page right?

    Don't know why printer cuts right to the print page.  Any ideas? I use Windows 7 XP