Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2005
    Posts
    30

    Unanswered: Quick Query question

    Im stuck making my queries.........

    I have an airport table, with, AIRPORTID, CITY, COUNTRY, RUNWAYCOUNT.

    I have to write a query which will display the cities for where the number of runways is not know,

    This is what ive got so far.

    Select City,
    From Airport,
    Where numberofrunways =

    Thanks in advance

  2. #2
    Join Date
    Dec 2004
    Location
    vienna, at
    Posts
    27
    you schould make:

    Code:
    Select City,
    From Airport,
    Where numberofrunways is null;
    phh

  3. #3
    Join Date
    Jan 2005
    Posts
    30
    Thanks, was almost there lol i am learning and this forum is teaching me so much! Instant replys almost.
    The types of flights leaving London is another query im not sure on

    Table is called Aircraft:

    aircraftID
    DepartAirport
    ArrivingaArport
    FlightType


    Select FlightType,
    From Aircraft,
    Where DepartAirport = 'London';

    Or would that be like "is Null" and say "is London"

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Use "=" for values (like 'London' or 3.14159) and "is" (or "is not") just for nulls.

    For "not equals" you are spoilt for choice: "!=", "<>", "^=".

  5. #5
    Join Date
    Jan 2005
    Posts
    30
    Ahhhhh right i see, thanks for that

    Do you think my aircraft Query is correct??

  6. #6
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    You could add a DISTINCT in order not to get duplicate FlightType values :
    Code:
    Select DISTINCT FlightType
    From Aircraft
    Where DepartAirport = 'London';
    (And BTW, no comma after FlightType and Aircraft )

    Regards,

    RBARAER

  7. #7
    Join Date
    Jan 2005
    Posts
    30
    Haha, thanks, put both of them in now. I had forgot commas on a few other queries as well what a noob!

  8. #8
    Join Date
    Jan 2005
    Posts
    12

    Becareful with the DISTINCT clause

    Use the DISTINCT clause only if it is extremely necessary.
    This clause increase the cost on the database, especifically if the table is full of data.

    Regards.

    Clony Nunes

  9. #9
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    Just a pointer for you for later on - whatever you put in quotes must match exactly what's on the table e.g. "...where DepartAirport = 'London'..." will not return records where the departure airport is on the database as 'LONDON', 'london' etc
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  10. #10
    Join Date
    Jan 2005
    Posts
    30
    thanks for that tip!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •