Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2016
    Posts
    1

    Unanswered: Indirect bus between two stops

    Hi,
    I have bus table having column(bus_id,stop_name,arrival)

    I want to find indirect bus between two stops.
    Ex:
    Source:AA Destination:BB
    There is no direct bus from AA->BB
    But if we take a bus(1) from AA and drop at CC then again take another bus(2) from CC to reach destination CC,

    Output:
    bus_id -- stop_name --- bus_id
    1 CC- 2

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    530
    what is the content of your table ?

    bus_id = ok : nr of the bus
    stop_name = the name of the station
    arrival ? a date ? an hour ?

    Seems to me that the datamodel is not complete because I can't determine the origin/destination of each bus
    F. Celaia
    DBA Oracle/MS-SQL/MySQLSybase/DB2/

Posting Permissions

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