We help IT Professionals succeed at work.

Many to one in one row

140 Views
Last Modified: 2018-04-06
Hi,


I would like to know if it is possible to do the following.
I have a detail table and would like to get a query with the results in just one row. It's possible?


Table_1 with details

CustomerId   ParaMeter     Value     Factor %
---------------------------------------------------------------
1                 | Lenght       |  10    |   5          
1                 | Weight       |  35    |   3
1                 | Hardness  |  12    |   2  
2                 | Lenght       |  12    |   6  
2                 | Weight       |  27    |   4
2                 | Hardness  |  10    |   4


Query i need

CustomerId  Lenght  Factor  Weight  Factor  Hardness Factor
---------------------------------------------------------------------------------------
1                   |    10  |    5      |   35     |    3      |   12   |           2|
2                   |   12   |    6      |   27     |    4      |   10   |           4|

best regards
Comment
Watch Question

Database and Application Developer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
PortletPaulEE Topic Advisor
CERTIFIED EXPERT
Most Valuable Expert 2014
Awarded 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.