Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6732085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:25+00:00 2026-05-26T10:36:25+00:00

I need to be able to calculate the minimum distance between two cities given

  • 0

I need to be able to calculate the minimum distance between two cities given a table that has the distances between pairs of cities. Two cities may not be connected directly, instead they may be connected via a third city and so on.

Here are the tables that I have

SQL> desc city
 Name                                      Null?    Type
 ----------------------------------------- -------- ------------

 CITY_ID                                   NOT NULL NUMBER
 CITY_NAME                                 NOT NULL VARCHAR2(80)
 CITY_STATE                                         VARCHAR2(80)
 ACTIVE                                             CHAR(1)

and

SQL> desc connection
 Name                                      Null?    Type
 ----------------------------------------- -------- -------

 CITY1                                     NOT NULL NUMBER
 CITY2                                     NOT NULL NUMBER
 NO_OF_DAYS                                NOT NULL NUMBER

I don’t know how recursion and backtracking work in pl/sql.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:36:25+00:00Added an answer on May 26, 2026 at 10:36 am

    You could try coding Dijkstra’s algorithm in PL/SQL.

    Or try this SQL solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to calculate the amount of days between two dates.
I need the ability to calculate walking distance between 2 points without calling an
I need to be able to merge two (very simple) JavaScript objects at runtime.
I need to write a script in VBA so that if column B has
I need to be able to calculate the Friday before today in Java or
I need to be able to rotate an image around a given point so
I calculate a number of sums and I need to find the minimum of
I have a project in which i need to be able to calculate different
Users of the website need to able to store images in their area ,
Need to be able to pull Magento products into an external template. Need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.