Advertisement

06.20.2007 at 12:11AM PDT, ID: 22645166
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

How do I join this to get the required result?

Asked by riaancornelius in MS SQL Server

Hi all,

I have a table with transfer prices between 2 destinations. The structure of the table is described below. What I need, is a query that will return the following from 'location_prices_1_2008':

'Balule Nature Reserve', 'Balule Nature Reserve', 0.00
'Balule Nature Reserve', 'Berg-en-dal Camp (K.N.P.)', 1650.00
'Balule Nature Reserve', 'Blue Mountain Lodge', 1430.00
'Balule Nature Reserve', 'Buhala Country Lodge', 1650.00
'Balule Nature Reserve', 'Bongani Mountain Reserve', 1540.00

Instead of:

0, 0, 0.00
0, 1, 1650.00
0, 2, 1430.00
0, 3, 1650.00
0, 4, 1540.00

I just don't know how to do a multiple join ( location_from and location_to ) on 1 table (locations)...


Here's the scripts to create the table structure and insert some sample data.

--
-- Create the location_prices_1_2008  table:
--

CREATE TABLE location_prices_1_2008 (
  Location_From int(11) NOT NULL default '0',
  Location_To int(11) NOT NULL default '0',
  Price decimal(19,2) NOT NULL default '0.00'
);

--
-- Dumping data for table 'location_prices_1_2008'
--

INSERT INTO location_prices_1_2008 (Location_From, Location_To, Price) VALUES (0, 0, 0.00);
INSERT INTO location_prices_1_2008 (Location_From, Location_To, Price) VALUES (0, 1, 1650.00);
INSERT INTO location_prices_1_2008 (Location_From, Location_To, Price) VALUES (0, 2, 1430.00);
INSERT INTO location_prices_1_2008 (Location_From, Location_To, Price) VALUES (0, 3, 1650.00);
INSERT INTO location_prices_1_2008 (Location_From, Location_To, Price) VALUES (0, 4, 1540.00);

--
-- Create the locations table:
--

CREATE TABLE locations (
  Location_ID int NOT NULL default '0',
  Location_Name varchar(255) NOT NULL default ''
)

--
-- Dumping data for table 'locations'
--

INSERT INTO locations VALUES (0, 'Balule Nature Reserve');
INSERT INTO locations VALUES (1, 'Berg-en-dal Camp (K.N.P.)');
INSERT INTO locations VALUES (2, 'Blue Mountain Lodge');
INSERT INTO locations VALUES (3, 'Buhala Country Lodge');
INSERT INTO locations VALUES (4, 'Bongani Mountain Reserve');Start Free Trial
 
 
[+][-]06.20.2007 at 12:24AM PDT, ID: 19322589

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Sign Up Now!
Solution Provided By: Lowfatspread
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.20.2007 at 12:25AM PDT, ID: 19322592

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.20.2007 at 12:30AM PDT, ID: 19322608

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2007 at 12:51AM PDT, ID: 19322677

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.20.2007 at 12:56AM PDT, ID: 19322692

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.20.2007 at 01:05AM PDT, ID: 19322712

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2007 at 01:08AM PDT, ID: 19322721

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44