Can I answer this inqury using minus or not in statement?

Hi everyone,
I'm trying to solve a inquery, here's the ERP [http://www.flickr.com/photos/78615233@N04/7201804950/]
and here's the relational schema
CRUISE
CRUISEID CHAR (6 BYTE)
* CRUISE_DEPT DATE
* CRUISE_RETURN DATE
* CRUISE_PAY NUMBER (6,2)
* CRUISE_DIR VARCHAR2 (10 BYTE)
PASSENGER
PASSID CHAR (6 BYTE)
* PASS_LN VARCHAR2 (20 BYTE)
* PASS_FN VARCHAR2 (20 BYTE)
* PASS_ADD VARCHAR2 (20 BYTE)
* PASS_DOB DATE
* PASS_EMG_CONTACT NUMBER (10)
NATIONALITY VARCHAR2 (20 BYTE)
PASSID_PK (PASSID)
TRAVEL
PF* CRUISEID CHAR (6 BYTE)
PF* PASSID CHAR (6 BYTE)
CABIN_NO NUMBER (2)
* FARE NUMBER (5,2)
* RATING NUMBER (2)
TRAVEL_PK (CRUISEID, PASSID)
CABIN_NO_UN (CABIN_NO)
TOUR_PARTICIPANT (TAKETOURS IN ERP)
PF* CRUISEID CHAR (6 BYTE)
PF* PASSID CHAR (6 BYTE)
PF* TOURID CHAR (6 BYTE)
TIP_GIVEN CHAR (1 BYTE)
TOUR_PARTICIPANT_PK (CRUISEID, PASSID, TOURID)
TOUR
P * TOURID CHAR (6 BYTE)
U TOUR_NAME VARCHAR2 (10 BYTE)
TOUR_DURATION VARCHAR2 (7 BYTE)
* TOUR_PRICE NUMBER (5,2)
* TOUR_DATE DATE
F PORTID CHAR (4 BYTE)
F GUIDEID CHAR (5 BYTE)
TOURID_PK (TOURID)
TOUR_NAME_UN (TOUR_NAME)
The question here is to List the details of all the tours for cruise number 373 that did not attract any passengers in 2011.
I was trying to solve this problem by using MINUS or NOT IN statement, but none of them worked, so can you please help me? Thanks a lot.
PS: Do I need to post all the CREAT TABLE and INSERT VALUE queries?

the posting all the CREATE TABLE and INSERT's are helpful...
-- List the details of all the tours for cruise number 373 in 2011
select t.*
from TRAVEL tr, TOUR t
where
tr.TOURID  = t.TOURID
and CRUISEID = 373
and to_char (TOUR_DATE ,'YYYY') = '2011'
-- List passengers of all the tours for cruise number 373 in 2011
    select *
    from TOUR_PARTICIPANT p
    where p.CRUISEID  = tr.CRUISEID -- =373
    and p.TOURID = t.TOURID -- Tours for CRUISEID = 373 in year 2011
-- If exist tour for CRUISEID = 373 in year 2011 and not exists passengers [PASSID] then:
select t.*
from TRAVEL tr, TOUR t -- (List the details of all the tours for cruise number 373 in 2011)
where
tr.TOURID  = t.TOURID
and CRUISEID = 373
and to_char (TOUR_DATE ,'YYYY') = '2011'
and not exists -- (List passengers of all the tours for cruise number 373 in 2011)
    select 1
    from TOUR_PARTICIPANT p
    where p.CRUISEID  = tr.CRUISEID
    and p.TOURID = t.TOURID
    )

Similar Messages

  • When I try to open a new tab using the "+" on the toolbar, nothing happens. Even trying to use the cntl t to open a new tab does not work. To open a new tab, I must right click on a hyperlink. how can I correct this? Using Firefox 3.6.18

    When I try to open a new tab using the "+" on the toolbar, nothing happens. Even trying to use the cntl t to open a new tab does not work. To open a new tab, I must right click on a hyperlink. how can I correct this? Using Firefox 3.6.18

    The Ask Toolbar is causing that in the Firefox 3.6.13+ versions. Uninstall that extension.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

  • Cannot publish Excel workbook to Sharepoint 2010 : "You can't open this location using this program. Please try a different location"

    I am trying to save an Excel 2010 file to a Sahrepoint 2010 document library but keep getting the error:
    "You can't open this location using this program. Please try a different location"
    Googling this suggests enabling "Desktop Experience" on the server which I have done. Excel Services Application is Started.
    Has anyone come across this and been able to resolve successfully? I am wondering if this is more security related but the security set-up looks fine.
    Any suggestions?
    Thanks

    Hi Sally, thanks for the response.  Problem is the issue occurs with all users not just me.
    On the server-side do you know if the full Office installation must exist for this to work?
    The reason I think it may be security related in some way is that on another server we can access one site collection but not another.  The first site collection shows the various libraries available and the other gives the same error: "You
    can't open this location using this program. Please try a different location".  
    It's proving to be very frustrating!

  • Can anyone solve this puzzle using SQL?

    Can anyone solve this puzzle using SQL?
    http://www.greylabyrinth.com/puzzle/puzzle182

    DylanB123 wrote:
    Took me almost 4 min just to get all the permutations/combinations using only dual. May try out the full thing when traffic does down on the DB.Well this looks like it gives the correct answer...
    SQL> select * from disks;
          DISK COLOUR
             1 WGYBRK
             2 WBYGKR
             3 WBGRKY
             4 WRGYKB
             5 WKGBYR
             6 WBKYGR
             7 WGKBYR
    7 rows selected.
    Elapsed: 00:00:00.04
    SQL> select   disk_perms,
      2           offset_1,
      3           offset_2,
      4           offset_3,
      5           offset_4,
      6           offset_5,
      7           offset_6,
      8           offset_7
      9    from   (select   permutations disk_perms
    10               from   (    select   replace (sys_connect_by_path (n, ','), ',')
    11                                       permutations
    12                             from   (    select   to_char (level) n
    13                                           from   dual
    14                                     connect by   level <= 7) yourtable
    15                       connect by   nocycle n != prior n)
    16              where   length (permutations) = 7) disk_permutations
    17           cross join
    18           (select   tab1.c offset_1,
    19                      tab2.c offset_2,
    20                      tab3.c offset_3,
    21                      tab4.c offset_4,
    22                      tab5.c offset_5,
    23                      tab6.c offset_6,
    24                      tab7.c offset_7
    25             from   (select   level - 1 as c from   dual connect by   level <= 6) tab1,
    26                    (select   level - 1 as c from   dual connect by   level <= 6) tab2,
    27                    (select   level - 1 as c from   dual connect by   level <= 6) tab3,
    28                    (select   level - 1 as c from   dual connect by   level <= 6) tab4,
    29                    (select   level - 1 as c from   dual connect by   level <= 6) tab5,
    30                    (select   level - 1 as c from   dual connect by   level <= 6) tab6,
    31                    (select   level - 1 as c from   dual  connect by   level <= 6) tab7) offset_combinations
    32           join disks d1 on d1.disk = substr(disk_perms,1,1)
    33           join disks d2 on d2.disk = substr(disk_perms,2,1)
    34           join disks d3 on d3.disk = substr(disk_perms,3,1)
    35           join disks d4 on d4.disk = substr(disk_perms,4,1)
    36           join disks d5 on d5.disk = substr(disk_perms,5,1)
    37           join disks d6 on d6.disk = substr(disk_perms,6,1)
    38           join disks d7 on d7.disk = substr(disk_perms,7,1)
    39    where substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_6,0,7,1),offset_1), 3,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 5,1)
    40    and   substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 2,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 5,1)
    41    and   substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 1,1) = substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_5,0,7,1),offset_5), 4,1)
    42    and   substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 1,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 4,1)
    43    and   substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 6,1) = substr( substr(d5.colour,offset_5+1)||substr(d5.colour,decode(offset_5,0,7,1),offset_5), 3,1)
    44    and   substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 6,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 3,1)
    45    and   substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 5,1) = substr( substr(d4.colour,offset_4+1)||substr(d4.colour,decode(offset_4,0,7,1),offset_4), 2,1)
    46    and   substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 5,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 2,1)
    47    and   substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 4,1) = substr( substr(d3.colour,offset_3+1)||substr(d3.colour,decode(offset_3,0,7,1),offset_3), 1,1)
    48    and   substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 3,1) = substr( substr(d2.colour,offset_2+1)||substr(d2.colour,decode(offset_2,0,7,1),offset_2), 6,1)
    49    and   substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 4,1) = substr( substr(d7.colour,offset_7+1)||substr(d7.colour,decode(offset_7,0,7,1),offset_7), 1,1)
    50    and   substr( substr(d1.colour,offset_1+1)||substr(d1.colour,decode(offset_1,0,7,1),offset_1), 5,1) = substr( substr(d6.colour,offset_6+1)||substr(d6.colour,decode(offset_6,0,7,1),offset_6), 2,1)
    51  /
    DISK_PERMS
      OFFSET_1   OFFSET_2   OFFSET_3   OFFSET_4   OFFSET_5   OFFSET_6   OFFSET_7
    5172643
             5          0          3          2          5          4          2
    Elapsed: 00:00:03.90
    SQL>If you take the positions as in
       1
    6   2
       7
    5   3
       4and the rotations (offsets) as anticlockwise based on my colour strings being in a clockwise order from the top.

  • Can anyone answer this question about unlimited data?

    I currently have a phone with ATT... a Samsung. Contract has been up for several months.
    I have the unlimited data plan for $30 a month.
    When I buy the new iPhone will I be able to just transfer my $30 a month unlimited data plan from my old Samsung phone to my new iPhone's new 2-year contract? Or, will I have to switch to the new data plan thing (with no more unlimited data)?
    Can anyone answer this? Been looking online for an answer and got zilch. Thanks.

    Why are you asking this in a user-to-user iPhone forum? The ONLY source for a definitive answer about the brand new, not yet implemented AT&T data plans is AT&T. You need to contact them. Any "answer" you get here is purely guesswork.

  • My inbox indicates a message is receive but all my message are open and so how can I fix this that the inbox will not indicate that I receive a message (one)

    my inbox indicates a message is receive but all my message are open and so how can I fix this that the inbox will not indicate that I receive a message. It shows that I received one message?

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • Sharepoint foundation 2013: office docs can be opened in browser using IE but not in firefox or chrome?

    Hi
    Sharepoint foundation 2013:
    why when we open an excel or word  using chrome and firefox browser it wants to download the file.
    It can be opened in browser using IE but not in firefox or chrome?
    Any issues?
    Thanks

    Hello MGerio,
    Can you check what your Browser File Handling settings are of the web application (of the excel/word files)?
    http://social.technet.microsoft.com/wiki/contents/articles/8073.sharepoint-browser-file-handling-deep-dive.aspx
    - Dennis | Netherlands | Blog |
    Twitter

  • Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    what if I don't want to accept cookies? I didn't have to before I upgraded

  • How can I edit this number that I have not in my ordinary contact list, before redial?

    Whats up, fellows?
    I want to redial for a last number that called me, however I need to increase numbers (as country code, carrier code or something like that) on this number, how can I edit this number that I have not in my ordinary contact list, before redial?
    Tks,

    That is discouraging.  However I do notice that if I view my podcasts in My Podcasts mode they are grouped and sorted better than in Unplayed mode and the ones in the cloud are not shown. However although I prefer the one window view of List mode to the two windows My Podcast mode, My Podcast mode does at least indicate how many unplayed episodes I have from each podcast.  This would almost be acceptable except that partially listened to podcasts, while still there, can only be identified by highlighting the podcast title on the lefthand sidebar, (although the number of completely unplayed episodes are listed on the left hand sidebar).  As someone who often listens to a podcast over two or more days I fear I could forget which ones I have only partially listened to and would have to go down the entire left hand sidebar list highlighting each podcast to remind myself.  I really find the List mode the most informative and easiest way to view my podcasts and really wish Apple had not messed with it

  • Due to a divorce all my music is on my iTunes and iPod. I had to buy a new computer and want to transfer my Library to the new computer. How can I do this without using an external drive and use new computer just like I do the old one? Thanks.

    Due to divorce, all my music is on my iTunes and iPod. I have had to buy  a new laptop and want to transfer the library to the new computer before deauthorizing the old one. I dont want to have to use an external drive every time I want to listen to my music. How can I do this and have the same basic iTunes setup as before? HELP!

    You might consider itunes match for moving CDs you've copied into your itunes library if you dont have a way to use home sharing.
    iTunes match is an optional service offered by apple that costs about $25 a year.  It scans your music library and if it finds music that is already in apple's itunes catalog it'll automatically "unlock"/"store" these in the cloud for you.  Items that it does not find in the catalog it'll upload and store these in the cloud for you and you can download them on your devices.  See http://www.apple.com/itunes/itunes-match/

  • Can anyone answer this one please.

    have a stored proc trying to retrieve blob field(a binary file) from a
    View(in schema1) in oracle10g. After retrieving I am sending it to another
    databsase(schema2) through a dblink which is in oracle9i. I am using TOAD for
    this. My code is
    Insert into [email protected]
    Select VPF.P_ID AS PET_ID,
    DBMS_LOB.SUBSTR(VPF.PDF_FILE, 4000, 1) AS PET_FILE
    FROM V_PDF_FILES VPF, [email protected]
    When i use only select then i am successful.
    Select VPF.P_ID AS PET_ID,
    DBMS_LOB.SUBSTR(VPF.PDF_FILE, 4000, 1) AS PET_FILE
    FROM V_PDF_FILES VPF, [email protected]
    I am unable to insert this into remote database. I am getting an error related to BLOB Field.
    ORA-22992: cannot use LOB locators selected from remote tables.
    My question is, the DBMS_LOB package which I have used is correct or not to
    retrieve? If yes, then is it compatible to send the BLOB from Oracle 10g to
    Oracle9i? What are the limitations for this.? How can I resolve this. Your
    response will be greatly appreciated. If you need more information then let me know.
    Thanks in advance.

    You may be able to utilize this process:
    Re: ORA-22992: cannot use LOB locators selected from remote tables

  • Reconnect question? Can anyone answer this?

    Can anyone answer a this question about using Reconnect:
    I have over 400 pictures that didn't restore out of a 202GB Full Backup. The catalog contains over 5 years of pictures. The Full Backup file is on K: external drive. If I use the reconnect and it reconnects those pictures to that K: external backup file, then do I always have to keep that external drive plugged in while I use that catalog that reconnected those pictures to the external drive?
    If the answer is yes, then is it possible to make a copy of that Full Backup and put it on the C: drive so I can disconnect that external drive and keep it in a safe place? I have plenty of room on the C: drive since I upgraded to a 2TB main drive.
    If it is possible to make a copy of that Full Backup and move it to the C: drive can you please tell me the proper procedure. Thank you!

    Why are you asking this in a user-to-user iPhone forum? The ONLY source for a definitive answer about the brand new, not yet implemented AT&T data plans is AT&T. You need to contact them. Any "answer" you get here is purely guesswork.

  • Hi thisis kesava can tellme answer this question

    what is psa ? why are you using psa while updating data to the data targets?

    Hi Kessava,
    Your Q No. 1
    <b>PSA is persistant staging area .</b>
    PSA
    Persistent Staging Area is a transparent database table in which request data is stored in the form of transfer structure.A PSA is created per datasource and source system. It represents an initial store in BW in which the requested data is saved unchanged for source system.PSA
    1) Checks whether extraction from source system is complete
    2)ensures data quality,supports editing,reconstruction and deletion of data
    3)the data from the source system is stored in PSA tables before being updated in the Data Target/Info-object
    4)preferred method because of its various advantages like Reconstruction, Data editing, etc..
    5)Data sources with the IDOC transfer methode are not supported with ODS object.
    6)start routine could be created only for transfer method PSA.
    For Q No.2
    You can load the data without using the PSA. But most of the people go in for the PSA, as that is the place where you can get the raw data as is from the source. You can use that for reconstruction, or looking at problem records and correcting them(not advisable. better to get the data corrected from the source system and then resent)during data load failures. Can also be used for archiving the data if you need to use it later on.
    Using the PSA depends upon the type of processing you are using: Parallel, Sequential (PSA used) or Direct Update (no PSA used). If you use the PSA you have the option of reconstructing the data (if request has to be deleted) or also using error handling when loading the data.
    Hope this helps
    Cheers
    Sunil

  • Can anyone answer this????

    I have a java application that interacts with a Microsoft Access database that houses movie information. Such things include (Title,description,rating..etc). I am using this application to catalog my movies. Instead of using the information off the back of the DVD case I generally go to netflix or idmb to gather the information. My problem arises when I copy and past the desired info into my JFrame that adds the info into my database immediately after pressing a button. Everything works fine until I add too many movies into the database and I get a goofy error:
    Exception occurred during event dispatching:
    java.lang.IllegalStateException: cannot open system clipboard
    I noticed that a couple times, that because of this error that it did not add the movie correctly. I want to make this an executable program but I would like to catch this problem and correct it. Any suggestions on what is happening?

    How do you open the system clipboard? Maybe you didn't close it when you opened it before (just a guess, since you indicate it happens after a few iterations).

  • My husband and I have our iphones  and icloud set up. He is getting all my text messages coming through to his phone, how can i get this changed so it does not happen? does it have anything to do with icloud?

    My husband and i have our iphones set up. He is getting all my text messages that are coming through to my phone, how can i elminate this problem? Does it have anything to do with out icloud?

    Well, you use the different accounts such Phone Numbers, email addresses. And make sure that your iPhones have no receipient address in common, then you can avoid this issue.
    I use iMessage on my iPhone, iPad, MacBook Pro, iPod touch.
    Each of them has a individual address to receive messages, so they won't combine all the messages among all the devices.
    Try this, if it doesn't work, tell me, I'll figure another way out.

Maybe you are looking for

  • I need to get the music from my iTunes library to my iPhone 4, but it won't recognize my phone in iTunes...

    When I plug my iPhone 4 into my laptop, a box pops up that says "The iPhone "iPhone" cannot be used because it requires iTunes version 11.1 or later. Go to www.itunes.com to download the latest version of iTunes." I did so, but after downloading this

  • MegaPlayer 5538 problems with Win98SE

    Hi, I got a MegaPlayer 5538 with 1GB SD-Card. It works fine with Windows XP, but I have some problems with it running on Windows 98 SE. I tried to install it on three different Win98 SE PCs, but was only successful with one. On the other two I cannot

  • Strange behaviour when accessing Oracle 8i table from servlet

    Hi there, First a little background, I've got a 2 column table in an Oracle 8i DB that holds a very simple code to word map. There are no strange characters. Both columns are varchar. From my desktop machine, when I execute the the following: <SNIP>

  • XI: connect external system

    Hi guys, we installed sap xi netweaver 7.1 a few days and still i don't know well each feature. I need your help! we are also implementing a non sap application for CPM. The platform is tagetik. Now I need transfer data from bw (after a processing) t

  • Does Novo Button depend on the partitions?

    I 've recently purchased an Ideapad S400U. I am thinking to wipe everything from it. That is, I'll delete the OEM Windows 8 and its related partitions. That is because I intend to install Windows 8.1 (I've got its test version from DreamSpark). Besid