August 21, 2016 at 9:48 am
Hi Friends ,
Actually this task is doning for avoid duplication of model_trim column.
we should bring the Answer like a binary tree format ... i have mention below hierarchy.
powerunit_natlang
|
transmission_natlang
|
modeltrim_name (concadination using + symbol)
|
Value Primary
please copy and past this url in your browser for more clear excel out put in excel :
https://www.sqlservercentral.com/Forums/Uploads/image-unavailable.png
https://www.sqlservercentral.com/Forums/Uploads/image-unavailable.png
or click this link :
create table :
CREATE TABLE [dbo].[2_11_urgent](
[technical_item_name_natlang] [varchar](1000) NOT NULL,
[category_name_natlang] [varchar](50) NULL,
[modeltrim_name] [varchar](255) NOT NULL,
[powerunit_natlang] [varchar](500) NULL,
[transmission_natlang] [varchar](250) NULL,
[value_primary] [varchar](2000) NOT NULL
) ON [PRIMARY]
insert into [2_11_urgent] (technical_item_name_natlang,category_name_natlang, modeltrim_name,powerunit_natlang,transmission_natlang,value_primary) values
('Peso en vacío con conductor','Pesos','Active Sport','1.0 MPI 60 CV','Manual 5 vel.','1.109 kg'),
('Peso en vacío con conductor','Pesos','Active','1.0 MPI 60 CV','Manual 5 vel.','1.109 kg'),
('Diámetro','Motorización y transmisión','Active 3 puertas','1.0 MPI 60 CV','ASG Aut. 5 vel.','76,4 mm'),
('Diámetro','Motorización y transmisión','Active 5 puertas','1.0 MPI 60 CV','ASG Aut. 5 vel.','76,4 mm'),
('Diámetro','Motorización y transmisión','Active 5 Silver','1.0 MPI 60 CV','ASG Aut. 5 vel.','76,4 mm'),
('Distancia entre ruedas delanteras / traseras','Dimensiones exteriores','Ambition 3 puertas','1.0 MPI 75 CV','ASG Aut. 5 vel.','1.428 / 1.424 mm'),
('Distancia entre ruedas delanteras / traseras','Dimensiones exteriores','Ambition 5 puertas','1.0 MPI 75 CV','ASG Aut. 5 vel.','1.428 / 1.424 mm'),
('Distancia entre ruedas delanteras / traseras','Dimensiones exteriores','Style 5 puertas','1.0 MPI 75 CV','ASG Aut. 5 vel.','1.428 / 1.424 mm'),
('Compresión','Motorización y transmisión','Monte Carlo 5 puertas','1.0 MPI 75 CV','Manual 5 vel.','10,5 +/- 0,5'),
('Distancia entre ruedas delanteras / traseras','Dimensiones exteriores','Monte Carlo 5 puertas','1.0 MPI 75 CV','ASG Aut. 5 vel.','1.428 / 1.424 mm'),
('Distancia entre ruedas delanteras','Dimensiones','Monte Carlo 5','1.0 MPI 75 CV','SEMI Aut. 6val.','1000mp')
August 21, 2016 at 10:15 am
Have you read http://www.sqlservercentral.com/search/?q=dynamic+pivot&t=b&sort=relevance ?
If you have read those blogs, please post your DDL here, the DML you have tried, the results you are seeing, and your expected results (for the sake of clarity, please use an IF tag, per this forum's help). If the input source is a view, please post the DDL for each table referenced within the view.
August 22, 2016 at 6:06 am
Ok SoHelpMeCodd ,
i will try . but i was tried at last 2 days expected output wont come. incase any one have a stuff to solve this plese let me know.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply