Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 28-Mar-13 22:21pm
Edited 28-Mar-13 22:22pm
v3
Comments
Subhabrata Bose at 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
hemantrautela at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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!
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100