How to exclude certain folders from the result of the query

I'm writing a query to exclude some records from a query. Normally, of course, I do it with a NOT IN or use SUBTRACT. However, I can not do with these records because it is not working properly. There is a table called SHRTRCE that contains fields for PIDM, SUBJ, COURSE and TITLE, coded as follows:
create table SHRTRCE
(
PIDM     NUMBER     NOT NULL
SUBJ     VARCHAR2(10)
COURSE     VARCHAR2(6)
TITLE     VARCHAR2(30)
)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(12345,MATH,1X0501,COLLEGE ALGEBRA)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(12345,ENG,2X1001,COMPOSITION II)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(12345,PSYC,1X0101,GENERAL PSYCH)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(23456,ENG,1X1001,COMPOSITION I)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(23456,PHY,1X3201,NON-LAB PHYSICS)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(34567,MATH,1X0501,COLLEGE ALGEBRA)
/
INSERT INTO SHRTRCE
(PIDM,SUBJ,COURSE,TITLE)
VALUES
(34567,MATH,2X2010,CALCULUS I)
/
I want to do is pull ONLY the records for these PIDMS where there is no class with the OBJECT of MATHEMATICS. So, in this case, I want only the values for PIDM 23456. If I use NOT IN, I always get PIDMs in my list where the person did one or more courses of MATHEMATICS; only, it excludes courses, which are MATHEMATICAL, but leaves others. If I use a SUBTRACTION, producing the same results. I don't know how to proceed at this point. I'm going to cut him, but thought I'd post something because I know it is probably something easy enough, I'm simply not anywhere in my books.

Thank you very much
Michelle Craig
Data Coordinator
Kent State University

Published by: BluShadow on January 10, 2012 14:23
fixed {noformat}
{noformat} tags.  the word "code" must be lower case in both tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Do not know what is the problem with NOT IN for you, seems ok to me...

select *
from shrtrce
where pidm not in (select pidm from shrtrce where subj = 'MATH')

Tags: Database

Similar Questions

  • How can I exclude specific folders of the indexing of Windows Media Player stream?

    Windows Media Player 12 has removed the possibility of excluding some files being indexed.  This feature was available in Windows Media Player 11.  I need to be able to exclude some records indexed because I have collections of photos that are too big for the WMP player to manage.

    Excluding these folders in the library WMP is not an option because MediaCenter uses the settings of the library to determine where to find pictures (even if it does not use the library to view photos or videos - just the WMP settings) so if they are not included in the library WMP, I can't see them in MediaCenter, but if they are in the WMP library he freezes everything for 30 minutes whenever I turn on an Extender that forces a re-analysis of the WMP library.

    I tried to edit wmpfolders.wmdb to exclude certain files, but the changes that I last only for a few hours to a day or two.

    any ideas?

    Thank you
    Dan

    Hi Khaled, thank you very much for your answer.  My question was related to the media library in Windows Media Player, but your response was to Windows 7 libraries.  Unfortunately, your answer does not apply to my question.

    What I need to be able to do, is to exclude a folder from indexing of Windows Media Player streams although it is included in the list of folders to the index.  It's because the Media Center uses the settings of the library Windows Media Player to determine where to find pictures.  However, it does not use the Windows Media Library to view the photos.  It is, therefore, no need to have Windows Media Player, indexing of thousands of photos when Media Center does not even use the library to display.

    The problem is that when I let Windows Media Player scan my pics, it causes all to slow down for 30 minutes or more each time I light a MediaCenter extender because it is re-scanner all my photos.  However, if I let Windows Media Player not scan my photos, so they are not visible in the MediaCenter.  There is a catch 22.

  • Item number: 314481 how to manually remove programs from the add tool / remove program does not work! What's next?

    Tried to uninstall a program using the Add / Remove program.  The tool has requested a copy of 'Install the CD' I did not.  Then I tried to uninstall the program by following the instructions in the Article ID: 314481 how to manually remove programs from the add tool / remove program.  It didn't not t work!  The name of the program calmed listed in the tool of installed programs list even if the "Delete" button is no longer visible.   The registry key and its subkeys appear to have been deleted but still the program name in the list of installed programs tool.  WHAT IS PLANNED?

    Some people have good results with the free copy of Revo Uninstaller that you can get from here:

    http://www.revouninstaller.com/index.html

  • Muse: pagina uitsluiten menu ITU? Exclude a page from the menu?

    Dag,

    weet iemand hoe I een pagina good uitsluiten ITU het menu?

    IK wil een pagina (rights / warning) toevoegen, exclusively via een link filled kan worden die, I die en via een link verlaat. Of page mag niet het menu of in the submenu verschijnen of. Hij staat wezen Los van alle andere pagina. Weet iemand hoe I dat good realiseren?

    Link staat in voettekst.

    Dank voor I antwoord!

    Hello

    can someone tell me how to exclude a page in the menu?

    I want to add a page (rights / warning); which can be reached by a link, and you leave by clicking on another link. In fact, it has no link to other pages. How can you can imagine that in the Muse? The link is in the foot.

    Thanks for your response!

    Hello

    is there someone who can make me a page to explain comments (rights / warning), which only is present not in the menu or the submenu?

    Actually, this page has nothing to do with others. The link to get there lies at the foot of page. How can we do this with Adobe Muse?

    Thanks for the reply!

    1. Go to 'View in Plan'
    2. Right click on the page you want to exclude
    3. Go to "Menu Options.
    4. Click on "exclude Page from Menus.

  • How to remove a Word from the default dictionary of firefox?

    How to remove a Word from the default dictionary of firefox?
    If I wanted to remove the word 'dog' or 'and' for example

    There may be a range of reasons for wanting to do this, including the deletion of the words you use rarely as similar to other common spellings used words for example. "minute" and "Minuet", delete the words that you find personally offensive, or removing words that, because of linguistic or cultural background, you would not consider words at all.

    Note that I'm not asking how to remove my 'dictionary' words, words that I added myself.

    Hello

    I talked to a few people and I think I'm able to help you with this.

    There are two dictionary files, the default that comes with your version of Firefox and personal 'custom' that you create yourself with phrases and words.

    If you want to change the personal;

    1. Copy Subject: support and paste into the address bar.
    2. Next to the profile folder, click the marked File Show
    3. Find the file persdict.dat. Rename a text file, open, modify, re save it as persdict.dat and replace.

    If you want to change the default dictionary, it could be more of a problem and a lot more technique to do. I would recommend that you look at the problem differently and consider filtering of pages based on inappropriate content using Add-ons such as ProCon Latte Content Filter.

    I hope this helps, but if not, please come back here and we can look at another solution for you.

  • How to remove "Skype available" from the top of the notification page?

    How to remove "Skype available" from the top of the notification page - useless promotion!

    Hello!

    Disable the Skype status under Notification settings in Skype.

    All best
    Siim

  • How to remove a city from the weather app in IOS 9.2.1?

    I have an IPhone6S that I bought recently and am running IOS 9.2.1. I can't understand how to remove a city from the weather app. I tried to go to settings, where there is a list of all the applications on my phone except the weather app, so no help there. Any body can help me with this?

    You must tap on the small set of lines in the lower right to get list view. Then you can find the city that you want to delete, drag to the left to see the button Delete.

    See you soon,.

    GB

  • How to delete a playlist from the iphone 6

    How to delete a playlist from the iphone 6

    Open iTunes, plug in the iPhone, what you select ant to be on the iPhone, sync

  • How can I remove icons from the dock.

    How can I remove icons from the dock? am on El Capitan on my iMac

    I tried dragging it to the top of Wharf and held for up to 10 secongs

    Delete appears, I let go and he goes right to the dock.

    Try control - clicking on the icon, then Options and uncheck the keep in the Dock. Some icons have a removal of the Dock option.

  • Do you know how to copy certain tasks in the calendar and the past on different days?

    Do you know how to copy certain tasks in the calendar and the past on different days?

    This year, I even tasks to every month, so it is difficult for me to create new tasks for the same information. I can't find how to copy beyond the tasks, so if someone could help me I aprecciate it.

    Thanks in advance!

    Select, press COMMAND = C to copy it to the Clipboard; Select the date that you want a copy with the mouse, them press COMMAND\-V to paste. If you want a repetitive task, you can select the item and double-click it to open it, and then the pop up config, select repeat.

  • How can I import playlists from the windows media player 11 in excel 2003

    How can I import playlists from the windows media player 11 in excel 2003. I used to use the exporter information media, but in WMP11 it no longer allows me to "send to" exporting when I right click on a playlist.

    You must install the Windows Media Bonus Pack for Windows XP that includes the powertoy importer/exporter of playlist.

    Windows Media Bonus Pack for Windows XP! Packed with utilities, PowerToys, visualizations, skins, effects, sound and much more, the free Windows Media Bonus Pack installs on your Windows XP PC and allows your personality and creativity shine. More! MP3 Audio Converter THE sample one more feature! for Windows XP and double the amount of music you can store on your PC by converting your MP3 quickly and easily to Windows Media Audio (WMA) files. PowerToys for Windows Media Player for Windows XP (v8) includes a dozen new and updated PowerToys for Windows Media Player for Windows XP, designed to give you more control of your music with the MPXP tray control, Playlist Import to Excel, metadata utility library of media

    Download: Windows Media Bonus Pack for Windows XP

    Import playlist to Excel Powertoy
    Import playlist to Excel PowerToy offers an easy way to import lists of audio and video (with the .asx extension) of the Microsoft Windows Media Player in a worksheet in Microsoft Excel 2002 or later.

    After the playlist is imported into Excel, you can sort and retrieve information for each item in the list, including name, artist, genre, and bit rate of each file, sort and AutoFilter features in Excel. You can also export the file in HTML format to quickly create a Web page that contains a catalogue of all the audio and video in the playlist. In addition, you can draw and design of statistical information about the items in the playlist and use the information in other ODBC compatible programs (for example, Microsoft Access).

    The use of this tool is a two-step process. First, you must prepare the reading list by exporting it from Windows Media Player. Then, you use Playlist import to Excel PowerToy to import the playlist into Excel.

    To export a playlist in Windows Media Player:
    In Windows Media Player, click Media Library, and then expand My Playlists to view playlists that you created.
    Click the playlist you want to export.
    On the file menu, click Export Playlist to file.
    Select the folder where you want to save the file.
    In file name, enter a name for the file and then click Save.

    Import playlist into Excel:
    Click Start, point to programs, point to Windows Media Bonus Pack for Windows XP, and then click selection of import to Excel.
    Depending on your security settings, you can get a security warning dialog box. If Yes, click on enable the Macros to continue.
    Follow the instructions in the Windows Media Playlist import tool dialog box. (If you have already exported the playlist, you can skip step 3 in the import tool dialog box).

  • Start menu up: How do I remove programs from the Start Menu

    Please tell us how can I remove programs from the Start Menu.  In other words, I seem to have many programs starting to run, when I start my PC.

    Thank you

    Try this program to change the start:

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    This utility, which has a knowledge of auto-starting locations of any startup monitor, shows you what programs configured to run at system startup or login and that the entries in the order of processing windows. These programs include those in your startup folder, Run, RunOnce, and other registry keys. You can configureAutoruns to show other locations, including Explorer shell, toolbar extensions, helper objects to the browser, Winlogon notifications, auto and many start-up services even more. Autoruns goes way beyond the MSConfig utility bundled with Windows Me and XP.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://www.LyteByte.com/2008/06/11/remove-unwanted-startup-programs-Windows-Vista/

    And this, read also.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    And look in each program under Tools > Options > to see if you can stop here to boot at startup.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to remove all information from the computer so I can sell it?

    How to remove all information from the computer so I can sell it?

    Hello

    You will want to format the hard disk:

    1. you can use DBAN - http://www.dban.org/

    or

    2. you can follow this tutorial to clean install up to the step where you format the disk, in which you would then STOP (because you just want to get rid of the files on the hard drive, do not install Windows) - http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

    Kind regards

    Patrick

  • How to uninstall Windows 7 from the recovery disk?

    By mistake, I installed Windows 7 on the recovery disk. I have only windows 7 installed on my Dell Inspiron. However, it is now a multi-boot, as Windows 7 is stored on the operating system and the recovery drive. How delete/uninstall Windows 7 from the recovery drive (more free space on it is exhausted). I already tried to 'Format' and 'Remove the Volume' in the disk management page, but the options are grayed out and I can't access it.

    It's probably that you managed to install on the Dell recovery disk victory because it would be too small.

    Open the recovery partition in Explorer to view the files.

    Use msconfig to remove incorrect boot entry

  • Exactly how to download an App from the market to my Windows Phone 7.5 update when I am connected correctly?

    I can not download install the app, with the smartphone or a computer, using Zune via connected USB or Wi - Fi.

    Exactly how to download an App from the market to my Windows Phone 7.5 update when I am connected correctly?

    I can not download install the app, with the smartphone or a computer, using Zune via connected USB or Wi - Fi.

    Exactly how to download an App from the market to my Windows Phone 7.5 update when I am connected correctly?

    Have you clicked on the app you wanted? If you said right click Download.

Maybe you are looking for

  • Portege Z830 - H5321GW Firmware R1F01 and R3C/1 Dif

    Hello someone at - it update its 3 G WWAN Modem with Toshiba Firmware Updater? For model H5321GW, there is an upgrade of * R1F01 * for the latest Firmware * R3C/1 *. And Yes Toshiba call this FW/1 R3C another provider call R3C18/R8C11. Is there an im

  • Beats Audio drivers

    Can someone point me to re-setup of Beats on my HP ENVY 15t - j100 Select Edition CTO Notebook PC? I bought the device with installed beats but now it disappeared. It is not yet in the programs folder in the control panel. Thank you!

  • iPhone will not connect to iTunes for Windows 7 upgrade

    My iphone 3G shows in my computer, but not in iTunes since upgrade to Windows 7. It is used to recognize the iPhone with a picture of him in the AutoPlay box. Now, instead, it shows a camera. I have installed all windows updates. Uninstalled and rein

  • Change the icon when selected - 8900

    Hello. I am a beginner on the development of BB, and I noticed that some applications have a tip. When you select its icon in the home screen, the icon changes. I was wondering how to do this. Any ideas? Thanks in advance.

  • I installed on a desktop Windows 7 (64-bit). I installed the relevant (hence HP inform me) driver for a HP 1022 printer.

    I installed on a desktop Windows 7 (64-bit) and a HP1022 laserjet connected via USB. The motherboard is A S Rock 760GM-GS3 I installed the good Win 7 64 bit driver (according to HP - IE lj1018-1020-1022-HB-pnp-win64-en.exe). I tried to print a jpeg f