Advertisement

11.15.2007 at 01:29AM PST, ID: 22962383
[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!

7.8

Need for a query for DYNAMIC table structrure..

Asked by uluburak in PL / SQL, Databases Miscellaneous, SQL Server 2005

Tags: , , ,

Hello experts,
I need a query for the issue below:

In a normal table all the field are defined before.. For example; let's say that we have a Cars Table, it probably will be like this:

TABLE_CARS
--------------------
CAR_CODE
BRAND
MODEL
VERSION
SPEED
COLOR
GEAR_TYPE
PRICE


In such a table, a single row contains all the data for a single car, so by querying any field of table we can find the car that we look for..

But in the structure I want to implement, the fields of the car is defined dynamically as properties.. In such a structure there are three tables:

TABLE_PROPERTIES
----------------------
PROPERTY_CODE
PROPERTY_NAME


TABLE_PROPERTY_ANSWERS
----------------------
PROPERTY_CODE
ANSWER_CODE
ANSWER_TEXT


TABLE_CAR_DETAILS
----------------------
CAR_CODE
PROPERTY_CODE
ANSWER_CODE

In this structure, a field named as COLOR in a regular table, changes into a property name in TABLE_PROPERTIES table..

When we try to find a car of X COLOR (AND) Y GEAR_TYPE we cant write a single where clause, because every property of the car in TABLE_CAR_DETAILS coressponds to different row.. Althoug the two row seperately satisfies our search, because of the fact that they are at different row our query returns false..

I'm looking for a query style to solve this problem, I hope you can help me..

Regards.. Start Free Trial
 
Loading Advertisement...
 
[+][-]11.15.2007 at 01:44AM PST, ID: 20287826

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 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.15.2007 at 02:01AM PST, ID: 20287888

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 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.15.2007 at 03:00AM PST, ID: 20288109

View this solution now by starting your 14-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

Zones: PL / SQL, Databases Miscellaneous, SQL Server 2005
Tags: dynamic, table, car, query
Sign Up Now!
Solution Provided By: mahopman
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.04.2008 at 03:55PM PDT, ID: 22393676

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]09.10.2008 at 04:35PM PDT, ID: 22444178

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628