Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
here there are 5 columns ,,,this is output that actually i dont required..only product name ,code and price ony get at only one time....



Product Name Product Code Price Technical Specification Value
intel Corei3 ---- 3220 --- -- 3000 --- SocketType --- --- LGA 1155
intel Core i3---- 3220 --- -- 3000 --- Architecture --- --- 64-bit
intel Core i3---- 3220 --- -- 3000 --- Turbo Boost --- --- yes
intel Core i3---- 3220 --- -- 3000 --- Model ID --- --- Core I3

below that is required

Product Name Product Code Price Technical Specification Value
intel Corei3 ---- 3220 --- -- 3000 ---- SocketType --- --- LGA 1155
---------------- ---- --- -- ----- ----- Architecture --- --- 64-bit
---------------- ---- --- -- --- ----- Turbo Boost --- --- yes
---------------- ---- --- -- --- ------ Model ID --- --- Core I3
Posted
Updated 28-Mar-13 21:22pm
v3
Comments
Subhabrata Bose 29-Mar-13 3:30am    
How would you exactly like to use the output, as this type of output is not possible, you need to filter it manually
Hemant Singh Rautela 29-Mar-13 3:34am    
if some other rows having different values then ..??? as
intel Corei3 ---- 3220 --- -- 3000 --- SocketType --- --- LGA 1155
intel Core i3---- 3220 --- -- 3000 --- Architecture --- --- 64-bit
intel Core i3---- 3220 --- -- 3000 --- Turbo Boost --- --- yes
intel Core i5---- 3220 --- -- 3000 --- Architecture --- --- 64-bit
intel Core i5---- 3220 --- -- 3000 --- Turbo Boost --- --- yes

Then how can you recognize your rows....

I think you have not make your database proper (NORMALIZE)..check again the database & first study about normalization.....

1 solution

Bad design. I understand what you want, but this is not the way to do it.
1) Separate the asset and the properties in two tables in an 1:N relation
2) Select the asset, than it's properties and solve this "presentation issue" on presentation side.
3) But even keeping this database model, you have to think about it as a master-detail relation: the asset is the master, the properties are details. Don't push the presentation task on the data access layer!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900